diff options
| author | Maverick2797 <git.maverick2797@gmail.com> | 2026-06-12 18:38:33 +0800 |
|---|---|---|
| committer | orwell <orwell@bleipb.de> | 2026-07-08 21:33:54 +0200 |
| commit | 38cc24e968d3671cba63918d69be59afc26b1052 (patch) | |
| tree | 41a5eb48dfcd492d2bb746cc39019cdffc5ba0f0 | |
| parent | e5c5ae1af136fc73b7c7c9b653c314235122957d (diff) | |
Disallow trains with no locomotive to set ARS at signals
| -rw-r--r-- | advtrains_interlocking/approach.lua | 4 |
1 files changed, 3 insertions, 1 deletions
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 |
