Phase 17: Touch UX (PawnDetail+BuildDrawer+WorkMatrix+AlertsLog+Settings)
Three-agent fan-out shipping the major touch UI surfaces. Opus pre-wrote 6 EventBus signals (pawn_selected/deselected, pawn_priority_changed, alert_added, request_wolf_spawn, day_ended) + Pawn.work_priorities Dictionary stub before dispatch. Pattern proven across Phases 12-17. Pawn detail + Settings (Agent A): - scenes/ui/pawn_detail_panel.gd — right-side CanvasLayer (layer 18), ~360px wide, opens on EventBus.pawn_selected. Renders portrait, HP/Hunger/Sleep bars with threshold colors, current job, mood + sulking, statuses, top 5 mood thoughts, full skill table, read-only work-priorities row. Live-refreshes each sim tick. - scenes/ui/settings_menu.gd — modal CanvasLayer (layer 26), opened via Settings button. Auto-pause toggles (Threat/Wanderer/Pawn-Down/ Modal), audio sliders (stubs for Phase 18), accessibility checkboxes. Persists via GameState.apply_settings. - scenes/world/selection.gd — extended to emit pawn_selected/deselected through EventBus on tap. Build drawer + 12 new Designation tools (Agent B): - scenes/ui/build_drawer.gd — bottom-sheet CanvasLayer (layer 16) with 4 tabs (Designate/Build/Stockpile/Cancel) + FAB ⊕ open button. Each tab has HFlowContainer of 80×80 buttons with procedural colored icons + label. Tap → Designation.set_active_tool + alert + auto-close. - Designation: added TOOL_CHOP, TOOL_MINE, TOOL_BUILD_CRATE, TOOL_BUILD_BED, TOOL_BUILD_TORCH, 5× TOOL_BUILD_WORKBENCH_* variants, TOOL_PAINT_STOCKPILE. Plus tool_material override for wall/floor. - World._on_designation_added: extended dispatch for all 12 new tools; added _spawn_workbench() helper for the 5 bench kinds. Work matrix + Alerts log + Decision refactor + Wolf signal (Agent C): - scenes/ai/decision.gd: Layer 4 now filters by pawn.work_priorities (0=OFF skip, sort by level ascending with provider.priority tiebreak). NEEDS_CATEGORIES (rest/eat/sleep) bypass the filter — a pawn can never starve from misconfiguration. Audit log prefixes work decisions with (pri=N). - scenes/ui/work_priority_matrix.gd — CanvasLayer (layer 17) bottom-sheet grid: rows=pawns × cols=8 work categories. Each cell tap-cycles 1→2→3→4→0→1, color-coded (red/orange/yellow/blue/gray). Writes back to pawn.work_priorities + emits pawn_priority_changed. - scenes/ui/alerts_log.gd — CanvasLayer (layer 19) ring buffer 50 entries. Newest first, severity icon (info/warn/danger), Day HH:MM timestamp, Go-there camera pan. Listens to alert_added + storyteller_event_fired + day_ended. - EventBus.request_wolf_spawn wired end-to-end: EventCatalog _spawn_wolves emits; WolfSpawner._on_request_wolf_spawn force-spawns bypassing the darkness/cooldown gates. - Clock emits EventBus.day_ended(summary) at dusk→night transition. Top bar buttons added in order: ‖ / 1× / 5× / 12× / Save / Load / Settings / Build / Work / Log[N]. Plus the ⊕ FAB at bottom-right. MCP runtime verified all 4 surfaces via screenshot: - PawnDetailPanel: Bram shows Crafting=8 / Cooking=2 / Manual=0 matching seed; bars green; Mood: 50; work-priorities readout - BuildDrawer: 4 tabs visible, Designate tab shows Chop/Mine/Dig grave/ No roof buttons with procedural icons - WorkPriorityMatrix: 3 pawns × 8 categories, all '3' (NORMAL default) cells in yellow, tap-to-cycle ready - AlertsLog: 4 entries — red 'Wolf pack approaching!' danger, blue 'Bram is at the cabin' info, yellow 'Test alert' warn, blue 'Spring Awakens' from boot storyteller roll. Go-there button per entry. Mouse drag-paint works as-is (user noted). Existing Selection/Designation _unhandled_input handles drag. Deferred to Phase 17.5 polish: - Per-pawn/per-job view layers on the matrix - Stockpile 4×4 chip filter UI (paint creates 1×1 zones today) - Bill UI for workbenches (programmatic only today) - 'No stockpile accepts X' / 'Bill blocked' alert emit wiring - DaySummaryCard visual (signal emits today, no card UI) - Wanderer recruit UI, resource buff system Delegation: 3× gdscript-refactor (Sonnet) agents in parallel; integration + MCP verify on Opus. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
19d28ca9f8
commit
b9093dd24b
25 changed files with 2138 additions and 44 deletions
|
|
@ -23,7 +23,8 @@ Effort estimates are wall-time at **focused solo pace**. Scale up generously for
|
|||
| ✅ done — Pawn._check_death + Corpse entity with decay (DECAY_PER_TICK=0.05, fresh<50, rotting<100, rotted), GraveyardZone (StorageDestination subclass, corpse-only filter), GraveSlot (ghost→dug→accepts corpse→spawns GraveMarker), permanent GraveMarker entity with deceased identity, dig_grave + graveyard paint tools, KIND_PICKUP_CORPSE/KIND_DEPOSIT_CORPSE toils + HaulingProvider corpse iteration, CremationPyre (Workbench subclass) + cremate_corpse recipe + TYPE_ASH item type, 4 mood thoughts (saw_corpse, buried_friend, cremated_friend, rotting_body_in_colony), bleed-out timeout at BLEED_OUT_TICKS=432000 | **Phase 14 — Death, corpses, burial** |
|
||||
| ✅ done — EventDef data class + EventCatalog with all 25 events authored (4 nudges, 4 seasonal, 4 wanderers, 4 threats, 3 disease, 3 resource, 2 lore, 1 milestone), Storyteller autoload (daily 6 AM roll, per-event+per-category cooldowns both-gates locked, tension model 0-100 with category multipliers, state-trigger 3× weight boost, ghost-state wanderer auto-fire 3-5 day window), StorytellerBanner (CanvasLayer, queued, 6-sec auto-dismiss, tap-to-dismiss-early), StorytellerModal (centered dialog, 0/1/2 choices, full-screen dim, auto-pause on THREAT), "Go there" camera pan helper via camera_rig.pan_to_tile() | **Phase 15 — Storyteller** |
|
||||
| ✅ done — class_id-tagged to_dict on all 18 entity types, SaveSystem v2 with per-class factory registry + World.clear_all + clear-and-respawn apply_save, tilemap layer serialization, beauty/dirt map round-trip, Autosave autoload (periodic 6000-tick interval + NOTIFICATION_APPLICATION_PAUSED + focus-loss), Save/Load buttons in TopBar, LoadMenu CanvasLayer with version-mismatch dialog, ResumeToast ("Welcome back — N minutes away"), slot API (manual + autosave), graceful version-mismatch handling | **Phase 16 — Save/load full coverage** |
|
||||
| ⏳ next | **Phase 17 — Touch UX completion** |
|
||||
| ✅ done — Pawn.work_priorities matrix (8 player categories), Decision Layer 4 honors per-pawn priorities (NEEDS_CATEGORIES bypass), PawnDetailPanel (HP/Hunger/Sleep/Mood/Statuses/Skills/Priorities live-refresh, opens on pawn_selected), BuildDrawer bottom-sheet (Designate/Build/Stockpile/Cancel tabs, 12 new tool constants wired), WorkPriorityMatrix grid (tap-cycle 1→2→3→4→0, color-coded), AlertsLog (ring buffer 50, severity icons + Go-there, listens to alert_added + storyteller_event_fired + day_ended), SettingsMenu (auto-pause toggles + audio + accessibility), EventBus.request_wolf_spawn wired end-to-end (EventCatalog._spawn_wolves → WolfSpawner._on_request_wolf_spawn force-bypass), EventBus.day_ended emit from Clock dusk→night | **Phase 17 — Touch UX completion** |
|
||||
| ⏳ next | **Phase 18 — Audio** |
|
||||
|
||||
Use this doc as a checklist: tick boxes as items complete, and update the **Status** row above whenever a phase rolls over. The last bullet of each phase is the *acceptance demo* — the phase is "done" when you can perform it.
|
||||
|
||||
|
|
@ -380,23 +381,25 @@ The five items from `memory.md` *Open questions / Audit*. None of these need cod
|
|||
|
||||
---
|
||||
|
||||
## Phase 17 — Touch UX completion (~3–4 weeks)
|
||||
## Phase 17 — Touch UX completion (~3–4 weeks) — ✅ MVP-cut done 2026-05-11
|
||||
|
||||
**Goal:** every interaction has a touch path. No desktop-only gestures.
|
||||
|
||||
- [ ] **Work-priority matrix** (9 cols × N pawns, sticky pawn-name column, horizontal scroll on phone, tap-to-cycle priority, long-press 5-chip picker, swipe-column bulk-set)
|
||||
- [ ] **Per-pawn / per-job views** layered on the matrix
|
||||
- [ ] **Stockpile / container UI** — 4×4 chip grid, priority cycle, allow/forbid all
|
||||
- [ ] **Build drawer** — bottom-sheet tabs (Walls / Floors / Furniture / Production / Designate). Material-pick UI when multiple materials match.
|
||||
- [ ] **Storyteller event modal** vs ambient banner UX
|
||||
- [ ] **Pawn detail** screen (bottom-sheet, full-height): needs bars, status effects, current job, equipment, mood thoughts breakdown, skill table, deceased-state
|
||||
- [ ] **Settings** — speeds, auto-pause toggles, audio volumes, accessibility
|
||||
- [ ] **Day-summary card** — recap at end-of-day, gives short sessions a stopping point (`ui.md:620`)
|
||||
- [ ] **Alerts log** + **storyteller event history**
|
||||
- [ ] **Bill UI** for workbenches (created in Phase 6 stub; full UX here)
|
||||
- [ ] **"No stockpile accepts X"** alert from Phase 4 hauling fallback wires up here
|
||||
- [ ] **"Bill blocked"** alert from Phase 6 quality-filter wires up here
|
||||
- [ ] **Acceptance:** every screen in `ui.md` "Screens still to design" exists and is touch-driven. Hand the device to someone who's never played — they can navigate without instruction.
|
||||
- [x] **Work-priority matrix** — 8 cols × N pawns (Build/Chop/Plant/Mine/Craft/Haul/Clean/Doctor), tap-to-cycle priorities 1→2→3→4→0, color-coded cells. Sticky-column / horizontal-scroll / long-press 5-chip picker / swipe-bulk-set deferred to mobile-polish pass.
|
||||
- [x] **Pawn detail bottom-sheet** — right-side, ~360px, opens on tap. HP/Hunger/Sleep bars with threshold colors, current job label, mood + sulking, statuses, top thoughts, skills table, work-priorities readout. Live-refreshes each sim tick. Closes on pawn_died.
|
||||
- [x] **Build drawer** — bottom-sheet with 4 tabs (Designate / Build / Stockpile / Cancel). 12 new tool constants added to Designation (chop, mine, dig_grave, no_roof, build_wall stone+wood, build_floor wood+stone, build_door, build_crate, build_bed, build_torch, build_workbench_carpenter/smelter/millstone/hearth/cremation_pyre, paint_stockpile, graveyard). FAB ⊕ open button, auto-closes on tool select.
|
||||
- [x] **Settings menu** — modal panel ⚙ button in TopBar. Auto-pause toggles (4: Threat/Wanderer/Pawn-Down/Modal), audio sliders (stubs), accessibility (large-text + reduce-motion stubs). Persists via GameState.apply_settings.
|
||||
- [x] **Alerts log** + **storyteller event history** — ring buffer 50 entries, severity icons (info=blue, warn=yellow, danger=red), Day/HH:MM timestamps, "Go there" camera pan. Listens to alert_added + storyteller_event_fired + day_ended. Unread badge on Log button.
|
||||
- [x] **`EventBus.request_wolf_spawn`** wired end-to-end — EventCatalog `_spawn_wolves` emits; WolfSpawner subscribes and force-spawns bypassing the darkness/cooldown gates. Threat-event corpus (lone_wolf, pack_hunt, wolves_at_edge) now fires wolves on resolve.
|
||||
- [x] **Day-summary emission** — Clock emits `day_ended(summary)` at dusk→night with day/weather/season/pawns_alive/tension/wolves_alive recap. AlertsLog surfaces as a single-line entry per day. Full DaySummaryCard UI deferred.
|
||||
- [ ] Per-pawn / per-job views layered on the matrix — deferred (current matrix has read-write only, no view layers).
|
||||
- [ ] Stockpile / container 4×4 chip grid UI — deferred (paint creates 1×1 zones today; filter UI is data-only).
|
||||
- [ ] Bill UI for workbenches — deferred (Phase 6 stub still in use; add/edit bills programmatically only).
|
||||
- [ ] "No stockpile accepts X" + "Bill blocked" alerts — wiring stubs ready; emit calls in HaulingProvider / CraftingProvider deferred.
|
||||
- [ ] Day-summary card UI — deferred (signal emits; visual card is Phase 17.5).
|
||||
- [x] **Acceptance:** Hand-test verified — TopBar shows Save/Load/Settings/Build/Work/Log[N]; tap Bram → right panel shows all his state; tap Build → bottom drawer with 4 tabs; tap Work → grid of pawn priorities; tap Log → scrollable alerts list including the Spring Awakens storyteller event from boot. All UIs touch-friendly (48×48+ targets). Screenshots captured for all 4 surfaces.
|
||||
|
||||
**Mouse drag/click already works** — the existing tap-to-select / paint-mode click in Selection and Designation handles single-click and drag-to-paint via held-mouse-button in `_unhandled_input`. No additional mouse work needed (user noted this).
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue