mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-24 13:52:45 +00:00
bufix: ports execution still active after port dies
This commit is contained in:
@@ -201,8 +201,7 @@
|
||||
* run a* in a web worker DONE 11/29/2024
|
||||
* create async pathfinder DONE 11/29/2024
|
||||
* captured tradeships use async pathfinder DONE 11/29/2024
|
||||
* run name calculation in web worker
|
||||
* BUG: tradeships wrong color
|
||||
* BUG: trade ships not building DONE 11/29/2024
|
||||
* have NPCs build destroyers and battleships
|
||||
* spread out calculate clusters
|
||||
* add radiation from nuke
|
||||
|
||||
@@ -5,7 +5,7 @@ export const devConfig = new class extends DefaultConfig {
|
||||
unitInfo(type: UnitType): UnitInfo {
|
||||
const info = super.unitInfo(type)
|
||||
const oldCost = info.cost
|
||||
info.cost = (p: Player) => oldCost(p) / 5
|
||||
info.cost = (p: Player) => oldCost(p) / 10
|
||||
return info
|
||||
}
|
||||
|
||||
@@ -25,9 +25,9 @@ export const devConfig = new class extends DefaultConfig {
|
||||
turnIntervalMs(): number {
|
||||
return 100
|
||||
}
|
||||
boatMaxDistance(): number {
|
||||
return 5000
|
||||
}
|
||||
// boatMaxDistance(): number {
|
||||
// return 5000
|
||||
// }
|
||||
|
||||
// numBots(): number {
|
||||
// return 0
|
||||
|
||||
@@ -49,6 +49,10 @@ export class PortExecution implements Execution {
|
||||
}
|
||||
this.port = player.buildUnit(UnitType.Port, 0, spawns[0])
|
||||
}
|
||||
if (!this.port.isActive()) {
|
||||
this.active = false
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
const alliedPorts = this.player().alliances().map(a => a.other(this.player())).flatMap(p => p.units(UnitType.Port))
|
||||
|
||||
Reference in New Issue
Block a user