diff options
author | Wuzzy <wuzzy2@mail.ru> | 2019-12-19 18:41:44 +0000 |
---|---|---|
committer | SmallJoker <SmallJoker@users.noreply.github.com> | 2019-12-19 19:41:44 +0100 |
commit | 4b9fabf172dafa325a2adb9754c581a74d0f4e7b (patch) | |
tree | b1af35107bd8aa2b9661e07490cb60bffb38fa4e | |
parent | 80af58c8c5a68fc7ff66a730204ffa933e89a305 (diff) | |
download | minetest-4b9fabf172dafa325a2adb9754c581a74d0f4e7b.tar.gz minetest-4b9fabf172dafa325a2adb9754c581a74d0f4e7b.tar.bz2 minetest-4b9fabf172dafa325a2adb9754c581a74d0f4e7b.zip |
Builtin: Make dropped light_source nodes glow (#9200)
-rw-r--r-- | builtin/game/item_entity.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/builtin/game/item_entity.lua b/builtin/game/item_entity.lua index 87fec93ea..1d66799f6 100644 --- a/builtin/game/item_entity.lua +++ b/builtin/game/item_entity.lua @@ -58,6 +58,8 @@ core.register_entity(":__builtin:item", { local count = math.min(stack:get_count(), max_count) 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 self.object:set_properties({ is_visible = true, @@ -69,6 +71,7 @@ core.register_entity(":__builtin:item", { selectionbox = {-size, -size, -size, size, size, size}, automatic_rotate = math.pi * 0.5 * 0.2 / size, wield_item = self.itemstring, + glow = glow, }) end, |