fix(game): release a banished race's assets during turn generation
TurnWipeExtinctRaces iterated only non-extinct races, so an administratively banished race (flagged extinct, TTL untouched) was never wiped: its planets stayed owned and its ships lingered, while the race itself could no longer act. The loop now covers every race and wipes when either an active race's TTL has run out (idle / quit) or an extinct race still holds assets (banish). The asset check makes repeated passes idempotent. wipeRace already matched the rules for exclusion (ships removed, planets uninhabited, industry and capital cleared, material retained), so the behaviour is just documented in game/README.md. Tests: banish releases planets and ships on the next turn (and is idempotent); idle-timeout wipe still fires under the new iterator. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
+7
-3
@@ -102,9 +102,13 @@ remove-and-banish flow.
|
||||
non-empty and must match an existing race in the engine's roster.
|
||||
- Successful response: `204 No Content` with an empty body.
|
||||
- Error responses follow the same `400` / `500` envelope shape as the
|
||||
other admin endpoints. The engine-side mechanics of `banish` (what
|
||||
exactly happens to the race's planets, fleets, and pending orders) are
|
||||
owned by the engine maintainers.
|
||||
other admin endpoints. `banish` only flags the race extinct, so it can
|
||||
no longer submit or have orders applied; its assets are released at the
|
||||
start of the next turn generation (`TurnWipeExtinctRaces`), the same way
|
||||
an idle/quit timeout is handled but without the wait — ship groups and
|
||||
fleets are removed, its planets become uninhabited (the working industry
|
||||
and the capital stockpile are cleared, raw material is retained), and
|
||||
votes cast for it are reset.
|
||||
|
||||
### `GET /healthz`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user