From c180582f3d81ae4921d748b0a428fcd39c562e57 Mon Sep 17 00:00:00 2001 From: orwell96 Date: Tue, 15 Jan 2019 17:25:31 +0100 Subject: Can disable automatic working without cancelling route --- advtrains_interlocking/tcb_ts_ui.lua | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'advtrains_interlocking') diff --git a/advtrains_interlocking/tcb_ts_ui.lua b/advtrains_interlocking/tcb_ts_ui.lua index 5ebc0b2..91c2697 100644 --- a/advtrains_interlocking/tcb_ts_ui.lua +++ b/advtrains_interlocking/tcb_ts_ui.lua @@ -561,6 +561,7 @@ function advtrains.interlocking.show_signalling_form(sigd, pname, sel_rte) else form = form.."label[0.5,7 ;Automatic Working is active.]" form = form.."label[0.5,7.3;Route is re-set when a train passed.]" + form = form.."button[0.5,7.7; 5,1;noauto;Disable Automatic Working]" end form = form.."button[0.5,6; 5,1;cancelroute;Cancel Route]" @@ -694,6 +695,9 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) if fields.auto then tcbs.route_auto = true end + if fields.noauto then + tcbs.route_auto = false + end advtrains.interlocking.show_signalling_form(sigd, pname, sel_rte) return -- cgit v1.2.3