docs(design): record Phase-1 live unit store scaffolded (fba5cdfd)

unit_slot.rs + GdGameState.presentation_units + GdUnit + SaveEnvelope v4 land the
Rust home for the units hold-out (mirrors city_slot/presentation_cities). Rust-side
foundation done + headless-proven (unit_slot 7/0, save_envelope 6/0); remaining is
the render-gated live wiring (route unit input through the delegators, reduce
UnitScript to a view). MapUnit was already rich — no model widening needed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Natalie 2026-06-27 16:16:33 -04:00
parent fba5cdfdfb
commit c428402698

View file

@ -96,6 +96,16 @@ field; animation deltas / VFX (render-only, never sim state).
Make `GdGameState.inner` (+ `presentation_cities`) the authoritative live state, synced on every
mutation — i.e. route live input through `act()` so there is no GDScript-only mutation to diverge.
> **Progress 2026-06-27 — live unit store SCAFFOLDED (fba5cdfd).** The units hold-out now has its
> Rust home: `api-gdext/src/unit_slot.rs` (ops over `Vec<Vec<mc_state::MapUnit>>`, mirroring
> `city_slot.rs`) + `GdGameState.presentation_units` + 16 `#[func]` delegators + a `GdUnit` wrapper
> (parity with `GdCity`), folded into `SaveEnvelope` v4. unit_slot 7/0, save_envelope 6/0. The
> Rust-side foundation is done + headless-proven; **remaining is render-gated**: the live game must
> spawn/move/mutate units through these delegators (route input via `act()`/the dispatch path) and
> reduce `UnitScript` to a view of `presentation_units`. NB: `MapUnit` was found already rich
> (experience/movement/equipped/promotions/postures all present) — no model widening needed; and
> headless promotions now apply + affect combat (p3-26 B6c), so the unit model carries veterancy.
**Refinement (verified 2026-06-27 — the dual-model "fork" is narrower than p3-25 framed):**
- **CITIES are already largely Rust-authoritative.** `api-gdext/src/city_slot.rs` is a full
operations module over `presentation_cities: Vec<Vec<mc_city::City>>` (the *rich* city: spawn,