Fix destroyed cooldown structures reappearing in game (#3997)

## Description:
Stop deleted missile silos from reappearing after cooldown expiry

before

https://github.com/user-attachments/assets/714d3580-b60d-479e-8e45-6ee065b79d54

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [x] I have added relevant tests to the test directory
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced

## Please put your Discord username so you can be contacted if a bug or
regression is found:
aotumuri
This commit is contained in:
Aotumuri
2026-05-25 00:05:29 +09:00
committed by GitHub
parent 14f2e36d15
commit cbf38ffb81
4 changed files with 8 additions and 0 deletions
+1
View File
@@ -138,6 +138,7 @@ export class BarPass {
// --- Progress bars (structures) ---
for (const unit of structures.values()) {
if (!unit.isActive) continue;
const progress = this.computeStructureProgress(unit, gameTick);
if (progress !== null) this.pushProgress(unit, progress);
}
@@ -230,6 +230,7 @@ export class StructureLevelPass {
let count = 0;
for (const unit of units.values()) {
if (!unit.isActive) continue;
if (!STRUCTURE_TYPES.has(unit.unitType)) continue;
if (unit.level <= 1) continue;
@@ -264,6 +264,7 @@ export class StructurePass {
let count = 0;
for (const unit of units.values()) {
if (!unit.isActive) continue;
const atlasIdx = this.typeToAtlasCol.get(unit.unitType);
if (atlasIdx === undefined) continue;
@@ -18,6 +18,11 @@ export class MissileSiloExecution implements Execution {
return;
}
if (!this.silo.isActive()) {
this.active = false;
return;
}
// frontTime is the time the earliest missile fired.
const frontTime = this.silo.missileTimerQueue()[0];
if (frontTime === undefined) {