aboutsummaryrefslogtreecommitdiff
path: root/advtrains_interlocking/route_ui.lua
diff options
context:
space:
mode:
Diffstat (limited to 'advtrains_interlocking/route_ui.lua')
-rw-r--r--advtrains_interlocking/route_ui.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/advtrains_interlocking/route_ui.lua b/advtrains_interlocking/route_ui.lua
index 982c579..863fe11 100644
--- a/advtrains_interlocking/route_ui.lua
+++ b/advtrains_interlocking/route_ui.lua
@@ -86,6 +86,9 @@ function atil.show_route_edit_form(pname, sigd, routeid)
form = form.."textlist[0.5,2;3,3.9;rtelog;"..table.concat(tab, ",").."]"
form = form.."button[0.5,6;3,1;back;<<< Back to signal]"
+ if route.smartroute_generated then
+ form = form.."button[3.5,6;2,1;noautogen;Clr Autogen]"
+ end
form = form.."button[5.5,6;3,1;delete;Delete Route]"
--atdebug(route.ars)
@@ -135,6 +138,11 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
advtrains.interlocking.show_signal_aspect_selector(pname, suppasp, route.name, callback, route.aspect or advtrains.interlocking.GENERIC_FREE)
return
end
+
+ if fields.noautogen then
+ route.smartroute_generated = nil
+ end
+
if fields.delete then
-- if something set the route in the meantime, make sure this doesn't break.
atil.route.update_route(sigd, tcbs, nil, true)