aboutsummaryrefslogtreecommitdiff
path: root/advtrains_interlocking/route_prog.lua
diff options
context:
space:
mode:
authororwell <orwell@bleipb.de>2025-03-25 22:31:45 +0100
committerorwell <orwell@bleipb.de>2025-03-25 22:31:45 +0100
commit5fc9a3073f5c7800b986b0fbcdeaf98d1387e088 (patch)
treefbaccfa49998d5bc38115fe203723e3fd5ba81ea /advtrains_interlocking/route_prog.lua
parent0b7fdc66bc2fbc47aff7bc6b494e6bd3cff29728 (diff)
downloadadvtrains-5fc9a3073f5c7800b986b0fbcdeaf98d1387e088.tar.gz
advtrains-5fc9a3073f5c7800b986b0fbcdeaf98d1387e088.tar.bz2
advtrains-5fc9a3073f5c7800b986b0fbcdeaf98d1387e088.zip
fix undeclared global accesses
Diffstat (limited to 'advtrains_interlocking/route_prog.lua')
-rw-r--r--advtrains_interlocking/route_prog.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/advtrains_interlocking/route_prog.lua b/advtrains_interlocking/route_prog.lua
index 71ebdf3..81aa133 100644
--- a/advtrains_interlocking/route_prog.lua
+++ b/advtrains_interlocking/route_prog.lua
@@ -175,6 +175,9 @@ function advtrains.interlocking.visualize_route(origin, route, context, tmp_lcks
-- display locks
for pts, state in pairs(v.locks) do
local pos = minetest.string_to_pos(pts)
+ if not pos then
+ pos = advtrains.decode_pos(pts)
+ end
routesprite(context, pos, "fix"..k..pts, "at_il_route_lock.png", "Fixed in state '"..state.."' by route "..route.name.." until segment #"..k.." is freed.")
end
end