From ecced3c6d01d59a1a0067755cd7e022ab86d24b9 Mon Sep 17 00:00:00 2001 From: VariableVince <24507472+VariableVince@users.noreply.github.com> Date: Wed, 29 Oct 2025 01:47:26 +0100 Subject: [PATCH] Fix: remove duplicate setting of _troops from ControlPanel (#2315) ## Description: PR https://github.com/openfrontio/OpenFrontIO/pull/1676 introduced a duplicate line of code in ControlPanel. Resulting in _troops being set twice in a row. Remove one to keep only the oldest one. ## 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 ## Please put your Discord username so you can be contacted if a bug or regression is found: tryout33 --- src/client/graphics/layers/ControlPanel.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/client/graphics/layers/ControlPanel.ts b/src/client/graphics/layers/ControlPanel.ts index b10c81680..e7c4529e4 100644 --- a/src/client/graphics/layers/ControlPanel.ts +++ b/src/client/graphics/layers/ControlPanel.ts @@ -85,7 +85,6 @@ export class ControlPanel extends LitElement implements Layer { this.updateTroopIncrease(); } - this._troops = player.troops(); this._maxTroops = this.game.config().maxTroops(player); this._gold = player.gold(); this._troops = player.troops();