From 8a948be742b4f0d2fa3cbd135156d5c547ed4779 Mon Sep 17 00:00:00 2001 From: orwell Date: Mon, 7 Jul 2025 22:03:19 +0200 Subject: Re-add Unassign Signal button on request of multiple users --- advtrains_interlocking/tcb_ts_ui.lua | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/advtrains_interlocking/tcb_ts_ui.lua b/advtrains_interlocking/tcb_ts_ui.lua index 0111f5e..5ca9c3a 100755 --- a/advtrains_interlocking/tcb_ts_ui.lua +++ b/advtrains_interlocking/tcb_ts_ui.lua @@ -922,6 +922,7 @@ function advtrains.interlocking.show_signalling_form(sigd, pname, sel_rte, calle if hasprivs then form = form.."button[0.5,8;2.5,1;smartroute;"..S("Smart Route").."]" form = form.."button[ 3,8;2.5,1;newroute;"..S("New (Manual)").."]" + form = form.."button_exit[5.5,8;1.5,1;unassign;"..S("Unassign\nSignal").."]" form = form..string.format("checkbox[0.5,8.75;ars;"..S("Automatic routesetting")..";%s]", not tcbs.ars_disabled) form = form..string.format("checkbox[0.5,9.25;dstarstrig;"..S("Distant signal triggers ARS")..";%s]", not tcbs.no_dst_ars_trig) end @@ -995,7 +996,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) local tcbs = ildb.get_tcbs(sigd) if not tcbs then return end - if fields.quit then + if fields.quit and not fields.unassign then sig_pselidx[pname] = nil p_open_sig_form[pname] = nil -- form quit: disable temporary ARS ignore @@ -1082,6 +1083,23 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) end end end + if fields.unassign and hasprivs then + -- unassigning the signal from the tcbs + -- only when no route is set. + -- Routes and name remain saved, in case the player wants to reassign a new signal + if not tcbs.routeset then + local signal_pos = tcbs.signal + ildb.set_sigd_for_signal(signal_pos, nil) + tcbs.signal = nil + tcbs.route_aspect = nil + tcbs.route_remote = nil + p_open_sig_form[pname] = nil -- form is closed/left, do not reopen + minetest.chat_send_player(pname, S("Signal has been unassigned. Name and routes are kept for reuse.")) + return + else + minetest.chat_send_player(pname, S("Please cancel route first!")) + end + end if fields.ars then tcbs.ars_disabled = not minetest.is_yes(fields.ars) -- cgit v1.2.3 From 45c2e57e807e589fa4c5eda93ae9594fa0719680 Mon Sep 17 00:00:00 2001 From: orwell Date: Sun, 20 Jul 2025 22:33:47 +0200 Subject: Unassign-Signal button - add in more contexts --- advtrains_interlocking/tcb_ts_ui.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/advtrains_interlocking/tcb_ts_ui.lua b/advtrains_interlocking/tcb_ts_ui.lua index 5ca9c3a..c9cae07 100755 --- a/advtrains_interlocking/tcb_ts_ui.lua +++ b/advtrains_interlocking/tcb_ts_ui.lua @@ -936,13 +936,16 @@ function advtrains.interlocking.show_signalling_form(sigd, pname, sel_rte, calle if hasprivs then form = form.."button[0.5,4;2.5,1;smartroute;"..S("Smart Route").."]" form = form.."button[ 3,4;2.5,1;newroute;"..S("New (Manual)").."]" + form = form.."button_exit[5.5,4;1.5,1;unassign;"..S("Unassign\nSignal").."]" end elseif caps >= 3 then -- it's a buffer! form = form.."label[0.5,2.5;"..S("This is an always-halt signal (e.g. a buffer)\nNo routes can be set from here.").."]" + form = form.."button_exit[5.5,4;1.5,1;unassign;"..S("Unassign\nSignal").."]" else -- signal caps say it cannot be route start/end form = form.."label[0.5,2.5;"..S("This is a pure distant signal\nNo route is currently set through.").."]" + form = form.."button_exit[5.5,4;1.5,1;unassign;"..S("Unassign\nSignal").."]" end end -- cgit v1.2.3 From a7d3dda9d282ab08b5a70f78510e36825cc981bb Mon Sep 17 00:00:00 2001 From: orwell Date: Sun, 20 Jul 2025 22:35:24 +0200 Subject: Add new translation strings for new features --- .../locale/advtrains_interlocking.de.tr | 6 ++++ .../locale/advtrains_interlocking.fr.tr | 6 ++++ .../locale/advtrains_interlocking.zh_CN.tr | 6 ++++ .../locale/advtrains_interlocking.zh_TW.tr | 6 ++++ .../po/advtrains_interlocking.pot | 28 ++++++++++++++++++- advtrains_interlocking/po/de.po | 32 ++++++++++++++++++++-- advtrains_interlocking/po/fr.po | 32 +++++++++++++++++++--- advtrains_interlocking/po/zh_CN.po | 32 +++++++++++++++++++--- advtrains_interlocking/po/zh_TW.po | 32 +++++++++++++++++++--- 9 files changed, 165 insertions(+), 15 deletions(-) diff --git a/advtrains_interlocking/locale/advtrains_interlocking.de.tr b/advtrains_interlocking/locale/advtrains_interlocking.de.tr index 2c67a9f..3b2bbd6 100644 --- a/advtrains_interlocking/locale/advtrains_interlocking.de.tr +++ b/advtrains_interlocking/locale/advtrains_interlocking.de.tr @@ -13,6 +13,7 @@ Added track section @1 to the route.=Gleisabschnitt @1 zur Fahrstraße hinzugef Advance to next route section=Nächsten Gleisabschnitt hinzufügen Advance/Complete Route=Fahrstraße fortsetzen/beenden Advancing over next section is=Fortsetzen über nächsten Gleisabschnitt hinaus +Auto lock turnouts=automatischer Weichenverschluss Cancel if you are unsure!=Abbrechen, wenn Sie unsicher sind! Cancel route programming=Fahrstraßenprogrammierung abbrechen Cannot program route without a target=Kann keine Fahrstraße ohne Ziel programmieren @@ -42,9 +43,11 @@ WARNING: Route does not end at a signal.=ACHTUNG: Fahrstraße endet nicht an ein impossible at this place.=ist hier nicht möglich. non-interlocked area=nicht-überwachtes Gebiet route continuation.=nicht als Fortsetzung geeignet. +(More Options)=(Mehr Optionen) << Select a route part to edit options=<< Wähle einen Abschnitt, um Optionen zu bearbeiten = ARS Rule List=ARS-Regelliste +Advanced Options:=Erweiterte Optionen: Announce distant signal=Entferntes Hauptsignal ankündigen Back to signal=Zurück zum Signal Call-on (section may be occupied)=Abschnitt darf belegt sein @@ -136,6 +139,7 @@ New (Manual)=Neu (Manuell) No Link=Keine Verknüpfung No routes are yet defined.=Bisher keine Fahrstraßen definiert. No trains on this section.=Keine Züge auf diesem Abschnitt. +Please cancel route first!= Punch components to add fixed locks. (punch anything else @= end)=Schlage auf Komponenten um diese zu sperren (schlage irgendetwas anderes @= Ende) Remove Section=Gleisabschnitt löschen Reset section state=Gleisabschnitt zurücksetzen @@ -156,6 +160,7 @@ Show=Anzeigen Show track section=Gleisabschnitt anzeigen Side @1=Seite @1 Signal at @1=Signal bei @1 +Signal has been unassigned. Name and routes are kept for reuse.=Signal getrennt. Name und Fahrstraßen bleiben im TCB gespeichert. Signal name=Signalname Signal on B side already assigned!=Signal auf Seite B bereits zugewiesen! Signalling=Fahrstraßen stellen @@ -172,6 +177,7 @@ Track Circuit Break=Gleisabschnittsgrenze Track Circuit Break Configuration=Einstellungen der Gleisabschnittsgrenze Track Section Detail - @1=Gleisabschnitts-Details - @1 Trains on this section:=Züge in diesem Abschnitt +Unassign@nSignal=Signalzuw.@ntrennen Unconfigured Track Circuit Break, right-click to assign.=Nicht konfiguierte Gleisabschnittsgrenze (TCB). Rechtsklick zum Zuweisen. Wait for this route to be cancelled in order to do anything here.=Erst nach Auflösung dieser Fahrstraße kann von hier gestellt werden. Waiting for route to be set...=Warten, bis Fahrstraße verfügbar ist... diff --git a/advtrains_interlocking/locale/advtrains_interlocking.fr.tr b/advtrains_interlocking/locale/advtrains_interlocking.fr.tr index 93bbaf2..d5dedef 100644 --- a/advtrains_interlocking/locale/advtrains_interlocking.fr.tr +++ b/advtrains_interlocking/locale/advtrains_interlocking.fr.tr @@ -13,6 +13,7 @@ Added track section @1 to the route.= Advance to next route section= Advance/Complete Route= Advancing over next section is= +Auto lock turnouts= Cancel if you are unsure!= Cancel route programming= Cannot program route without a target= @@ -42,9 +43,11 @@ WARNING: Route does not end at a signal.= impossible at this place.= non-interlocked area= route continuation.= +(More Options)= << Select a route part to edit options= #=Siège par défaut ARS Rule List= +Advanced Options:= #Announce distant signal=Signal distant métro de Munich ( Back to signal= Call-on (section may be occupied)= @@ -136,6 +139,7 @@ New (Manual)= No Link= No routes are yet defined.= No trains on this section.= +Please cancel route first!= Punch components to add fixed locks. (punch anything else @= end)= #Remove Section=Routage à distance Reset section state= @@ -156,6 +160,7 @@ Show= Show track section= Side @1= #Signal at @1=Signal +Signal has been unassigned. Name and routes are kept for reuse.= #Signal name=Signal Signal on B side already assigned!= #Signalling=Signal @@ -172,6 +177,7 @@ This will remove the track section and set all its end points to End Of Interloc #Track Circuit Break Configuration=Il y a un "Track Circuit Break" ici. Track Section Detail - @1= Trains on this section:= +#Unassign@nSignal=Sémaphore Unconfigured Track Circuit Break, right-click to assign.= Wait for this route to be cancelled in order to do anything here.= Waiting for route to be set...= diff --git a/advtrains_interlocking/locale/advtrains_interlocking.zh_CN.tr b/advtrains_interlocking/locale/advtrains_interlocking.zh_CN.tr index 701d283..84ce27e 100644 --- a/advtrains_interlocking/locale/advtrains_interlocking.zh_CN.tr +++ b/advtrains_interlocking/locale/advtrains_interlocking.zh_CN.tr @@ -13,6 +13,7 @@ Added track section @1 to the route.= Advance to next route section= Advance/Complete Route= Advancing over next section is= +Auto lock turnouts= Cancel if you are unsure!= Cancel route programming= Cannot program route without a target= @@ -42,9 +43,11 @@ WARNING: Route does not end at a signal.= impossible at this place.= non-interlocked area= route continuation.= +(More Options)= << Select a route part to edit options= #=默认座位 ARS Rule List= +Advanced Options:= Announce distant signal= Back to signal= Call-on (section may be occupied)= @@ -136,6 +139,7 @@ New (Manual)= No Link= No routes are yet defined.= No trains on this section.= +Please cancel route first!= Punch components to add fixed locks. (punch anything else @= end)= Remove Section= Reset section state= @@ -156,6 +160,7 @@ Show= Show track section= Side @1= #Signal at @1=信号灯 +Signal has been unassigned. Name and routes are kept for reuse.= #Signal name=信号灯 Signal on B side already assigned!= #Signalling=信号灯 @@ -172,6 +177,7 @@ Track Circuit Break= Track Circuit Break Configuration= Track Section Detail - @1= Trains on this section:= +#Unassign@nSignal=臂板信号机 Unconfigured Track Circuit Break, right-click to assign.= Wait for this route to be cancelled in order to do anything here.= Waiting for route to be set...= diff --git a/advtrains_interlocking/locale/advtrains_interlocking.zh_TW.tr b/advtrains_interlocking/locale/advtrains_interlocking.zh_TW.tr index 64e1626..6cc9ba6 100644 --- a/advtrains_interlocking/locale/advtrains_interlocking.zh_TW.tr +++ b/advtrains_interlocking/locale/advtrains_interlocking.zh_TW.tr @@ -13,6 +13,7 @@ Added track section @1 to the route.= Advance to next route section= Advance/Complete Route= Advancing over next section is= +Auto lock turnouts= Cancel if you are unsure!= Cancel route programming= Cannot program route without a target= @@ -42,9 +43,11 @@ WARNING: Route does not end at a signal.= impossible at this place.= non-interlocked area= route continuation.= +(More Options)= << Select a route part to edit options= #=預設座位 ARS Rule List= +Advanced Options:= Announce distant signal= Back to signal= Call-on (section may be occupied)= @@ -136,6 +139,7 @@ New (Manual)= No Link= No routes are yet defined.= No trains on this section.= +Please cancel route first!= Punch components to add fixed locks. (punch anything else @= end)= Remove Section= Reset section state= @@ -156,6 +160,7 @@ Show= Show track section= Side @1= #Signal at @1=色燈號誌機 +Signal has been unassigned. Name and routes are kept for reuse.= #Signal name=色燈號誌機 Signal on B side already assigned!= #Signalling=色燈號誌機 @@ -172,6 +177,7 @@ Track Circuit Break= Track Circuit Break Configuration= Track Section Detail - @1= Trains on this section:= +#Unassign@nSignal=臂木式號誌機 Unconfigured Track Circuit Break, right-click to assign.= Wait for this route to be cancelled in order to do anything here.= Waiting for route to be set...= diff --git a/advtrains_interlocking/po/advtrains_interlocking.pot b/advtrains_interlocking/po/advtrains_interlocking.pot index 312a843..f976ac3 100644 --- a/advtrains_interlocking/po/advtrains_interlocking.pot +++ b/advtrains_interlocking/po/advtrains_interlocking.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: advtrains_interlocking\n" "Report-Msgid-Bugs-To: advtrains-discuss@lists.sr.ht\n" -"POT-Creation-Date: 2025-06-11 23:21+0200\n" +"POT-Creation-Date: 2025-07-20 22:27+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -113,6 +113,10 @@ msgstr "" msgid "Enter Route Name" msgstr "" +#: route_prog.lua route_ui.lua +msgid "Auto lock turnouts" +msgstr "" + #: route_prog.lua msgid "Save Route" msgstr "" @@ -225,6 +229,10 @@ msgstr "" msgid "TCB at @1 has different section than previous TCB" msgstr "" +#: route_ui.lua +msgid "(More Options)" +msgstr "" + #: route_ui.lua signal_aspect_ui.lua msgid "Signal Aspect:" msgstr "" @@ -249,6 +257,10 @@ msgstr "" msgid "Call-on (section may be occupied)" msgstr "" +#: route_ui.lua +msgid "Advanced Options:" +msgstr "" + #: route_ui.lua msgid "Error:" msgstr "" @@ -717,6 +729,12 @@ msgstr "" msgid "New (Manual)" msgstr "" +#: tcb_ts_ui.lua +msgid "" +"Unassign\n" +"Signal" +msgstr "" + #: tcb_ts_ui.lua msgid "Automatic routesetting" msgstr "" @@ -755,6 +773,14 @@ msgid "" "through edit dialog!" msgstr "" +#: tcb_ts_ui.lua +msgid "Signal has been unassigned. Name and routes are kept for reuse." +msgstr "" + +#: tcb_ts_ui.lua +msgid "Please cancel route first!" +msgstr "" + #: tool.lua msgid "Route lock inspector" msgstr "" diff --git a/advtrains_interlocking/po/de.po b/advtrains_interlocking/po/de.po index d3aa1dc..c989963 100644 --- a/advtrains_interlocking/po/de.po +++ b/advtrains_interlocking/po/de.po @@ -2,8 +2,8 @@ msgid "" msgstr "" "Project-Id-Version: advtrains\n" "Report-Msgid-Bugs-To: advtrains-discuss@lists.sr.ht\n" -"POT-Creation-Date: 2025-06-11 23:21+0200\n" -"PO-Revision-Date: 2025-06-12 22:55+0200\n" +"POT-Creation-Date: 2025-07-20 22:27+0200\n" +"PO-Revision-Date: 2025-07-20 22:31+0200\n" "Last-Translator: Y. Wang \n" "Language-Team: German\n" "Language: de\n" @@ -73,6 +73,10 @@ msgstr "Fahrstraße fortsetzen/beenden" msgid "Advancing over next section is" msgstr "Fortsetzen über nächsten Gleisabschnitt hinaus" +#: route_prog.lua route_ui.lua +msgid "Auto lock turnouts" +msgstr "automatischer Weichenverschluss" + #: route_prog.lua msgid "Cancel if you are unsure!" msgstr "Abbrechen, wenn Sie unsicher sind!" @@ -197,6 +201,10 @@ msgstr "nicht-überwachtes Gebiet" msgid "route continuation." msgstr "nicht als Fortsetzung geeignet." +#: route_ui.lua +msgid "(More Options)" +msgstr "(Mehr Optionen)" + #: route_ui.lua msgid "<< Select a route part to edit options" msgstr "<< Wähle einen Abschnitt, um Optionen zu bearbeiten" @@ -209,6 +217,10 @@ msgstr "" msgid "ARS Rule List" msgstr "ARS-Regelliste" +#: route_ui.lua +msgid "Advanced Options:" +msgstr "Erweiterte Optionen:" + #: route_ui.lua msgid "Announce distant signal" msgstr "Entferntes Hauptsignal ankündigen" @@ -606,6 +618,10 @@ msgstr "Bisher keine Fahrstraßen definiert." msgid "No trains on this section." msgstr "Keine Züge auf diesem Abschnitt." +#: tcb_ts_ui.lua +msgid "Please cancel route first!" +msgstr "" + #: tcb_ts_ui.lua msgid "Punch components to add fixed locks. (punch anything else = end)" msgstr "" @@ -688,6 +704,10 @@ msgstr "Seite @1" msgid "Signal at @1" msgstr "Signal bei @1" +#: tcb_ts_ui.lua +msgid "Signal has been unassigned. Name and routes are kept for reuse." +msgstr "Signal getrennt. Name und Fahrstraßen bleiben im TCB gespeichert." + #: tcb_ts_ui.lua msgid "Signal name" msgstr "Signalname" @@ -771,6 +791,14 @@ msgstr "Gleisabschnitts-Details - @1" msgid "Trains on this section:" msgstr "Züge in diesem Abschnitt" +#: tcb_ts_ui.lua +msgid "" +"Unassign\n" +"Signal" +msgstr "" +"Signalzuw.\n" +"trennen" + #: tcb_ts_ui.lua msgid "Unconfigured Track Circuit Break, right-click to assign." msgstr "" diff --git a/advtrains_interlocking/po/fr.po b/advtrains_interlocking/po/fr.po index 1ebf2bb..ee03471 100644 --- a/advtrains_interlocking/po/fr.po +++ b/advtrains_interlocking/po/fr.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: advtrains\n" "Report-Msgid-Bugs-To: advtrains-discuss@lists.sr.ht\n" -"POT-Creation-Date: 2025-06-11 23:21+0200\n" +"POT-Creation-Date: 2025-07-20 22:27+0200\n" "PO-Revision-Date: 2025-03-25 15:06+0100\n" "Last-Translator: Tanavit \n" "Language-Team: French\n" @@ -70,6 +70,10 @@ msgstr "" msgid "Advancing over next section is" msgstr "" +#: route_prog.lua route_ui.lua +msgid "Auto lock turnouts" +msgstr "" + #: route_prog.lua msgid "Cancel if you are unsure!" msgstr "" @@ -191,6 +195,10 @@ msgstr "" msgid "route continuation." msgstr "" +#: route_ui.lua +msgid "(More Options)" +msgstr "" + #: route_ui.lua msgid "<< Select a route part to edit options" msgstr "" @@ -204,6 +212,10 @@ msgstr "Siège par défaut" msgid "ARS Rule List" msgstr "" +#: route_ui.lua +msgid "Advanced Options:" +msgstr "" + #: route_ui.lua #, fuzzy msgid "Announce distant signal" @@ -583,6 +595,10 @@ msgstr "" msgid "No trains on this section." msgstr "" +#: tcb_ts_ui.lua +msgid "Please cancel route first!" +msgstr "" + #: tcb_ts_ui.lua msgid "Punch components to add fixed locks. (punch anything else = end)" msgstr "" @@ -667,6 +683,10 @@ msgstr "" msgid "Signal at @1" msgstr "Signal" +#: tcb_ts_ui.lua +msgid "Signal has been unassigned. Name and routes are kept for reuse." +msgstr "" + #: tcb_ts_ui.lua #, fuzzy msgid "Signal name" @@ -744,6 +764,13 @@ msgstr "" msgid "Trains on this section:" msgstr "" +#: tcb_ts_ui.lua +#, fuzzy +msgid "" +"Unassign\n" +"Signal" +msgstr "Sémaphore" + #: tcb_ts_ui.lua msgid "Unconfigured Track Circuit Break, right-click to assign." msgstr "" @@ -1144,9 +1171,6 @@ msgstr "Vous n'êtes pas autorisé à configurer cette voie." #~ msgid "Kick out passengers" #~ msgstr "Éjecter les passagers" -#~ msgid "Lampless Signal" -#~ msgstr "Sémaphore" - #~ msgid "Left" #~ msgstr "Gauche" diff --git a/advtrains_interlocking/po/zh_CN.po b/advtrains_interlocking/po/zh_CN.po index 48c5805..848b26b 100644 --- a/advtrains_interlocking/po/zh_CN.po +++ b/advtrains_interlocking/po/zh_CN.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: advtrains\n" "Report-Msgid-Bugs-To: advtrains-discuss@lists.sr.ht\n" -"POT-Creation-Date: 2025-06-11 23:21+0200\n" +"POT-Creation-Date: 2025-07-20 22:27+0200\n" "PO-Revision-Date: 2023-10-09 11:24+0200\n" "Last-Translator: Y. Wang \n" "Language-Team: Chinese (Simplified)\n" @@ -70,6 +70,10 @@ msgstr "" msgid "Advancing over next section is" msgstr "" +#: route_prog.lua route_ui.lua +msgid "Auto lock turnouts" +msgstr "" + #: route_prog.lua msgid "Cancel if you are unsure!" msgstr "" @@ -188,6 +192,10 @@ msgstr "" msgid "route continuation." msgstr "" +#: route_ui.lua +msgid "(More Options)" +msgstr "" + #: route_ui.lua msgid "<< Select a route part to edit options" msgstr "" @@ -201,6 +209,10 @@ msgstr "默认座位" msgid "ARS Rule List" msgstr "" +#: route_ui.lua +msgid "Advanced Options:" +msgstr "" + #: route_ui.lua msgid "Announce distant signal" msgstr "" @@ -577,6 +589,10 @@ msgstr "" msgid "No trains on this section." msgstr "" +#: tcb_ts_ui.lua +msgid "Please cancel route first!" +msgstr "" + #: tcb_ts_ui.lua msgid "Punch components to add fixed locks. (punch anything else = end)" msgstr "" @@ -660,6 +676,10 @@ msgstr "" msgid "Signal at @1" msgstr "信号灯" +#: tcb_ts_ui.lua +msgid "Signal has been unassigned. Name and routes are kept for reuse." +msgstr "" + #: tcb_ts_ui.lua #, fuzzy msgid "Signal name" @@ -735,6 +755,13 @@ msgstr "" msgid "Trains on this section:" msgstr "" +#: tcb_ts_ui.lua +#, fuzzy +msgid "" +"Unassign\n" +"Signal" +msgstr "臂板信号机" + #: tcb_ts_ui.lua msgid "Unconfigured Track Circuit Break, right-click to assign." msgstr "" @@ -1007,9 +1034,6 @@ msgstr "您不能调整这段轨道。" #~ msgid "Kick out passengers" #~ msgstr "踢出乘客" -#~ msgid "Lampless Signal" -#~ msgstr "臂板信号机" - #~ msgid "Line" #~ msgstr "火车线路" diff --git a/advtrains_interlocking/po/zh_TW.po b/advtrains_interlocking/po/zh_TW.po index 6f07afb..a1de211 100644 --- a/advtrains_interlocking/po/zh_TW.po +++ b/advtrains_interlocking/po/zh_TW.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: advtrains\n" "Report-Msgid-Bugs-To: advtrains-discuss@lists.sr.ht\n" -"POT-Creation-Date: 2025-06-11 23:21+0200\n" +"POT-Creation-Date: 2025-07-20 22:27+0200\n" "PO-Revision-Date: 2023-10-09 11:31+0200\n" "Last-Translator: Y. Wang \n" "Language-Team: Chinese (Traditional)\n" @@ -70,6 +70,10 @@ msgstr "" msgid "Advancing over next section is" msgstr "" +#: route_prog.lua route_ui.lua +msgid "Auto lock turnouts" +msgstr "" + #: route_prog.lua msgid "Cancel if you are unsure!" msgstr "" @@ -188,6 +192,10 @@ msgstr "" msgid "route continuation." msgstr "" +#: route_ui.lua +msgid "(More Options)" +msgstr "" + #: route_ui.lua msgid "<< Select a route part to edit options" msgstr "" @@ -201,6 +209,10 @@ msgstr "預設座位" msgid "ARS Rule List" msgstr "" +#: route_ui.lua +msgid "Advanced Options:" +msgstr "" + #: route_ui.lua msgid "Announce distant signal" msgstr "" @@ -577,6 +589,10 @@ msgstr "" msgid "No trains on this section." msgstr "" +#: tcb_ts_ui.lua +msgid "Please cancel route first!" +msgstr "" + #: tcb_ts_ui.lua msgid "Punch components to add fixed locks. (punch anything else = end)" msgstr "" @@ -660,6 +676,10 @@ msgstr "" msgid "Signal at @1" msgstr "色燈號誌機" +#: tcb_ts_ui.lua +msgid "Signal has been unassigned. Name and routes are kept for reuse." +msgstr "" + #: tcb_ts_ui.lua #, fuzzy msgid "Signal name" @@ -735,6 +755,13 @@ msgstr "" msgid "Trains on this section:" msgstr "" +#: tcb_ts_ui.lua +#, fuzzy +msgid "" +"Unassign\n" +"Signal" +msgstr "臂木式號誌機" + #: tcb_ts_ui.lua msgid "Unconfigured Track Circuit Break, right-click to assign." msgstr "" @@ -1007,9 +1034,6 @@ msgstr "您不能調整這段軌道。" #~ msgid "Kick out passengers" #~ msgstr "踢出乘客" -#~ msgid "Lampless Signal" -#~ msgstr "臂木式號誌機" - #~ msgid "Line" #~ msgstr "火車線路" -- cgit v1.2.3 From 82a5c5bc5dfce87d3021c5d55b89b2ff94e77341 Mon Sep 17 00:00:00 2001 From: 1F616EMO Date: Tue, 12 Aug 2025 14:22:24 +0800 Subject: Add atc_pos to give information about where the LuaATC component is Adds an atc_pos table for getting the LuaATC component's coordinates. Useful to generate unique ID for LuaATC components, e.g. train position checkpoints. --- advtrains_luaautomation/active_common.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/advtrains_luaautomation/active_common.lua b/advtrains_luaautomation/active_common.lua index d0ae2a4..da0a99b 100644 --- a/advtrains_luaautomation/active_common.lua +++ b/advtrains_luaautomation/active_common.lua @@ -146,6 +146,11 @@ function ac.run_in_env(pos, evtdata, customfct_p, ignore_no_code) customfct.clear_interrupts=function() atlatc.interrupt.clear_ints_at_pos(pos) end + customfct.atc_pos = { + x = pos.x, + y = pos.y, + z = pos.z, + } -- add digiline_send function, if digiline is loaded if minetest.global_exists("digiline") then customfct.digiline_send=function(channel, msg) -- cgit v1.2.3 From b2601692790cc0d4ca91c8e0d525923340feaa51 Mon Sep 17 00:00:00 2001 From: Maverick2797 Date: Sat, 10 May 2025 23:32:33 +0800 Subject: Fix some typos from previous commits - Fix LuaATC craft recipe setting name - Fix "ipars" typo in LuaATC get_fc_index() --- advtrains_luaautomation/atc_rail.lua | 2 +- advtrains_luaautomation/init.lua | 2 +- advtrains_luaautomation/settingtypes.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/advtrains_luaautomation/atc_rail.lua b/advtrains_luaautomation/atc_rail.lua index 594de5c..4706fdf 100644 --- a/advtrains_luaautomation/atc_rail.lua +++ b/advtrains_luaautomation/atc_rail.lua @@ -106,7 +106,7 @@ function r.fire_event(pos, evtdata, appr_internal) get_fc_index = function() if not train_id then return end local fc_index_list = {} - for widx, wagon_id in ipars(train.trainparts) do + for widx, wagon_id in ipairs(train.trainparts) do fc_index_list[widx] = advtrains.wagons[wagon_id].fcind or 1 end return fc_index_list diff --git a/advtrains_luaautomation/init.lua b/advtrains_luaautomation/init.lua index 753340d..1947993 100644 --- a/advtrains_luaautomation/init.lua +++ b/advtrains_luaautomation/init.lua @@ -46,7 +46,7 @@ dofile(mp.."/pcnaming.lua") dofile(mp.."/chatcmds.lua") -if minetest.settings:get_bool("advtrains_luaautomation_enable_atlac_recipes",false) == true then +if minetest.settings:get_bool("advtrains_luaautomation_enable_luaatc_recipes",false) == true then dofile(mp.."/recipes.lua") end diff --git a/advtrains_luaautomation/settingtypes.txt b/advtrains_luaautomation/settingtypes.txt index 20ed52e..641254a 100644 --- a/advtrains_luaautomation/settingtypes.txt +++ b/advtrains_luaautomation/settingtypes.txt @@ -1,2 +1,2 @@ # Enable or disable craft recipes for LuaATC components -advtrains_luaautomation_enable_atlac_recipes (Enable LuaATC component craft recipes) bool true \ No newline at end of file +advtrains_luaautomation_enable_luaatc_recipes (Enable LuaATC component craft recipes) bool true -- cgit v1.2.3 From f06cbfee2621e832f53cd142032e37bc674b587b Mon Sep 17 00:00:00 2001 From: maxchen32 Date: Sun, 27 Jul 2025 14:22:20 +0800 Subject: Make poconvert.lua able to handle CRLF line breaks. I found that poconvert.lua did not work at all on Windows. After a bit of investigation I realized that it was the CRLF line breaks, and this modification I made allows the code to cope with both CRLF, LF and CR line breaks. --- advtrains/poconvert.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/advtrains/poconvert.lua b/advtrains/poconvert.lua index 74f962e..2934a13 100644 --- a/advtrains/poconvert.lua +++ b/advtrains/poconvert.lua @@ -72,7 +72,7 @@ local function readcomment_add_flags(flags, s) end local function readcomment_aux(str, pos) - local _, epos, sval = string.find(str, "^\n*#([^\n]*)", pos) + local _, epos, sval = string.find(str, "^[\r\n]*#([^\r\n]*)", pos) if not epos then return nil end -- cgit v1.2.3 From 382f4204e0dba9503661fcd1c9d7c0dfa6fe001b Mon Sep 17 00:00:00 2001 From: orwell Date: Tue, 26 Aug 2025 22:23:37 +0200 Subject: Re-add attrans with added warning --- advtrains/init.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/advtrains/init.lua b/advtrains/init.lua index cd63104..b554dd4 100644 --- a/advtrains/init.lua +++ b/advtrains/init.lua @@ -61,6 +61,12 @@ advtrains.translate = core.get_translator("advtrains") -- Get current translator local S = advtrains.translate +-- define attrans for old mods +attrans = function(...) + atwarn("Mod",core.get_current_modname(),"still uses attrans(), please update or inform mod author") + return S(...) +end + -- Use a global slowdown factor to slow down train movements. Now a setting advtrains.DTIME_LIMIT = tonumber(minetest.settings:get("advtrains_dtime_limit")) or 0.2 advtrains.SAVE_INTERVAL = tonumber(minetest.settings:get("advtrains_save_interval")) or 60 -- cgit v1.2.3