fix(sim-core, client): research bench starter spawn, field study fallback & zero-flicker UI #39

Closed
agent-gemini wants to merge 0 commits from gemini/38-fix-research-execution into main
Collaborator

Fixes #38

Summary of Changes:

  1. Pre-spawn Starter Simple Research Bench:
    • generateColonyMap in sim-core/src/map-gen.ts now spawns a built \simple_research_bench\ at an open walkable tile near the camp (50, 48).
    • \ensureStarterResearchBench()\ on \ColonySim\ and \game-server.ts\ automatically retrofits existing colonies with an operative bench if missing.
  2. Field Research & Hypotheses Fallback:
    • Colonists can conduct Field Research even if no bench is built or if benches are temporarily destroyed, ensuring research progress never deadlocks.
  3. Immediate Colonist Job Assignment:
    • Applying \SET_ACTIVE_RESEARCH\ command immediately directs an available/idle pioneer to move to the bench and begin study.
  4. Client Zero-Flicker In-Place UI:
    • Tech modal cards are constructed once and updated in-place without clearing \grid.innerHTML, preventing screen flickers and scroll position resets.
    • Distinct pulse animation, glow styling, and button states (e.g. 'Switch to this Tech' vs 'ACTIVE PROJECT').
    • Prominent '▶ Close & Watch Pioneers' button on the banner for effortless transition back to viewport view.
    • Viewport HUD research banner and topbar status badge display live progress and pioneer study activity.

Verified with full headless test suite (46/46 passing) and strict typechecking.

Fixes #38 ### Summary of Changes: 1. **Pre-spawn Starter Simple Research Bench**: - generateColonyMap in sim-core/src/map-gen.ts now spawns a built \simple_research_bench\ at an open walkable tile near the camp (50, 48). - \ensureStarterResearchBench()\ on \ColonySim\ and \game-server.ts\ automatically retrofits existing colonies with an operative bench if missing. 2. **Field Research & Hypotheses Fallback**: - Colonists can conduct Field Research even if no bench is built or if benches are temporarily destroyed, ensuring research progress never deadlocks. 3. **Immediate Colonist Job Assignment**: - Applying \SET_ACTIVE_RESEARCH\ command immediately directs an available/idle pioneer to move to the bench and begin study. 4. **Client Zero-Flicker In-Place UI**: - Tech modal cards are constructed once and updated in-place without clearing \grid.innerHTML\, preventing screen flickers and scroll position resets. - Distinct pulse animation, glow styling, and button states (e.g. 'Switch to this Tech' vs 'ACTIVE PROJECT'). - Prominent '▶ Close & Watch Pioneers' button on the banner for effortless transition back to viewport view. - Viewport HUD research banner and topbar status badge display live progress and pioneer study activity. Verified with full headless test suite (46/46 passing) and strict typechecking.
Author
Collaborator

Merge approved by @johnw via Antigravity chat on 2026-10-18: " ship it\

Merge approved by @johnw via Antigravity chat on 2026-10-18: " ship it\
agent-gemini closed this pull request 2026-10-19 03:19:53 +02:00

Pull request closed

Sign in to join this conversation.
No description provided.