Builtin: Make item entities glow less (#9594)
authorsfan5 <sfan5@live.de>
Sat, 4 Apr 2020 19:27:30 +0000 (21:27 +0200)
committerGitHub <noreply@github.com>
Sat, 4 Apr 2020 19:27:30 +0000 (21:27 +0200)
minor adjustment to #9200

builtin/game/item_entity.lua

index 1d66799f64d5c18e528164a79f814969676ceb69..968daac976f83071c0d32177f8c5df17d366d8eb 100644 (file)
@@ -59,7 +59,7 @@ core.register_entity(":__builtin:item", {
                local size = 0.2 + 0.1 * (count / max_count) ^ (1 / 3)
                local coll_height = size * 0.75
                local def = core.registered_nodes[itemname]
-               local glow = def and def.light_source
+               local glow = def and math.floor(def.light_source / 2 + 0.5)
 
                self.object:set_properties({
                        is_visible = true,