diff --git a/src/core/execution/TradeShipExecution.ts b/src/core/execution/TradeShipExecution.ts index 8bc234e5a..2f18e3b9e 100644 --- a/src/core/execution/TradeShipExecution.ts +++ b/src/core/execution/TradeShipExecution.ts @@ -91,6 +91,7 @@ export class TradeShipExecution implements Execution { return; } else { this._dstPort = ports[0]; + this.tradeShip.setDstPort(this._dstPort); } } diff --git a/src/core/game/Game.ts b/src/core/game/Game.ts index d796eb244..0271a50cd 100644 --- a/src/core/game/Game.ts +++ b/src/core/game/Game.ts @@ -234,6 +234,7 @@ export interface Unit { setWarshipTarget(target: Unit): void; // warship only warshipTarget(): Unit; + setDstPort(dstPort: Unit): void; dstPort(): Unit; // Only for trade ships detonationDst(): TileRef; // Only for nukes diff --git a/src/core/game/UnitImpl.ts b/src/core/game/UnitImpl.ts index 72dd2dc59..4c3039336 100644 --- a/src/core/game/UnitImpl.ts +++ b/src/core/game/UnitImpl.ts @@ -180,4 +180,8 @@ export class UnitImpl implements Unit { dstPort(): Unit { return this._dstPort; } + + setDstPort(dstPort: Unit): void { + this._dstPort = dstPort; + } }