aboutsummaryrefslogtreecommitdiff
path: root/advtrains/signals.lua
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2020-04-23 09:44:17 +0200
committerorwell96 <orwell@bleipb.de>2021-02-10 16:35:45 +0100
commitb59b0d587d72f78c5923aa501038b93269bba271 (patch)
tree8fd43d94e77c178c8fefd4b2b5573f84d0e0d092 /advtrains/signals.lua
parenta78ff65b31f8f6eb65580cf1002bbc0c53ef345e (diff)
downloadadvtrains-b59b0d587d72f78c5923aa501038b93269bba271.tar.gz
advtrains-b59b0d587d72f78c5923aa501038b93269bba271.tar.bz2
advtrains-b59b0d587d72f78c5923aa501038b93269bba271.zip
Implement a LZB speed lookup table for the path and rewrite velocity controls
Diffstat (limited to 'advtrains/signals.lua')
-rw-r--r--advtrains/signals.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/advtrains/signals.lua b/advtrains/signals.lua
index e144aa6..2bad1d4 100644
--- a/advtrains/signals.lua
+++ b/advtrains/signals.lua
@@ -63,6 +63,7 @@ for r,f in pairs({on={as="off", ls="green", als="red"}, off={as="on", ls="red",
rules=advtrains.meseconrules,
["action_"..f.as] = function (pos, node)
advtrains.ndb.swap_node(pos, {name = "advtrains:retrosignal_"..f.as..rotation, param2 = node.param2}, true)
+ advtrains.interlocking.signal_on_aspect_changed(pos)
end
}},
on_rightclick=function(pos, node, player)
@@ -74,6 +75,7 @@ for r,f in pairs({on={as="off", ls="green", als="red"}, off={as="on", ls="red",
advtrains.interlocking.show_ip_form(pos, pname)
elseif advtrains.check_turnout_signal_protection(pos, player:get_player_name()) then
advtrains.ndb.swap_node(pos, {name = "advtrains:retrosignal_"..f.as..rotation, param2 = node.param2}, true)
+ advtrains.interlocking.signal_on_aspect_changed(pos)
end
end,
-- new signal API
@@ -120,6 +122,7 @@ for r,f in pairs({on={as="off", ls="green", als="red"}, off={as="on", ls="red",
rules=advtrains.meseconrules,
["action_"..f.as] = function (pos, node)
advtrains.setstate(pos, f.als, node)
+ advtrains.interlocking.signal_on_aspect_changed(pos)
end
}},
on_rightclick=function(pos, node, player)
@@ -131,6 +134,7 @@ for r,f in pairs({on={as="off", ls="green", als="red"}, off={as="on", ls="red",
advtrains.interlocking.show_ip_form(pos, pname)
elseif advtrains.check_turnout_signal_protection(pos, player:get_player_name()) then
advtrains.setstate(pos, f.als, node)
+ advtrains.interlocking.signal_on_aspect_changed(pos)
end
end,
-- new signal API