From f20028a2a1503c1fec8fa22c214c237ffb56725c Mon Sep 17 00:00:00 2001 From: FloPinguin <25036848+FloPinguin@users.noreply.github.com> Date: Wed, 28 Jan 2026 21:39:30 +0100 Subject: [PATCH] =?UTF-8?q?Show=20troop=20count=20of=20troop=20transport?= =?UTF-8?q?=20boats=20=E2=9B=B5=20(#3056)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description: Troop count display for naval invasion message: Screenshot 2026-01-28 204213 On hover, PlayerInfoOverlay shows the troop count now: Screenshot 2026-01-28 202916 ## 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: FloPinguin --- src/client/graphics/layers/PlayerInfoOverlay.ts | 8 ++++++++ src/core/execution/TransportShipExecution.ts | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/client/graphics/layers/PlayerInfoOverlay.ts b/src/client/graphics/layers/PlayerInfoOverlay.ts index 0bc367ce7..20868a226 100644 --- a/src/client/graphics/layers/PlayerInfoOverlay.ts +++ b/src/client/graphics/layers/PlayerInfoOverlay.ts @@ -504,6 +504,14 @@ export class PlayerInfoOverlay extends LitElement implements Layer { ` : ""} + ${unit.type() === UnitType.TransportShip + ? html` +
+ ${translateText("player_info_overlay.troops")}: + ${renderTroops(unit.troops())} +
+ ` + : ""} `; diff --git a/src/core/execution/TransportShipExecution.ts b/src/core/execution/TransportShipExecution.ts index 0b93aa9fc..fd02d3b84 100644 --- a/src/core/execution/TransportShipExecution.ts +++ b/src/core/execution/TransportShipExecution.ts @@ -114,7 +114,7 @@ export class TransportShipExecution implements Execution { mg.displayIncomingUnit( this.boat.id(), // TODO TranslateText - `Naval invasion incoming from ${this.attacker.displayName()}`, + `Naval invasion incoming from ${this.attacker.displayName()} (${renderTroops(this.boat.troops())})`, MessageType.NAVAL_INVASION_INBOUND, this.target.id(), );