add electric signal and rotate signals for better placement
parent
1e93892d8a
commit
173829fe59
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 239 KiB |
Binary file not shown.
29
signals.lua
29
signals.lua
|
@ -15,6 +15,7 @@ for r,f in pairs({on="off", off="on"}) do
|
||||||
tiles = {"advtrains_retrosignal.png"},
|
tiles = {"advtrains_retrosignal.png"},
|
||||||
description="Lampless Signal ("..r..")",
|
description="Lampless Signal ("..r..")",
|
||||||
on_rightclick=switchfunc,
|
on_rightclick=switchfunc,
|
||||||
|
sunlight_propagates=true,
|
||||||
groups = {
|
groups = {
|
||||||
choppy=3,
|
choppy=3,
|
||||||
not_blocking_trains=1
|
not_blocking_trains=1
|
||||||
|
@ -28,4 +29,32 @@ for r,f in pairs({on="off", off="on"}) do
|
||||||
minetest.swap_node(pos, {name = "advtrains:retrosignal_"..f, param2 = node.param2})
|
minetest.swap_node(pos, {name = "advtrains:retrosignal_"..f, param2 = node.param2})
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
minetest.register_node("advtrains:signal_"..r, {
|
||||||
|
drawtype = "mesh",
|
||||||
|
paramtype="light",
|
||||||
|
paramtype2="facedir",
|
||||||
|
walkable = false,
|
||||||
|
selection_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {-1/4, -1/2, -1/4, 1/4, 2, 1/4},
|
||||||
|
},
|
||||||
|
mesh = "advtrains_signal.b3d",
|
||||||
|
tiles = {"advtrains_signal_"..r..".png"},
|
||||||
|
description="Signal ("..r..")",
|
||||||
|
on_rightclick=switchfunc,
|
||||||
|
groups = {
|
||||||
|
choppy=3,
|
||||||
|
not_blocking_trains=1
|
||||||
|
},
|
||||||
|
light_source = 1,
|
||||||
|
sunlight_propagates=true,
|
||||||
|
mesecons = {effector = {
|
||||||
|
["action_"..f] = function (pos, node)
|
||||||
|
minetest.swap_node(pos, {name = "advtrains:signal_"..f, param2 = node.param2})
|
||||||
|
end
|
||||||
|
}},
|
||||||
|
on_rightclick=function(pos, node, clicker)
|
||||||
|
minetest.swap_node(pos, {name = "advtrains:signal_"..f, param2 = node.param2})
|
||||||
|
end,
|
||||||
|
})
|
||||||
end
|
end
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 137 KiB |
Binary file not shown.
After Width: | Height: | Size: 136 KiB |
Loading…
Reference in New Issue