From 3b8a36166ab236d37011c7e7b044e8be230617fd Mon Sep 17 00:00:00 2001 From: evanpelle Date: Fri, 1 Aug 2025 16:06:59 -0700 Subject: [PATCH] Remove workers & troop ratio bar, only have troops (#1676) ## Description: The troop/worker ratio bar is almost never changed. so remove it and the entire concept of workers. Now there is just troops. Now players get a consistent 1k/s gold. ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I process any text displayed to the user through translateText() and I've added it to the en.json file - [x] I have added relevant tests to the test directory - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced - [x] I have read and accepted the CLA agreement (only required once). ## Please put your Discord username so you can be contacted if a bug or regression is found: evan --- resources/lang/en.json | 4 - src/client/HelpModal.ts | 4 - src/client/LocalServer.ts | 5 - src/client/Transport.ts | 15 --- src/client/UserSettingModal.ts | 11 -- src/client/graphics/layers/ControlPanel.ts | 123 +++--------------- src/core/Schemas.ts | 10 -- src/core/configuration/Config.ts | 9 +- src/core/configuration/DefaultConfig.ts | 57 +++----- src/core/configuration/DevConfig.ts | 4 - src/core/execution/BotExecution.ts | 1 - src/core/execution/DonateTroopExecution.ts | 2 +- src/core/execution/ExecutionManager.ts | 3 - src/core/execution/FakeHumanExecution.ts | 7 - src/core/execution/NukeExecution.ts | 20 +-- src/core/execution/PlayerExecution.ts | 9 +- .../execution/SetTargetTroopRatioExecution.ts | 31 ----- src/core/execution/utils/BotBehavior.ts | 7 +- src/core/game/Game.ts | 10 +- src/core/game/GameUpdates.ts | 3 - src/core/game/GameView.ts | 9 -- src/core/game/PlayerImpl.ts | 38 +----- 22 files changed, 57 insertions(+), 325 deletions(-) delete mode 100644 src/core/execution/SetTargetTroopRatioExecution.ts diff --git a/resources/lang/en.json b/resources/lang/en.json index 7395d4e66..7ee8716b1 100644 --- a/resources/lang/en.json +++ b/resources/lang/en.json @@ -51,7 +51,6 @@ "ui_control_desc": "The control panel contains the following elements:", "ui_pop": "Pop - The amount of units you have, your max population and the rate at which you gain them.", "ui_gold": "Gold - The amount of gold you have and the rate at which you gain it.", - "ui_troops_workers": "Troops and Workers - The amount of allocated troops and workers. Troops are used to attack or defend against attacks. Workers are used to generate gold. You can adjust the number of troops and workers using the slider.", "ui_attack_ratio": "Attack ratio - The amount of troops that will be used when you attack. You can adjust the attack ratio using the slider. Having more attacking troops than defending troops will make you lose fewer troops in the attack, while having less will increase the damage dealt to your attacking troops. The effect doesn't go beyond ratios of 2:1.", "ui_events": "Event panel", "ui_events_desc": "The Event panel displays the latest events, requests and Quick Chat messages. Some examples are:", @@ -289,7 +288,6 @@ "right_click_opens_menu": "Right click opens menu", "attack_ratio_label": "⚔️ Attack Ratio", "attack_ratio_desc": "What percentage of your troops to send in an attack (1–100%)", - "troop_ratio_label": "🪖🛠️ Troops and Workers Ratio", "troop_ratio_desc": "Adjust the balance between troops (for combat) and workers (for gold production) (1–100%)", "territory_patterns_label": "🏳️ Territory Patterns", "territory_patterns_desc": "Choose whether to display territory pattern designs in game", @@ -504,10 +502,8 @@ "default": "Default" }, "control_panel": { - "pop": "Pop", "gold": "Gold", "troops": "Troops", - "workers": "Workers", "attack_ratio": "Attack Ratio" }, "player_panel": { diff --git a/src/client/HelpModal.ts b/src/client/HelpModal.ts index ec53514b9..92fd6e31a 100644 --- a/src/client/HelpModal.ts +++ b/src/client/HelpModal.ts @@ -166,11 +166,7 @@ export class HelpModal extends LitElement {

${translateText("help_modal.ui_control_desc")}