diff --git a/TODO.txt b/TODO.txt index 3f41a2be7..5674c8b76 100644 --- a/TODO.txt +++ b/TODO.txt @@ -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 diff --git a/src/core/configuration/DevConfig.ts b/src/core/configuration/DevConfig.ts index f55d6a291..857e6a283 100644 --- a/src/core/configuration/DevConfig.ts +++ b/src/core/configuration/DevConfig.ts @@ -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 diff --git a/src/core/execution/PortExecution.ts b/src/core/execution/PortExecution.ts index 8d6ec12cd..a6515f3da 100644 --- a/src/core/execution/PortExecution.ts +++ b/src/core/execution/PortExecution.ts @@ -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))