diff options
-rw-r--r-- | advtrains_line_automation/line_functions.lua | 4 | ||||
-rw-r--r-- | advtrains_line_automation/stoprail.lua | 7 |
2 files changed, 8 insertions, 3 deletions
diff --git a/advtrains_line_automation/line_functions.lua b/advtrains_line_automation/line_functions.lua index de5d133..3a369f7 100644 --- a/advtrains_line_automation/line_functions.lua +++ b/advtrains_line_automation/line_functions.lua @@ -623,7 +623,9 @@ function al.on_train_approach(pos, train_id, train, index, has_entered) local stnname = stn and stn.name or S("Unknown Station") train.text_inside = S("Next Stop:") .. "\n"..stnname end - advtrains.interlocking.ars_set_disable(train, true) + if not stdata.arskeepen then + advtrains.interlocking.ars_set_disable(train, true) + end end end diff --git a/advtrains_line_automation/stoprail.lua b/advtrains_line_automation/stoprail.lua index 21df5f5..e8de1dc 100644 --- a/advtrains_line_automation/stoprail.lua +++ b/advtrains_line_automation/stoprail.lua @@ -108,8 +108,8 @@ local function show_stoprailform(pos, player) "checkbox[7,5.9;reverse;"..S("Reverse train")..";"..(stdata.reverse and "true" or "false").."]".. "tooltip[reverse;"..S("Train will depart in the direction from where it arrived").."]".. "checkbox[7,6.6;kick;"..S("Kick out passengers")..";"..(stdata.kick and "true" or "false").."]".. - "checkbox[7,7.3;arsdis;"..S("Keep ARS enabled").."<NI>;false]".. - "tooltip[arsdis;"..S("Do not disable ARS on approaching. Signals behind the stop rail already set ARS routes when the train arrives, not just before departure. (currently not implemented)").."]".. + "checkbox[7,7.3;arskeepen;"..S("Keep ARS enabled")..";"..(stdata.arskeepen and "true" or "false").."]".. + "tooltip[arskeepen;"..S("Do not disable ARS on approaching. Signals behind the stop rail already set ARS routes when the train arrives, not just before departure. (currently not implemented)").."]".. --"textarea[0.5,7;6,1;arr_action;"..S("Arrival Actions")..";<not yet implemented>]".. --"tooltip[arr_action;"..S("List of actions to perform on arrival (currently not implemented, later will allow actions such as setting line, RC and displays)").."]".. -- departure @@ -161,6 +161,9 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) if fields.keepopen then tmp_checkboxes[pe].keepopen = (fields.keepopen == "true") end + if fields.arskeepen then + tmp_checkboxes[pe].arskeepen = (fields.arskeepen == "true") + end if fields.stn then local new_index = tonumber(fields.stn) |