aboutsummaryrefslogtreecommitdiff
path: root/advtrains_interlocking
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2019-01-15 17:43:55 +0100
committerorwell96 <orwell@bleipb.de>2019-01-15 17:43:55 +0100
commita3baead979b62ce0a5dcff36654d7de597cf6708 (patch)
treeb1641ef4127abe8c6c651293ae1e07b822f927ab /advtrains_interlocking
parentc180582f3d81ae4921d748b0a428fcd39c562e57 (diff)
downloadadvtrains-a3baead979b62ce0a5dcff36654d7de597cf6708.tar.gz
advtrains-a3baead979b62ce0a5dcff36654d7de597cf6708.tar.bz2
advtrains-a3baead979b62ce0a5dcff36654d7de597cf6708.zip
Fix Routingcode ARS
Diffstat (limited to 'advtrains_interlocking')
-rw-r--r--advtrains_interlocking/ars.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/advtrains_interlocking/ars.lua b/advtrains_interlocking/ars.lua
index 80ed638..7180ca6 100644
--- a/advtrains_interlocking/ars.lua
+++ b/advtrains_interlocking/ars.lua
@@ -27,16 +27,17 @@ local il = advtrains.interlocking
local function find_rtematch(routes, train)
local default
local line = train.line
- local routingcode
+ local routingcode = train.routingcode
for rteid, route in ipairs(routes) do
if route.ars then
if route.ars.default then
default = rteid
else
for arskey, arsent in ipairs(route.ars) do
+ --atdebug(arsent, line, routingcode)
if arsent.ln and line and arsent.ln == line then
return rteid
- elseif arsent.rc and routingcode and string.match(" "..routingcode.." ", " "..arsent.rc.." ", nil, true) then
+ elseif arsent.rc and routingcode and string.find(" "..routingcode.." ", " "..arsent.rc.." ", nil, true) then
return rteid
end
end