aboutsummaryrefslogtreecommitdiff
path: root/advtrains_interlocking/signal_aspect_ui.lua
diff options
context:
space:
mode:
authorY. Wang <yw05@forksworld.de>2022-06-11 18:07:00 +0200
committerY. Wang <yw05@forksworld.de>2023-03-23 20:06:02 +0100
commit98c37108762c6d7c9f1d691b84f49bfa65b81b28 (patch)
tree32402fd5365d14470016562f16a5bc5f560eec87 /advtrains_interlocking/signal_aspect_ui.lua
parentd1a0d8f2654d6ee64c1a43de7958b1eadfaff6b0 (diff)
downloadadvtrains-98c37108762c6d7c9f1d691b84f49bfa65b81b28.tar.gz
advtrains-98c37108762c6d7c9f1d691b84f49bfa65b81b28.tar.bz2
advtrains-98c37108762c6d7c9f1d691b84f49bfa65b81b28.zip
Implement primitive distant signaling
Diffstat (limited to 'advtrains_interlocking/signal_aspect_ui.lua')
-rw-r--r--advtrains_interlocking/signal_aspect_ui.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/advtrains_interlocking/signal_aspect_ui.lua b/advtrains_interlocking/signal_aspect_ui.lua
index 4b41187..30b5165 100644
--- a/advtrains_interlocking/signal_aspect_ui.lua
+++ b/advtrains_interlocking/signal_aspect_ui.lua
@@ -43,7 +43,7 @@ local function describe_supported_aspects_t1(suppasp, isasp)
local entries = {}
local selid = 1
for idx, spv in ipairs(suppasp.main) do
- if isasp and spv == isasp.main then
+ if isasp and spv == (isasp.main or false) then
selid = idx
end
entries[idx] = describe_t1_main_aspect(spv)
@@ -67,7 +67,7 @@ local function describe_supported_aspects_t1(suppasp, isasp)
entries = {}
selid = 1
for idx, spv in ipairs(suppasp.dst) do
- if isasp and spv == isasp.dst then
+ if isasp and spv == (isasp.dst or false) then
selid = idx
end
entries[idx] = describe_t1_distant_aspect(spv)
@@ -102,6 +102,8 @@ local function handle_signal_formspec_tabheader_fields(pname, fields)
advtrains.interlocking.show_signal_form(pos, node, pname)
elseif n == 2 then
advtrains.interlocking.show_ip_form(pos, pname)
+ elseif n == 3 then
+ advtrains.interlocking.show_distant_signal_form(pos, pname)
end
return true
end