diff options
author | orwell <orwell@bleipb.de> | 2024-11-11 20:50:28 +0100 |
---|---|---|
committer | orwell <orwell@bleipb.de> | 2024-11-11 20:50:28 +0100 |
commit | 380c26f7a851f4b4edb3879b544a542e7bfbb490 (patch) | |
tree | 158ac366c93a8581f5792f95eba6932bafe4c325 /advtrains_interlocking/routesetting.lua | |
parent | 29180f0f60871f92889f686fe666c029ac07861a (diff) | |
parent | 3d2d19f6f7eba90f0d19b002824b2ff466567608 (diff) | |
download | advtrains-380c26f7a851f4b4edb3879b544a542e7bfbb490.tar.gz advtrains-380c26f7a851f4b4edb3879b544a542e7bfbb490.tar.bz2 advtrains-380c26f7a851f4b4edb3879b544a542e7bfbb490.zip |
Merge branch 'master' into route_prog_rework
Diffstat (limited to 'advtrains_interlocking/routesetting.lua')
-rw-r--r-- | advtrains_interlocking/routesetting.lua | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/advtrains_interlocking/routesetting.lua b/advtrains_interlocking/routesetting.lua index 0207519..a72f644 100644 --- a/advtrains_interlocking/routesetting.lua +++ b/advtrains_interlocking/routesetting.lua @@ -365,7 +365,13 @@ function ilrs.update_route(sigd, tcbs, newrte, cancel) end if newrte then tcbs.routeset = newrte end --atdebug("Setting:",tcbs.routeset) - local succ, rsn, cbts, cblk = ilrs.set_route(sigd, tcbs.routes[tcbs.routeset]) + local succ, rsn, cbts, cblk + if tcbs.routes[tcbs.routeset] then + succ, rsn, cbts, cblk = ilrs.set_route(sigd, tcbs.routes[tcbs.routeset]) + else + succ = false + rsn = attrans("Route state changed.") + end if not succ then tcbs.route_rsn = rsn --atdebug("Routesetting failed:",rsn) |