diff options
author | cheapie <no-email-for-you@example.com> | 2024-04-20 14:40:05 -0500 |
---|---|---|
committer | cheapie <no-email-for-you@example.com> | 2024-04-20 14:40:05 -0500 |
commit | 5c85c16570e5b7f12d149a4b52747606d0ee2940 (patch) | |
tree | d4c7b328b02f7484e37a2e490e74a6a8f7a6ac0b /callbuttons.lua | |
parent | f73342b8a63a2a9f24a3cb83d906f67e0550802e (diff) | |
download | celevator-5c85c16570e5b7f12d149a4b52747606d0ee2940.tar celevator-5c85c16570e5b7f12d149a4b52747606d0ee2940.tar.gz celevator-5c85c16570e5b7f12d149a4b52747606d0ee2940.tar.bz2 celevator-5c85c16570e5b7f12d149a4b52747606d0ee2940.tar.xz celevator-5c85c16570e5b7f12d149a4b52747606d0ee2940.zip |
Entity and lighting tweaks
Diffstat (limited to 'callbuttons.lua')
-rw-r--r-- | callbuttons.lua | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/callbuttons.lua b/callbuttons.lua index 4dfe056..961d96e 100644 --- a/callbuttons.lua +++ b/callbuttons.lua @@ -115,8 +115,15 @@ for _,state in ipairs(validstates) do local boringside = "[combine:64x64:0,0=celevator_cabinet_sides.png:32,0=celevator_cabinet_sides.png:0,32=celevator_cabinet_sides.png:32,32=celevator_cabinet_sides.png" local nname = "celevator:callbutton_"..state[1] local dropname = nname - if state[2] then nname = nname.."_upon" end - if state[3] then nname = nname.."_downon" end + local light = 0 + if state[2] then + nname = nname.."_upon" + light = light + 5 + end + if state[3] then + nname = nname.."_downon" + light = light + 5 + end local idle = not (state[2] or state[3]) local description = string.format("Elevator %s Call Button%s%s",state[4],(state[1] == "both" and "s" or ""),(idle and "" or " (on state, you hacker you!)")) minetest.register_node(nname,{ @@ -142,6 +149,7 @@ for _,state in ipairs(validstates) do }, paramtype = "light", paramtype2 = "facedir", + light_source = light, drawtype = "nodebox", node_box = { type = "fixed", |