From 38cc24e968d3671cba63918d69be59afc26b1052 Mon Sep 17 00:00:00 2001 From: Maverick2797 Date: Fri, 12 Jun 2026 18:38:33 +0800 Subject: Disallow trains with no locomotive to set ARS at signals --- advtrains_interlocking/approach.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/advtrains_interlocking/approach.lua b/advtrains_interlocking/approach.lua index eaf0248..260c886 100644 --- a/advtrains_interlocking/approach.lua +++ b/advtrains_interlocking/approach.lua @@ -62,7 +62,9 @@ advtrains.tnc_register_on_approach(function(pos, id, train, index, has_entered, -- stored in lzbdata and updated once the train drives over. However, for the sake of simplicity, it is simply -- a value in the train. In this case, this is sufficient because once a train triggers ARS for the first time, -- resetting the path does not matter to the set route and ARS doesn't need to be called again. - if spos and ars_enabled then + + -- since wagons can't move on their own (yet) only check for ars if train is capable of moving + if spos and ars_enabled and train.locomotives_in_train > 0 then --atdebug(id,"IL Spos (ARS)",spos,asp) il.ars_check(spos, train) end -- cgit v1.2.3