aboutsummaryrefslogtreecommitdiff
path: root/advtrains_luaautomation/atc_rail.lua
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2019-12-11 12:25:08 +0100
committerorwell96 <orwell@bleipb.de>2021-02-10 16:35:45 +0100
commit816245588d62e3364b974be07989298887c45cfe (patch)
treeb4166f07a0396b43d6af7bd41d1295101117d947 /advtrains_luaautomation/atc_rail.lua
parent74a219937dd031743c880510f10571adec0cf8a8 (diff)
downloadadvtrains-816245588d62e3364b974be07989298887c45cfe.tar.gz
advtrains-816245588d62e3364b974be07989298887c45cfe.tar.bz2
advtrains-816245588d62e3364b974be07989298887c45cfe.zip
Disable ARS train flag and surrounding uses
Diffstat (limited to 'advtrains_luaautomation/atc_rail.lua')
-rw-r--r--advtrains_luaautomation/atc_rail.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/advtrains_luaautomation/atc_rail.lua b/advtrains_luaautomation/atc_rail.lua
index 33b5d00..0f5a7dc 100644
--- a/advtrains_luaautomation/atc_rail.lua
+++ b/advtrains_luaautomation/atc_rail.lua
@@ -153,6 +153,7 @@ function r.fire_event(pos, evtdata, appr_internal)
if not appr_internal then
error("atc_set_lzb_tsr() can only be used during 'approach' events!")
end
+ assert(tonumber(speed), "Number expected!")
local index = appr_internal.index
advtrains.lzb_add_checkpoint(train, index, speed, nil)
@@ -160,6 +161,12 @@ function r.fire_event(pos, evtdata, appr_internal)
return true
end,
}
+ -- interlocking specific
+ if advtrains.interlocking then
+ customfct.atc_set_ars_disable = function(value)
+ advtrains.interlocking.ars_set_disable(train, value)
+ end
+ end
atlatc.active.run_in_env(pos, evtdata, customfct)