aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authororwell <orwell@bleipb.de>2024-12-11 01:13:23 +0100
committerorwell <orwell@bleipb.de>2024-12-11 01:13:23 +0100
commitfe620eccb283a9d6e15c8fdbf564e8e2142da749 (patch)
tree20722076209096f41a2a28d9e2708db978c1de80
parent67ace4bde0edd0d40c63168758ac4b4878135946 (diff)
downloadadvtrains-fe620eccb283a9d6e15c8fdbf564e8e2142da749.tar.gz
advtrains-fe620eccb283a9d6e15c8fdbf564e8e2142da749.tar.bz2
advtrains-fe620eccb283a9d6e15c8fdbf564e8e2142da749.zip
ks signals: fix signs; mark routes with illegal end TCB as invalid
-rwxr-xr-xadvtrains_interlocking/tcb_ts_ui.lua5
-rwxr-xr-xadvtrains_signals_ks/init.lua9
2 files changed, 10 insertions, 4 deletions
diff --git a/advtrains_interlocking/tcb_ts_ui.lua b/advtrains_interlocking/tcb_ts_ui.lua
index 5bd6c08..abcdf61 100755
--- a/advtrains_interlocking/tcb_ts_ui.lua
+++ b/advtrains_interlocking/tcb_ts_ui.lua
@@ -780,6 +780,11 @@ function advtrains.interlocking.check_route_valid(route, sigd)
c_sigd = c_rseg.next
i = i + 1
end
+ -- check end TCB
+ c_tcbs = ildb.get_tcbs(c_sigd)
+ if not c_tcbs then
+ return false, "Final TCBS missing at "..sigd_to_string(c_sigd)
+ end
return true, nil, c_sigd
end
diff --git a/advtrains_signals_ks/init.lua b/advtrains_signals_ks/init.lua
index a85bec9..eb23930 100755
--- a/advtrains_signals_ks/init.lua
+++ b/advtrains_signals_ks/init.lua
@@ -411,11 +411,12 @@ for _, rtab in ipairs({
advtrains = {
get_aspect_info = asp,
trackworker_next_rot = "advtrains_signals_ks:"..prefix.."_"..typ.."_"..rtab.nextrot,
- trackworker_rot_incr_param2 = (rot=="60")
+ trackworker_rot_incr_param2 = (rot=="60"),
+ trackworker_next_var = "advtrains_signals_ks:"..prefix.."_"..nxt.."_"..rot,
},
- on_rightclick = advtrains.interlocking.signal_rc_handler,
- can_dig = advtrains.interlocking.signal_can_dig,
- after_dig_node = advtrains.interlocking.signal_after_dig,
+ on_rightclick = advtrains.interlocking.signal.on_rightclick,
+ can_dig = advtrains.interlocking.signal.can_dig,
+ after_dig_node = advtrains.interlocking.signal.after_dig,
})
-- rotatable by trackworker
--TODO add rotation using trackworker