aboutsummaryrefslogtreecommitdiff
path: root/advtrains_interlocking/database.lua
diff options
context:
space:
mode:
authorSingularis <singularis@volny.cz>2025-04-21 12:31:34 +0200
committerorwell <orwell@bleipb.de>2025-05-27 20:22:02 +0200
commit4f5ec9170e8b7890d2a6e70cab3a39067c84b3e2 (patch)
tree76f54650c8e21bc736be537c9cd0190a2167d46b /advtrains_interlocking/database.lua
parent95a5586e0fe196e2291acaf128b8d1b4f8a32510 (diff)
downloadadvtrains-4f5ec9170e8b7890d2a6e70cab3a39067c84b3e2.tar.gz
advtrains-4f5ec9170e8b7890d2a6e70cab3a39067c84b3e2.tar.bz2
advtrains-4f5ec9170e8b7890d2a6e70cab3a39067c84b3e2.zip
[advtrains,*] přechod na Advtrains 2.5.0 (2. fáze)
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 844d350..9bcd441 100644
--- a/advtrains_interlocking/database.lua
+++ b/advtrains_interlocking/database.lua
@@ -760,7 +760,7 @@ function ildb.update_rs_cache(ts_id)
--atdebug("== Running update_rs_cache for ",ts_id)
-- start on every of the TS's TCBs, walk the track forward and store locks along the way
for start_tcbi, start_tcbs in ipairs(ts.tc_breaks) do
- start_pkey = advtrains.encode_pos(start_tcbs.p)
+ local start_pkey = advtrains.encode_pos(start_tcbs.p)
rscache[start_pkey] = {}
--atdebug("Starting for ",start_tcbi, start_tcbs)
local locks_found = {}
@@ -770,7 +770,7 @@ function ildb.update_rs_cache(ts_id)
-- now result_table contains found route locks. Match them with the other TCBs we have in this section
for end_tcbi, end_tcbs in ipairs(ts.tc_breaks) do
if end_tcbi ~= start_tcbi then
- end_pkey = advtrains.encode_pos(end_tcbs.p)
+ local end_pkey = advtrains.encode_pos(end_tcbs.p)
if result_table[end_pkey] then
--atdebug("Set RSCache entry",end_pkey.."-"..end_pkey,"=",result_table[end_pkey])
local lockstab = result_table[end_pkey]