diff options
author | orwell <orwell@bleipb.de> | 2024-07-20 18:02:33 +0200 |
---|---|---|
committer | orwell <orwell@bleipb.de> | 2024-07-20 18:02:33 +0200 |
commit | baa50c03920fd0a563fce09929f3d56c3374e8bd (patch) | |
tree | b7a8cf7b94952a7db823cab1de6860e57fd53c25 /advtrains_interlocking/tcb_ts_ui.lua | |
parent | c145e5db7473a0baab6438d7c2ed9616948d8387 (diff) | |
download | advtrains-baa50c03920fd0a563fce09929f3d56c3374e8bd.tar.gz advtrains-baa50c03920fd0a563fce09929f3d56c3374e8bd.tar.bz2 advtrains-baa50c03920fd0a563fce09929f3d56c3374e8bd.zip |
ARS supports triggering distant signal, other bugfixes
Diffstat (limited to 'advtrains_interlocking/tcb_ts_ui.lua')
-rwxr-xr-x | advtrains_interlocking/tcb_ts_ui.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/advtrains_interlocking/tcb_ts_ui.lua b/advtrains_interlocking/tcb_ts_ui.lua index 7f75bb9..82a57cf 100755 --- a/advtrains_interlocking/tcb_ts_ui.lua +++ b/advtrains_interlocking/tcb_ts_ui.lua @@ -645,6 +645,7 @@ function advtrains.interlocking.show_signalling_form(sigd, pname, sel_rte, calle form = form.."button[0.5,8;2.5,1;smartroute;Smart Route]" form = form.."button[ 3,8;2.5,1;newroute;New (Manual)]" form = form..string.format("checkbox[0.5,8.75;ars;Automatic routesetting;%s]", not tcbs.ars_disabled) + form = form..string.format("checkbox[0.5,9.25;dstarstrig;Distant signal triggers ARS;%s]", not tcbs.no_dst_ars_trig) end elseif sigd_equal(tcbs.route_origin, sigd) then -- something has gone wrong: tcbs.routeset should have been set... @@ -669,7 +670,7 @@ end function advtrains.interlocking.update_player_forms(sigd) for pname, tsigd in pairs(p_open_sig_form) do if advtrains.interlocking.sigd_equal(sigd, tsigd) then - advtrains.interlocking.show_signalling_form(sigd, pname, nil) + advtrains.interlocking.show_signalling_form(sigd, pname, nil, true) end end end @@ -761,6 +762,10 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) tcbs.ars_disabled = not minetest.is_yes(fields.ars) end + if fields.dstarstrig then + tcbs.no_dst_ars_trig = not minetest.is_yes(fields.dstarstrig) + end + if fields.auto then tcbs.route_auto = true end |