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")}
- - ${translateText("help_modal.ui_pop")}
- ${translateText("help_modal.ui_gold")}
- -
- ${translateText("help_modal.ui_troops_workers")}
-
-
${translateText("help_modal.ui_attack_ratio")}
diff --git a/src/client/LocalServer.ts b/src/client/LocalServer.ts
index 113e08ce1..24cf46782 100644
--- a/src/client/LocalServer.ts
+++ b/src/client/LocalServer.ts
@@ -97,11 +97,6 @@ export class LocalServer {
return;
}
if (this.paused) {
- if (clientMsg.intent.type === "troop_ratio") {
- // Store troop change events because otherwise they are
- // not registered when game is paused.
- this.intents.push(clientMsg.intent);
- }
return;
}
this.intents.push(clientMsg.intent);
diff --git a/src/client/Transport.ts b/src/client/Transport.ts
index 446642ac2..3a630e60e 100644
--- a/src/client/Transport.ts
+++ b/src/client/Transport.ts
@@ -141,10 +141,6 @@ export class CancelBoatIntentEvent implements GameEvent {
constructor(public readonly unitID: number) {}
}
-export class SendSetTargetTroopRatioEvent implements GameEvent {
- constructor(public readonly ratio: number) {}
-}
-
export class SendWinnerEvent implements GameEvent {
constructor(
public readonly winner: Winner,
@@ -227,9 +223,6 @@ export class Transport {
this.eventBus.on(SendEmbargoIntentEvent, (e) =>
this.onSendEmbargoIntent(e),
);
- this.eventBus.on(SendSetTargetTroopRatioEvent, (e) =>
- this.onSendSetTargetTroopRatioEvent(e),
- );
this.eventBus.on(BuildUnitIntentEvent, (e) => this.onBuildUnitIntent(e));
this.eventBus.on(PauseGameEvent, (e) => this.onPauseGameEvent(e));
@@ -532,14 +525,6 @@ export class Transport {
});
}
- private onSendSetTargetTroopRatioEvent(event: SendSetTargetTroopRatioEvent) {
- this.sendIntent({
- type: "troop_ratio",
- clientID: this.lobbyConfig.clientID,
- ratio: event.ratio,
- });
- }
-
private onBuildUnitIntent(event: BuildUnitIntentEvent) {
this.sendIntent({
type: "build_unit",
diff --git a/src/client/UserSettingModal.ts b/src/client/UserSettingModal.ts
index 0a85cc42c..70fe27834 100644
--- a/src/client/UserSettingModal.ts
+++ b/src/client/UserSettingModal.ts
@@ -342,17 +342,6 @@ export class UserSettingModal extends LitElement {
@change=${this.sliderAttackRatio}
>
-
-
-
${this.showEasterEggSettings
? html`
{
let newAttackRatio =
(parseInt(
@@ -97,13 +71,6 @@ export class ControlPanel extends LitElement implements Layer {
}
tick() {
- if (this.init_) {
- this.eventBus.emit(
- new SendSetTargetTroopRatioEvent(this.targetTroopRatio),
- );
- this.init_ = false;
- }
-
if (!this._isVisible && !this.game.inSpawnPhase()) {
this.setVisibile(true);
}
@@ -115,28 +82,24 @@ export class ControlPanel extends LitElement implements Layer {
}
if (this.game.ticks() % 5 === 0) {
- this.updatePopulationIncrease();
+ this.updateTroopIncrease();
}
- this._population = player.population();
- this._maxPopulation = this.game.config().maxPopulation(player);
+ this._troops = player.troops();
+ this._maxTroops = this.game.config().maxTroops(player);
this._gold = player.gold();
this._troops = player.troops();
- this._workers = player.workers();
- this.popRate = this.game.config().populationIncreaseRate(player) * 10;
- this._goldPerSecond = this.game.config().goldAdditionRate(player) * 10n;
-
- this.currentTroopRatio = player.troops() / player.population();
+ this.troopRate = this.game.config().troopIncreaseRate(player) * 10;
this.requestUpdate();
}
- private updatePopulationIncrease() {
+ private updateTroopIncrease() {
const player = this.game?.myPlayer();
if (player === null) return;
- const popIncreaseRate = this.game.config().populationIncreaseRate(player);
- this._popRateIsIncreasing =
- popIncreaseRate >= this._lastPopulationIncreaseRate;
- this._lastPopulationIncreaseRate = popIncreaseRate;
+ const troopIncreaseRate = this.game.config().troopIncreaseRate(player);
+ this._troopRateIsIncreasing =
+ troopIncreaseRate >= this._lastTroopIncreaseRate;
+ this._lastTroopIncreaseRate = troopIncreaseRate;
}
onAttackRatioChange(newRatio: number) {
@@ -156,19 +119,6 @@ export class ControlPanel extends LitElement implements Layer {
this.requestUpdate();
}
- targetTroops(): number {
- return this._manpower * this.targetTroopRatio;
- }
-
- onTroopChange(newRatio: number) {
- this.eventBus.emit(new SendSetTargetTroopRatioEvent(newRatio));
- }
-
- delta(): number {
- const d = this._population - this.targetTroops();
- return d;
- }
-
render() {
return html`