From a06758cc1a67aee456fcd28826bfa7ef26e80944 Mon Sep 17 00:00:00 2001 From: Monica Moniot Date: Thu, 8 Dec 2022 14:49:44 -0500 Subject: [PATCH] improved localization --- cybersyn/locale/en/base.cfg | 6 +++--- cybersyn/scripts/factorio-api.lua | 6 +++--- cybersyn/scripts/gui.lua | 18 +++++++++--------- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/cybersyn/locale/en/base.cfg b/cybersyn/locale/en/base.cfg index ef5f3f0..7897d9a 100644 --- a/cybersyn/locale/en/base.cfg +++ b/cybersyn/locale/en/base.cfg @@ -52,11 +52,11 @@ stuck-train=A train from depot __1__ is stuck [cybersyn-gui] combinator-title=Cybernetic combinator operation=Control Mode -comb1=Primary station -comb2=Optional station +comb1=Station depot=Depot refueler=Fuel loader -wagon-manifest=Wagon +comb2=Station info +wagon-manifest=Wagon info network=Network network-tooltip=A signal is used to identify which network this combinator is a member of. Trains will only be dispatched from depots to provide and request stations if they are all identified with the same signal. auto-tooltip=When checked trains in the network are automatically added to the allow-list if every wagon of the train is able to be loaded or unloaded by this station. When unchecked the allow-list is not used and all trains are allowed to park here. diff --git a/cybersyn/scripts/factorio-api.lua b/cybersyn/scripts/factorio-api.lua index 6534aa0..66c9569 100644 --- a/cybersyn/scripts/factorio-api.lua +++ b/cybersyn/scripts/factorio-api.lua @@ -291,11 +291,11 @@ function get_comb_gui_settings(comb) if op == MODE_PRIMARY_IO or op == MODE_PRIMARY_IO_ACTIVE or op == MODE_PRIMARY_IO_FAILED_REQUEST then selected_index = 1 - elseif op == MODE_SECONDARY_IO then - selected_index = 2 elseif op == MODE_DEPOT then - selected_index = 3 + selected_index = 2 elseif op == MODE_REFUELER then + selected_index = 3 + elseif op == MODE_SECONDARY_IO then selected_index = 4 elseif op == MODE_WAGON_MANIFEST then selected_index = 5 diff --git a/cybersyn/scripts/gui.lua b/cybersyn/scripts/gui.lua index 60c54ba..6fc855c 100644 --- a/cybersyn/scripts/gui.lua +++ b/cybersyn/scripts/gui.lua @@ -60,9 +60,9 @@ function gui_opened(comb, player) on_selection_state_changed={"drop-down", comb.unit_number} }, selected_index=selected_index, items={ {"cybersyn-gui.comb1"}, - {"cybersyn-gui.comb2"}, {"cybersyn-gui.depot"}, {"cybersyn-gui.refueler"}, + {"cybersyn-gui.comb2"}, {"cybersyn-gui.wagon-manifest"}, }}, {type="switch", name="switch", ref={"switch"}, allow_none_state=true, switch_state=switch_state, left_label_caption={"cybersyn-gui.switch-provide"}, right_label_caption={"cybersyn-gui.switch-request"}, left_label_tooltip={"cybersyn-gui.switch-provide-tooltip"}, right_label_tooltip={"cybersyn-gui.switch-request-tooltip"}, actions={ @@ -152,26 +152,26 @@ function register_gui_actions() bottom_flow["radio_button"].visible = true bottom_flow["radio_label"].visible = true elseif element.selected_index == 2 then - set_comb_operation(comb, MODE_SECONDARY_IO) - top_flow["switch"].visible = false - all_flow["network_label"].visible = false - bottom_flow["network"].visible = false - bottom_flow["radio_button"].visible = false - bottom_flow["radio_label"].visible = false - elseif element.selected_index == 3 then set_comb_operation(comb, MODE_DEPOT) top_flow["switch"].visible = false all_flow["network_label"].visible = true bottom_flow["network"].visible = true bottom_flow["radio_button"].visible = false bottom_flow["radio_label"].visible = false - elseif element.selected_index == 4 then + elseif element.selected_index == 3 then set_comb_operation(comb, MODE_REFUELER) top_flow["switch"].visible = false all_flow["network_label"].visible = true bottom_flow["network"].visible = true bottom_flow["radio_button"].visible = true bottom_flow["radio_label"].visible = true + elseif element.selected_index == 4 then + set_comb_operation(comb, MODE_SECONDARY_IO) + top_flow["switch"].visible = false + all_flow["network_label"].visible = false + bottom_flow["network"].visible = false + bottom_flow["radio_button"].visible = false + bottom_flow["radio_label"].visible = false elseif element.selected_index == 5 then set_comb_operation(comb, MODE_WAGON_MANIFEST) top_flow["switch"].visible = false