diff options
author | Elias Fleckenstein <eliasfleckenstein@web.de> | 2020-11-28 13:48:33 +0100 |
---|---|---|
committer | Elias Fleckenstein <eliasfleckenstein@web.de> | 2020-11-28 13:48:33 +0100 |
commit | eb6aca8b4a67ef55108231e71ff29a18a29bf5ae (patch) | |
tree | f891914d25cae2cdaa24392381436a287340651e /builtin/game/item_entity.lua | |
parent | 8de51dae97aa2fe6ea02e4cf437bfe2b2a38eb06 (diff) | |
parent | f1d72d212a0661588be27003069abf4bd8092e55 (diff) | |
download | dragonfireclient-eb6aca8b4a67ef55108231e71ff29a18a29bf5ae.tar.xz |
Merged Minetest
Diffstat (limited to 'builtin/game/item_entity.lua')
-rw-r--r-- | builtin/game/item_entity.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/builtin/game/item_entity.lua b/builtin/game/item_entity.lua index 20dd18044..9b1b23bfd 100644 --- a/builtin/game/item_entity.lua +++ b/builtin/game/item_entity.lua @@ -54,8 +54,9 @@ core.register_entity(":__builtin:item", { local max_count = stack:get_stack_max() local count = math.min(stack:get_count(), max_count) local size = 0.2 + 0.1 * (count / max_count) ^ (1 / 3) - local def = core.registered_nodes[itemname] - local glow = def and math.floor(def.light_source / 2 + 0.5) + local def = core.registered_items[itemname] + local glow = def and def.light_source and + math.floor(def.light_source / 2 + 0.5) self.object:set_properties({ is_visible = true, |