v0.4.0 — LOCAL SYSTEM: planets + exploration (#6) #13

Merged
kamilkrzywda merged 7 commits from local-system-explore into master 2026-09-29 00:28:59 +02:00
Owner

Closes #6. Real planet list for the current system and exploration that finds things.

  • DB: planets (system_id, parent_id for nested moons, name/type/hazard/explored), inventory_items (kind resource|part, name, qty — accumulates)
  • Gen: each system gets 2–5 planets, 60% of them with 1–3 moons; pure + seeded per system in lib/game/world.ts so bodies are identical regardless of generation order
  • Exploration: POST /api/explore {planetId} — deterministic roll per save+planet (70% resource qty 1–4, 30% part qty 1, ~21% nothing), one scan per body, turn cost, event write; 404/409 validation
  • API: GET /api/system (planets incl. moons + inventory + turn), OpenAPI updated in code
  • UI: LOCAL SYSTEM tab renders live data — staggered moon layout kept, real UNEXPLORED/SCANNED/HAZARD badges, EXPLORE per row, SCAN RESULT strip + CARGO HOLD panel; placeholder constants removed for this tab only
  • Tests: unit 20→29 (gen shape/determinism, explore lifecycle incl. known-seed determinism), e2e 7→10 (fresh-stack render, scan changes state + yields cargo, explored state survives the mid-run container restart)

Local verification: tsc ✓, vitest 29/29 ✓, playwright --list ✓, next build clean (7 tab triggers present).

Closes #6. Real planet list for the current system and exploration that finds things. - **DB:** `planets` (system_id, parent_id for nested moons, name/type/hazard/explored), `inventory_items` (kind resource|part, name, qty — accumulates) - **Gen:** each system gets 2–5 planets, 60% of them with 1–3 moons; pure + seeded per system in lib/game/world.ts so bodies are identical regardless of generation order - **Exploration:** `POST /api/explore {planetId}` — deterministic roll per save+planet (70% resource qty 1–4, 30% part qty 1, ~21% nothing), one scan per body, turn cost, event write; 404/409 validation - **API:** `GET /api/system` (planets incl. moons + inventory + turn), OpenAPI updated in code - **UI:** LOCAL SYSTEM tab renders live data — staggered moon layout kept, real UNEXPLORED/SCANNED/HAZARD badges, EXPLORE per row, SCAN RESULT strip + CARGO HOLD panel; placeholder constants removed for this tab only - **Tests:** unit 20→29 (gen shape/determinism, explore lifecycle incl. known-seed determinism), e2e 7→10 (fresh-stack render, scan changes state + yields cargo, explored state survives the mid-run container restart) Local verification: tsc ✓, vitest 29/29 ✓, playwright --list ✓, next build clean (7 tab triggers present).
kamilkrzywda added 7 commits 2026-09-29 00:25:35 +02:00
kamilkrzywda scheduled this pull request to auto merge when all checks succeed 2026-09-29 00:28:58 +02:00
kamilkrzywda merged commit a6a5e827a1 into master 2026-09-29 00:28:59 +02:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: OpenCode/SpaceWanderer#13