fix: update dst port when ship captured (#217)

This commit is contained in:
Ilan Schemoul
2025-03-13 14:31:41 +01:00
committed by GitHub
parent 8124651382
commit cb3f36a74f
3 changed files with 6 additions and 0 deletions
+1
View File
@@ -91,6 +91,7 @@ export class TradeShipExecution implements Execution {
return;
} else {
this._dstPort = ports[0];
this.tradeShip.setDstPort(this._dstPort);
}
}
+1
View File
@@ -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
+4
View File
@@ -180,4 +180,8 @@ export class UnitImpl implements Unit {
dstPort(): Unit {
return this._dstPort;
}
setDstPort(dstPort: Unit): void {
this._dstPort = dstPort;
}
}