aboutsummaryrefslogtreecommitdiff
path: root/advtrains_interlocking/database.lua
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2018-06-29 16:16:55 +0200
committerorwell96 <orwell@bleipb.de>2018-06-29 16:16:55 +0200
commit820503ba81b709cecd86d621dd68e7701fe10222 (patch)
treeae73d7a852b5606e78533eddc907862c1bf50783 /advtrains_interlocking/database.lua
parent86fa42050057af4e4129b8347c10d330842e4489 (diff)
downloadadvtrains-820503ba81b709cecd86d621dd68e7701fe10222.tar.gz
advtrains-820503ba81b709cecd86d621dd68e7701fe10222.tar.bz2
advtrains-820503ba81b709cecd86d621dd68e7701fe10222.zip
Implement trains blocking sections
Diffstat (limited to 'advtrains_interlocking/database.lua')
-rw-r--r--advtrains_interlocking/database.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/advtrains_interlocking/database.lua b/advtrains_interlocking/database.lua
index e9e484c..f4a6871 100644
--- a/advtrains_interlocking/database.lua
+++ b/advtrains_interlocking/database.lua
@@ -382,7 +382,7 @@ end
-- Utilize the traverser to find the track section at the specified position
-- Returns:
--- ts_id - the first found ts
+-- ts_id, origin - the first found ts and the sigd of the found tcb
-- nil - there were no TCBs in TRAVERSER_MAX range of the position, or track ends were reached
-- false - the first found TCB stated End-Of-Interlocking
function ildb.get_ts_at_pos(pos)
@@ -397,7 +397,7 @@ function ildb.get_ts_at_pos(pos)
local tcbs = ildb.get_tcbs(found_tcbs[1])
local ts
if tcbs.ts_id then
- return tcbs.ts_id
+ return tcbs.ts_id, found_tcbs[1]
else
return false
end