From c428402698e8f3c1c9c7610aa7d0a6a0efb073c2 Mon Sep 17 00:00:00 2001 From: Natalie Date: Sat, 27 Jun 2026 16:16:33 -0400 Subject: [PATCH] docs(design): record Phase-1 live unit store scaffolded (fba5cdfd) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- .../designs/p3-rail1-ui-pure-view-migration-design.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.project/designs/p3-rail1-ui-pure-view-migration-design.md b/.project/designs/p3-rail1-ui-pure-view-migration-design.md index bb9c8b85..76fc2687 100644 --- a/.project/designs/p3-rail1-ui-pure-view-migration-design.md +++ b/.project/designs/p3-rail1-ui-pure-view-migration-design.md @@ -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>`, 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>` (the *rich* city: spawn,