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.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/advtrains_interlocking/route_ui.lua b/advtrains_interlocking/route_ui.lua
index d1bae63..9ecc947 100644
--- a/advtrains_interlocking/route_ui.lua
+++ b/advtrains_interlocking/route_ui.lua
@@ -106,6 +106,8 @@ function atil.show_route_edit_form(pname, sigd, routeid, sel_rpartidx)
itab(i, "E (none)", "end", nil)
end
+ itab(i, S("(More Options)"), "advanced", nil)
+
if not sel_rpartidx then sel_rpartidx = 1 end
form = form.."textlist[0.5,2;3.5,3.9;routelog;"..table.concat(tab, ",")..";"..(sel_rpartidx or 1)..";false]"
@@ -153,6 +155,10 @@ function atil.show_route_edit_form(pname, sigd, routeid, sel_rpartidx)
-- checkbox for call-on
form = form..string.format("checkbox[4.5,4.0;se_callon;"..S("Call-on (section may be occupied)")..";%s]", rseg.call_on)
end
+ elseif sel_rpart and sel_rpart.advanced then
+ form = form..F.label(4.5, 2, S("Advanced Options:"))
+ -- checkbox for call-on
+ form = form..string.format("checkbox[4.5,4.0;ad_use_rscache;"..S("Auto lock turnouts")..";%s]", route.use_rscache)
elseif sel_rpart and sel_rpart.err then
form = form.."textarea[4.5,2.5;4,4;errorta;"..S("Error:")..";"..tab[sel_rpartidx].."]"
else
@@ -253,6 +259,9 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
return
end
end
+ if fields.ad_use_rscache then
+ route.use_rscache = minetest.is_yes(fields.ad_use_rscache)
+ end
--if fields.noautogen then
-- route.smartroute_generated = nil