aboutsummaryrefslogtreecommitdiff
path: root/advtrains_interlocking/signal_api.lua
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2018-12-08 18:23:34 +0100
committerorwell96 <orwell@bleipb.de>2018-12-08 18:23:34 +0100
commit7a970dd4fab46461ee6dc43064b7972bac6304ea (patch)
tree876753ec4536c2483109726f16c6ea1240c5b082 /advtrains_interlocking/signal_api.lua
parentc3c5431412ddb65e08f55e56e1f51fb442b746b0 (diff)
downloadadvtrains-7a970dd4fab46461ee6dc43064b7972bac6304ea.tar.gz
advtrains-7a970dd4fab46461ee6dc43064b7972bac6304ea.tar.bz2
advtrains-7a970dd4fab46461ee6dc43064b7972bac6304ea.zip
Signs (static signals)
Diffstat (limited to 'advtrains_interlocking/signal_api.lua')
-rw-r--r--advtrains_interlocking/signal_api.lua10
1 files changed, 8 insertions, 2 deletions
diff --git a/advtrains_interlocking/signal_api.lua b/advtrains_interlocking/signal_api.lua
index 4d75f28..f33edde 100644
--- a/advtrains_interlocking/signal_api.lua
+++ b/advtrains_interlocking/signal_api.lua
@@ -239,8 +239,14 @@ function advtrains.interlocking.signal_rc_handler(pos, node, player, itemstack,
if sigd then
advtrains.interlocking.show_signalling_form(sigd, pname)
else
- -- permit to set aspect manually
- minetest.show_formspec(pname, "at_il_sigasp_"..minetest.pos_to_string(pos), "field[aspect;Set Aspect ('A' to assign IP);D0D0D]")
+ local ndef = minetest.registered_nodes[node.name]
+ if ndef.advtrains and ndef.advtrains.set_aspect then
+ -- permit to set aspect manually
+ minetest.show_formspec(pname, "at_il_sigasp_"..minetest.pos_to_string(pos), "field[aspect;Set Aspect ('A' to assign IP);D0D0D]")
+ else
+ --static signal - only IP
+ advtrains.interlocking.show_ip_form(pos, pname)
+ end
end
end