aboutsummaryrefslogtreecommitdiff
path: root/advtrains_interlocking/tcb_ts_ui.lua
diff options
context:
space:
mode:
authororwell <orwell@bleipb.de>2025-01-09 00:57:32 +0100
committerorwell <orwell@bleipb.de>2025-01-09 08:38:09 +0100
commit8c91ce1ec178d6d49f3ddefc57d99eecd0caef3c (patch)
treec5915919c6efe856207d136404846f6ed86670ae /advtrains_interlocking/tcb_ts_ui.lua
parent9bd34f738663cdc268db6399ecb6aaba2d4c9a28 (diff)
downloadadvtrains-8c91ce1ec178d6d49f3ddefc57d99eecd0caef3c.tar.gz
advtrains-8c91ce1ec178d6d49f3ddefc57d99eecd0caef3c.tar.bz2
advtrains-8c91ce1ec178d6d49f3ddefc57d99eecd0caef3c.zip
Various bugfixes found in lunixforks debug
Diffstat (limited to 'advtrains_interlocking/tcb_ts_ui.lua')
-rwxr-xr-xadvtrains_interlocking/tcb_ts_ui.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/advtrains_interlocking/tcb_ts_ui.lua b/advtrains_interlocking/tcb_ts_ui.lua
index 59d3be4..814a11a 100755
--- a/advtrains_interlocking/tcb_ts_ui.lua
+++ b/advtrains_interlocking/tcb_ts_ui.lua
@@ -776,7 +776,7 @@ function advtrains.interlocking.check_route_valid(route, sigd)
if c_rseg.locks then
for pts, state in pairs(c_rseg.locks) do
- local pos = minetest.string_to_pos(pts)
+ local pos = advtrains.decode_pos(pts)
if not advtrains.is_passive(pos) then
return false, "No passive component for lock at "..pts
end
@@ -795,6 +795,9 @@ function advtrains.interlocking.check_route_valid(route, sigd)
i = i + 1
end
-- check end TCB
+ if not c_sigd then
+ return false, "Final TCBS unset (legacy-style buffer route)"
+ end
c_tcbs = ildb.get_tcbs(c_sigd)
if not c_tcbs then
return false, "Final TCBS missing at "..sigd_to_string(c_sigd)