aboutsummaryrefslogtreecommitdiff
path: root/advtrains_interlocking/train_related.lua
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2018-08-12 16:58:47 +0200
committerorwell96 <orwell@bleipb.de>2018-08-12 16:58:47 +0200
commita92ecbc26a14a193f103fe6a626eae000fe9b949 (patch)
tree7a88ed25c10d77eebf73d0f4d9f804b640070993 /advtrains_interlocking/train_related.lua
parent0ec89364c01eceb5c47f9cc3503d3561064b7fdb (diff)
downloadadvtrains-a92ecbc26a14a193f103fe6a626eae000fe9b949.tar.gz
advtrains-a92ecbc26a14a193f103fe6a626eae000fe9b949.tar.bz2
advtrains-a92ecbc26a14a193f103fe6a626eae000fe9b949.zip
Automatic working (re-set certain route on train pass)
Diffstat (limited to 'advtrains_interlocking/train_related.lua')
-rw-r--r--advtrains_interlocking/train_related.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/advtrains_interlocking/train_related.lua b/advtrains_interlocking/train_related.lua
index ebeda9f..a92e18f 100644
--- a/advtrains_interlocking/train_related.lua
+++ b/advtrains_interlocking/train_related.lua
@@ -79,10 +79,14 @@ local function setsection(tid, train, ts_id, ts, origin)
-- this is the first route section. clear route status from origin sigd
local tcbs = advtrains.interlocking.db.get_tcbs(ts.route.origin)
if tcbs then
- tcbs.routeset = nil
tcbs.route_committed = nil
tcbs.aspect = nil
advtrains.interlocking.update_signal_aspect(tcbs)
+ if tcbs.route_auto then
+ advtrains.interlocking.route.update_route(ts.route.origin, tcbs)
+ else
+ tcbs.routeset = nil
+ end
end
end
ts.route = nil