A building with no life should explode #159
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Done in
4c920f1. You had found the one building that could not.Every other structure already exploded when its life ran out -
damage_buildingdestroys at zero, which emitsbuilding_destroyed, which spawns the explosion and the sound. The mothership was exempt: it floored at 1hp, so a battered one sat there reading as dead and never came down.That exemption was deliberate, to prevent a soft-lock - the bank, the hangar and research all live there. But the soft-lock does not actually exist:
GameState.bank_inventoryand the hangar isstored_vessels; both outlive any building, so losing the structure does not lose what is in itSo the way back is always: mine, fly, rebuild. The exemption is gone, and
test_building_healthnow asserts that recovery path - bank survives, hangar survives, rebuild is ungated and fits one hold - in place of the exemption that used to stand in for it.While I was there: #130 had quietly made a lost vessel bigger than a structure coming down, which inverts what #99 intended. Left as is for now since it is a separate judgement - say the word if you want the structure explosion raised back above it.