mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 13:30:43 +00:00
fix: update dst port when ship captured (#217)
This commit is contained in:
@@ -91,6 +91,7 @@ export class TradeShipExecution implements Execution {
|
||||
return;
|
||||
} else {
|
||||
this._dstPort = ports[0];
|
||||
this.tradeShip.setDstPort(this._dstPort);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -180,4 +180,8 @@ export class UnitImpl implements Unit {
|
||||
dstPort(): Unit {
|
||||
return this._dstPort;
|
||||
}
|
||||
|
||||
setDstPort(dstPort: Unit): void {
|
||||
this._dstPort = dstPort;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user