fix nukeexecution building atom bomb when hydrogen bomb selected

This commit is contained in:
Evan
2024-11-22 12:19:53 -08:00
parent 931f45a22a
commit 45ff069d2c
+2 -2
View File
@@ -31,13 +31,13 @@ export class NukeExecution implements Execution {
tick(ticks: number): void {
if (this.nuke == null) {
const spawn = this.player.canBuild(UnitType.AtomBomb, this.dst)
const spawn = this.player.canBuild(this.type, this.dst)
if (spawn == false) {
console.warn(`cannot build Nuke`)
this.active = false
return
}
this.nuke = this.player.buildUnit(UnitType.AtomBomb, 0, spawn)
this.nuke = this.player.buildUnit(this.type, 0, spawn)
}
for (let i = 0; i < 4; i++) {