aboutsummaryrefslogtreecommitdiff
path: root/advtrains_interlocking/route_ui.lua
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2019-01-22 21:38:01 +0100
committerorwell96 <orwell@bleipb.de>2019-01-22 21:39:06 +0100
commit7537d2026f71ee7dd43f62812d3e8f8e7454f4d2 (patch)
treed7c933704c0add38a4b1b6823f31027f172b1a18 /advtrains_interlocking/route_ui.lua
parent7c60b8ffd1c1ed9d30de80727023ede4e186d0e6 (diff)
downloadadvtrains-7537d2026f71ee7dd43f62812d3e8f8e7454f4d2.tar.gz
advtrains-7537d2026f71ee7dd43f62812d3e8f8e7454f4d2.tar.bz2
advtrains-7537d2026f71ee7dd43f62812d3e8f8e7454f4d2.zip
another small fix for route_ui
Diffstat (limited to 'advtrains_interlocking/route_ui.lua')
-rw-r--r--advtrains_interlocking/route_ui.lua16
1 files changed, 9 insertions, 7 deletions
diff --git a/advtrains_interlocking/route_ui.lua b/advtrains_interlocking/route_ui.lua
index a843ae4..9b1a0da 100644
--- a/advtrains_interlocking/route_ui.lua
+++ b/advtrains_interlocking/route_ui.lua
@@ -103,14 +103,16 @@ function atil.show_route_edit_form(pname, sigd, routeid)
c_rseg = route[i]
c_lckp = {}
- itab(""..i.." Entry "..sigd_to_string(c_sigd).." -> Sec. "..c_ts.name.." -> Exit "..(c_rseg.next and sigd_to_string(c_rseg.next) or "END"))
+ itab(""..i.." Entry "..sigd_to_string(c_sigd).." -> Sec. "..(c_ts and c_ts.name or "-").." -> Exit "..(c_rseg.next and sigd_to_string(c_rseg.next) or "END"))
- for pts, state in pairs(c_rseg.locks) do
-
- local pos = minetest.string_to_pos(pts)
- itab(" Lock: "..pts.." -> "..state)
- if not advtrains.is_passive(pos) then
- itab("-!- No passive component at "..pts..". Please reconfigure route!")
+ if c_rseg.locks then
+ for pts, state in pairs(c_rseg.locks) do
+
+ local pos = minetest.string_to_pos(pts)
+ itab(" Lock: "..pts.." -> "..state)
+ if not advtrains.is_passive(pos) then
+ itab("-!- No passive component at "..pts..". Please reconfigure route!")
+ end
end
end
-- advance