From 75025b13ca3b90c0ed284920ab0f294c54eeb697 Mon Sep 17 00:00:00 2001 From: orwell96 Date: Tue, 26 Oct 2021 20:23:19 +0200 Subject: Route Formspec: When cancelling route, disable ARS only temporarily, not permanently --- advtrains_interlocking/ars.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'advtrains_interlocking/ars.lua') 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 -- cgit v1.2.3