aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2019-01-15 17:25:31 +0100
committerorwell96 <orwell@bleipb.de>2019-01-15 17:25:51 +0100
commitc180582f3d81ae4921d748b0a428fcd39c562e57 (patch)
treeb6b0bb2457392f9dc6c9de7c52b50f2efab21b21
parent3ce98cae9aa588fba0be1e86fc81e7ca6040bd9d (diff)
downloadadvtrains-c180582f3d81ae4921d748b0a428fcd39c562e57.tar.gz
advtrains-c180582f3d81ae4921d748b0a428fcd39c562e57.tar.bz2
advtrains-c180582f3d81ae4921d748b0a428fcd39c562e57.zip
Can disable automatic working without cancelling route
-rw-r--r--advtrains_interlocking/tcb_ts_ui.lua4
1 files changed, 4 insertions, 0 deletions
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