From c8c97abe756594cc85e32da7938ab0716d6a7dad Mon Sep 17 00:00:00 2001 From: DevelopingTom Date: Wed, 14 Jan 2026 18:46:08 +0100 Subject: [PATCH] Fix transportship target tile on construction (#2896) ## Description: The recent pathfinding rework broke the naval invasion target. This change reverts the code to the previous working one. image ## 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: IngloriousTom --- src/core/execution/TransportShipExecution.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/core/execution/TransportShipExecution.ts b/src/core/execution/TransportShipExecution.ts index 73c3b1028..6020d0489 100644 --- a/src/core/execution/TransportShipExecution.ts +++ b/src/core/execution/TransportShipExecution.ts @@ -143,14 +143,9 @@ export class TransportShipExecution implements Execution { this.boat = this.attacker.buildUnit(UnitType.TransportShip, this.src, { troops: this.startTroops, + targetTile: this.dst ?? undefined, }); - if (this.dst !== null) { - this.boat.setTargetTile(this.dst); - } else { - this.boat.setTargetTile(undefined); - } - // Notify the target player about the incoming naval invasion if (this.targetID && this.targetID !== mg.terraNullius().id()) { mg.displayIncomingUnit(