mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 19:56:43 +00:00
add capture alert
This commit is contained in:
@@ -236,6 +236,7 @@
|
||||
* bug: name not updating location in spawn phase DONE 12/12/2024
|
||||
* add panama canal NA DONE 12/12/2024
|
||||
* make boats work on oceania 12/12/2024
|
||||
* add capture alert DONE 12/13/2024
|
||||
* allow longer names and allow them to be displayed in the Rank UI not be cut
|
||||
* make boats work on lakes
|
||||
* record game winner
|
||||
|
||||
@@ -99,8 +99,16 @@ export class TradeShipExecution implements Execution {
|
||||
const gold = this.mg.config().tradeShipGold(this.srcPort, this.dstPort)
|
||||
this.srcPort.owner().addGold(gold)
|
||||
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.mg.displayMessage(
|
||||
`Received ${renderNumber(gold)} gold from trade with ${this.srcPort.owner().displayName()}`,
|
||||
MessageType.SUCCESS,
|
||||
this.dstPort.owner().id()
|
||||
)
|
||||
this.mg.displayMessage(
|
||||
`Received ${renderNumber(gold)} gold from trade with ${this.dstPort.owner().displayName()}`,
|
||||
MessageType.SUCCESS,
|
||||
this.srcPort.owner().id()
|
||||
)
|
||||
this.tradeShip.delete(false)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -335,6 +335,8 @@ export class PlayerImpl implements MutablePlayer {
|
||||
(unit as UnitImpl)._owner = this
|
||||
this._units.push(unit as UnitImpl)
|
||||
this.gs.fireUnitUpdateEvent(unit, unit.tile())
|
||||
this.gs.displayMessage(`${unit.type()} captured by ${this.displayName()}`, MessageType.ERROR, prev.id())
|
||||
this.gs.displayMessage(`Captured ${unit.type()} from ${prev.displayName()}`, MessageType.SUCCESS, this.id())
|
||||
}
|
||||
|
||||
buildUnit(type: UnitType, troops: number, spawnTile: Tile): UnitImpl {
|
||||
|
||||
Reference in New Issue
Block a user