summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcheapie <no-email-for-you@example.com>2024-04-20 14:40:05 -0500
committercheapie <no-email-for-you@example.com>2024-04-20 14:40:05 -0500
commit5c85c16570e5b7f12d149a4b52747606d0ee2940 (patch)
treed4c7b328b02f7484e37a2e490e74a6a8f7a6ac0b
parentf73342b8a63a2a9f24a3cb83d906f67e0550802e (diff)
downloadcelevator-5c85c16570e5b7f12d149a4b52747606d0ee2940.tar
celevator-5c85c16570e5b7f12d149a4b52747606d0ee2940.tar.gz
celevator-5c85c16570e5b7f12d149a4b52747606d0ee2940.tar.bz2
celevator-5c85c16570e5b7f12d149a4b52747606d0ee2940.tar.xz
celevator-5c85c16570e5b7f12d149a4b52747606d0ee2940.zip
Entity and lighting tweaks
-rw-r--r--callbuttons.lua12
-rw-r--r--car.lua1
-rw-r--r--doors.lua2
-rw-r--r--drive_entity.lua1
-rw-r--r--pilantern.lua16
5 files changed, 28 insertions, 4 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",
diff --git a/car.lua b/car.lua
index cb870d4..23aa121 100644
--- a/car.lua
+++ b/car.lua
@@ -584,6 +584,7 @@ minetest.register_entity("celevator:car_top_box",{
wield_item = "celevator:car_top_box_off",
static_save = false,
pointable = false,
+ glow = minetest.LIGHT_MAX,
},
})
diff --git a/doors.lua b/doors.lua
index d5e48e8..0dcbcf6 100644
--- a/doors.lua
+++ b/doors.lua
@@ -212,6 +212,7 @@ minetest.register_entity("celevator:hwdoor_moving",{
visual_size = vector.new(0.667,0.667,0.667),
wield_item = "default:dirt",
static_save = false,
+ pointable = false,
},
})
@@ -462,6 +463,7 @@ minetest.register_entity("celevator:car_door",{
wield_item = "default:dirt",
static_save = false,
pointable = false,
+ glow = minetest.LIGHT_MAX,
},
})
diff --git a/drive_entity.lua b/drive_entity.lua
index f7f8b4b..d3d9295 100644
--- a/drive_entity.lua
+++ b/drive_entity.lua
@@ -183,6 +183,7 @@ minetest.register_entity("celevator:car_moving",{
wield_item = "default:dirt",
static_save = false,
glow = minetest.LIGHT_MAX,
+ pointable = false,
},
})
diff --git a/pilantern.lua b/pilantern.lua
index afb1b1e..9293dd2 100644
--- a/pilantern.lua
+++ b/pilantern.lua
@@ -11,6 +11,7 @@ minetest.register_entity("celevator:pi_entity",{
collisionbox = {0,0,0,0,0,0,},
textures = {"celevator_transparent.png",},
static_save = false,
+ glow = minetest.LIGHT_MAX,
},
})
@@ -21,6 +22,7 @@ minetest.register_entity("celevator:incar_pi_entity",{
collisionbox = {0,0,0,0,0,0,},
textures = {"celevator_transparent.png",},
static_save = false,
+ glow = minetest.LIGHT_MAX,
},
on_step = function(self)
local pos = self.object:get_pos()
@@ -152,6 +154,7 @@ minetest.register_node("celevator:pi",{
paramtype = "light",
paramtype2 = "facedir",
drawtype = "nodebox",
+ light_source = 3,
node_box = {
type = "fixed",
fixed = {
@@ -303,8 +306,15 @@ local validstates = {
for _,state in ipairs(validstates) do
local nname = "celevator:pilantern_"..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 + 4
+ end
+ if state[3] then
+ nname = nname.."_downon"
+ light = light + 4
+ end
local idle = not (state[2] or state[3])
local description = string.format("Elevator %s Position Indicator/Lantern Combo%s",state[4],(idle and "" or " (on state, you hacker you!)"))
minetest.register_node(nname,{
@@ -332,6 +342,7 @@ for _,state in ipairs(validstates) do
paramtype = "light",
paramtype2 = "facedir",
drawtype = "nodebox",
+ light_source = light + 3,
node_box = {
type = "fixed",
fixed = {
@@ -441,6 +452,7 @@ for _,state in ipairs(validstates) do
end,
paramtype = "light",
paramtype2 = "facedir",
+ light_source = light,
drawtype = "nodebox",
node_box = {
type = "fixed",