mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-30 10:12:14 +00:00
don't alert on delete trade ship or shell
This commit is contained in:
@@ -25,7 +25,7 @@ export class ShellExecution implements Execution {
|
||||
return
|
||||
}
|
||||
if (!this.target.isActive()) {
|
||||
this.shell.delete()
|
||||
this.shell.delete(false)
|
||||
this.active = false
|
||||
return
|
||||
}
|
||||
@@ -35,7 +35,7 @@ export class ShellExecution implements Execution {
|
||||
case PathFindResultType.Completed:
|
||||
this.active = false
|
||||
this.target.delete()
|
||||
this.shell.delete()
|
||||
this.shell.delete(false)
|
||||
return
|
||||
case PathFindResultType.NextTile:
|
||||
this.shell.move(result.tile)
|
||||
@@ -45,7 +45,7 @@ export class ShellExecution implements Execution {
|
||||
case PathFindResultType.PathNotFound:
|
||||
console.log(`Shell ${this.shell} could not find target`)
|
||||
this.active = false
|
||||
this.shell.delete()
|
||||
this.shell.delete(false)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ export class TradeShipExecution implements Execution {
|
||||
}
|
||||
|
||||
if (!this.wasCaptured && (!this.dstPort.isActive() || !this.tradeShip.owner().isAlliedWith(this.dstPort.owner()))) {
|
||||
this.tradeShip.delete()
|
||||
this.tradeShip.delete(false)
|
||||
this.active = false
|
||||
return
|
||||
}
|
||||
@@ -61,7 +61,7 @@ export class TradeShipExecution implements Execution {
|
||||
if (this.wasCaptured) {
|
||||
const ports = this.tradeShip.owner().units(UnitType.Port).sort(distSortUnit(this.tradeShip))
|
||||
if (ports.length == 0) {
|
||||
this.tradeShip.delete()
|
||||
this.tradeShip.delete(false)
|
||||
this.active = false
|
||||
return
|
||||
}
|
||||
@@ -76,7 +76,7 @@ export class TradeShipExecution implements Execution {
|
||||
MessageType.SUCCESS,
|
||||
this.tradeShip.owner().id()
|
||||
)
|
||||
this.tradeShip.delete()
|
||||
this.tradeShip.delete(false)
|
||||
break
|
||||
case PathFindResultType.Pending:
|
||||
// Fire unit event to rerender.
|
||||
@@ -101,7 +101,7 @@ export class TradeShipExecution implements Execution {
|
||||
this.dstPort.owner().addGold(gold)
|
||||
this.mg.displayMessage(`Received ${renderNumber(gold)} gold from trade with ${this.tradeShip.owner().displayName()}`, MessageType.SUCCESS, this.dstPort.owner().id())
|
||||
this.mg.displayMessage(`Received ${renderNumber(gold)} gold from trade with ${this.tradeShip.owner().displayName()}`, MessageType.SUCCESS, this._owner)
|
||||
this.tradeShip.delete()
|
||||
this.tradeShip.delete(false)
|
||||
return
|
||||
}
|
||||
this.tradeShip.move(this.path[this.index])
|
||||
|
||||
Reference in New Issue
Block a user