diff options
| author | Y. Wang <y5nw@protonmail.com> | 2025-10-04 21:25:43 +0000 |
|---|---|---|
| committer | orwell <orwell@bleipb.de> | 2026-01-29 21:54:50 +0100 |
| commit | bb2e1241b73bb6250f3fa1778525eb58501e22b5 (patch) | |
| tree | 52c5201e333f9ed51e701c2d86204ca259c27036 /advtrains_interlocking/tcb_ts_ui.lua | |
| parent | 862611d89b304c502dd600eed308eb4ad5fbf528 (diff) | |
Indicate routesetting trigger if a route is set
A player observed an issue with a certain setup where ARS is constantly
triggered and the route cannot (easily) be canceled. This patch helps
troubleshoot this issue by indicating the specific cause for
routesetting (in particular, which train triggered ARS).
Diffstat (limited to 'advtrains_interlocking/tcb_ts_ui.lua')
| -rwxr-xr-x | advtrains_interlocking/tcb_ts_ui.lua | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/advtrains_interlocking/tcb_ts_ui.lua b/advtrains_interlocking/tcb_ts_ui.lua index c9cae07..a44fd66 100755 --- a/advtrains_interlocking/tcb_ts_ui.lua +++ b/advtrains_interlocking/tcb_ts_ui.lua @@ -858,12 +858,13 @@ function advtrains.interlocking.show_signalling_form(sigd, pname, sel_rte, calle form = form.."label[0.5,2.5;"..S("A route is requested from this signal:").."]" form = form.."label[0.5,3.0;"..minetest.formspec_escape(rte.name).."]" end + form = form .. "label[0.5,3.5;" .. core.formspec_escape(S("Routesetting trigger: @1", tcbs.routeset_trigger or S("Unknown reason"))) .. "]" if tcbs.route_committed then - form = form.."label[0.5,3.5;"..S("Route has been set.").."]" + form = form.."label[0.5,4;"..S("Route has been set.").."]" else - form = form.."label[0.5,3.5;"..S("Waiting for route to be set...").."]" + form = form.."label[0.5,4;"..S("Waiting for route to be set...").."]" if tcbs.route_rsn then - form = form.."label[0.5,4;"..minetest.formspec_escape(tcbs.route_rsn).."]" + form = form.."label[0.5,4.5;"..minetest.formspec_escape(tcbs.route_rsn).."]" end end if not tcbs.route_auto then @@ -1044,7 +1045,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) end if sel_rte and tcbs.routes[sel_rte] then if fields.setroute then - ilrs.update_route(sigd, tcbs, sel_rte) + ilrs.update_route(sigd, tcbs, sel_rte, nil, S("Manual routesetting by @1", pname)) end if fields.dsproute then local t = os.clock() |
