aboutsummaryrefslogtreecommitdiff
path: root/advtrains_interlocking/ars.lua
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2021-10-26 20:23:19 +0200
committerorwell96 <orwell@bleipb.de>2021-10-26 20:23:19 +0200
commit75025b13ca3b90c0ed284920ab0f294c54eeb697 (patch)
tree5f19ce613c5f36d8e22b7a2c986b544c2ddceecd /advtrains_interlocking/ars.lua
parent4e80866ca6156a9fa65e8c8539c0756ee5ae7a50 (diff)
downloadadvtrains-75025b13ca3b90c0ed284920ab0f294c54eeb697.tar.gz
advtrains-75025b13ca3b90c0ed284920ab0f294c54eeb697.tar.bz2
advtrains-75025b13ca3b90c0ed284920ab0f294c54eeb697.zip
Route Formspec: When cancelling route, disable ARS only temporarily, not permanently
Diffstat (limited to 'advtrains_interlocking/ars.lua')
-rw-r--r--advtrains_interlocking/ars.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/advtrains_interlocking/ars.lua b/advtrains_interlocking/ars.lua
index 434ae2c..4f50df9 100644
--- a/advtrains_interlocking/ars.lua
+++ b/advtrains_interlocking/ars.lua
@@ -133,9 +133,11 @@ function advtrains.interlocking.ars_check(sigd, train)
local tcbs = il.db.get_tcbs(sigd)
if not tcbs or not tcbs.routes then return end
- if tcbs.ars_disabled then
+ if tcbs.ars_disabled or tcbs.ars_ignore_next then
-- No-ARS mode of signal.
-- ignore...
+ -- Note: ars_ignore_next is set by signalling formspec when route is cancelled
+ tcbs.ars_ignore_next = nil
return
end