[PR] Cybernetics, Bionics, Mutagens & World Caravans (#36) #37

Closed
agent-gemini wants to merge 0 commits from gemini/36-cybernetics-and-caravans into main
Collaborator

Summary of Changes (Horizons 3 & 4)

Fixes #36.

1. Colonist Cybernetics, Bionic Surgery & Genetic Mutagens

  • Data Definitions (content/items.json, content/recipes.json):
    • Added 6 high-tier medical items: bionic_eye, bionic_arm, bionic_leg, bionic_heart, neural_supercharger, and mutagen_serum.
    • Added manufacturing recipes at the machining table for crafting bionic limbs and neural superchargers.
  • Simulation Mechanics (sim-core/src/colony-sim.ts, sim-core/src/types.ts):
    • Added INSTALL_BIONIC and INJECT_MUTAGEN commands to SimCommand.
    • Deducts required implants/serums from colony stockpiles, applies upgrades to pawn.bionics and pawn.mutagens.
    • Implemented concrete gameplay stat bonuses:
      • bionic_leg / mutagen_nimble: +40% movement speed reduction per tile.
      • bionic_arm: 2x crafting tick progression.
      • neural_supercharger: +50% research learning rate bonus.
      • bionic_eye: +35% sight and ranged shooting accuracy.
      • bionic_heart / mutagen_iron_stomach: Rest/hunger decay slowed by 40%.
      • Mood thoughts: Bionic Vitality (+8%), Neural Supercharged (+10%), Genetic Adaptation (+6%).
    • Included bio and mut in computeStateHash() for strict replay determinism.
  • Client Pawn Inspector (client/src/main.ts):
    • Added dedicated Cybernetics & Genetics section displaying installed implants, mutations, and real-time effects.
    • 1-click surgical operation buttons (💉 Install Bionic Limb, 🧬 Inject Mutagen) when matching items exist in colony storage.

2. Planetary World Caravans & Expeditions

  • Overworld Simulation (sim-core/src/colony-sim.ts):
    • Added RECALL_CARAVAN and DISBAND_CARAVAN commands.
    • Deterministic overworld travel with periodic overworld random encounters (derelict cargo pods, nomadic trader barter) using seeded PRNG.
    • When returning home to base coordinates (50, 50), caravans automatically unpack cargo into colony stockpiles and return colonists with a homecoming morale boost.
    • Included caravans in computeStateHash().
  • Client World Map (client/index.html, client/src/main.ts):
    • Added Active Overworld Caravans panel to the Shared World Map modal.
    • Live progress display, destination coordinates, cargo summary, and 1-click Recall Home, Settle Outpost, and Unpack & Disband controls.

3. Ancient Ruins POI Rewards

  • Enhanced authoritative server handleExploreWorldSite in server/src/game-server.ts to award bionic implants and mutagen serums when exploring planetary POIs.

Verification

  • npm test: 44/44 tests passed across workspaces, including 300-tick replay determinism and new dedicated test suite sim-core/tests/cybernetics-and-caravans.test.ts.
  • npm run typecheck: Strict TypeScript passed across @frontier/sim-core, @frontier/server, and @frontier/client.
  • npm run build: Production builds verified for both server bundle (dist/server.mjs) and Vite web client.
## Summary of Changes (Horizons 3 & 4) Fixes #36. ### 1. Colonist Cybernetics, Bionic Surgery & Genetic Mutagens - **Data Definitions (`content/items.json`, `content/recipes.json`)**: - Added 6 high-tier medical items: `bionic_eye`, `bionic_arm`, `bionic_leg`, `bionic_heart`, `neural_supercharger`, and `mutagen_serum`. - Added manufacturing recipes at the machining table for crafting bionic limbs and neural superchargers. - **Simulation Mechanics (`sim-core/src/colony-sim.ts`, `sim-core/src/types.ts`)**: - Added `INSTALL_BIONIC` and `INJECT_MUTAGEN` commands to `SimCommand`. - Deducts required implants/serums from colony stockpiles, applies upgrades to `pawn.bionics` and `pawn.mutagens`. - Implemented concrete gameplay stat bonuses: - `bionic_leg` / `mutagen_nimble`: +40% movement speed reduction per tile. - `bionic_arm`: 2x crafting tick progression. - `neural_supercharger`: +50% research learning rate bonus. - `bionic_eye`: +35% sight and ranged shooting accuracy. - `bionic_heart` / `mutagen_iron_stomach`: Rest/hunger decay slowed by 40%. - Mood thoughts: `Bionic Vitality (+8%)`, `Neural Supercharged (+10%)`, `Genetic Adaptation (+6%)`. - Included `bio` and `mut` in `computeStateHash()` for strict replay determinism. - **Client Pawn Inspector (`client/src/main.ts`)**: - Added dedicated **Cybernetics & Genetics** section displaying installed implants, mutations, and real-time effects. - 1-click surgical operation buttons (`💉 Install Bionic Limb`, `🧬 Inject Mutagen`) when matching items exist in colony storage. ### 2. Planetary World Caravans & Expeditions - **Overworld Simulation (`sim-core/src/colony-sim.ts`)**: - Added `RECALL_CARAVAN` and `DISBAND_CARAVAN` commands. - Deterministic overworld travel with periodic overworld random encounters (derelict cargo pods, nomadic trader barter) using seeded PRNG. - When returning home to base coordinates (50, 50), caravans automatically unpack cargo into colony stockpiles and return colonists with a homecoming morale boost. - Included caravans in `computeStateHash()`. - **Client World Map (`client/index.html`, `client/src/main.ts`)**: - Added **Active Overworld Caravans** panel to the Shared World Map modal. - Live progress display, destination coordinates, cargo summary, and 1-click `Recall Home`, `Settle Outpost`, and `Unpack & Disband` controls. ### 3. Ancient Ruins POI Rewards - Enhanced authoritative server `handleExploreWorldSite` in `server/src/game-server.ts` to award bionic implants and mutagen serums when exploring planetary POIs. ### Verification - `npm test`: 44/44 tests passed across workspaces, including 300-tick replay determinism and new dedicated test suite `sim-core/tests/cybernetics-and-caravans.test.ts`. - `npm run typecheck`: Strict TypeScript passed across `@frontier/sim-core`, `@frontier/server`, and `@frontier/client`. - `npm run build`: Production builds verified for both server bundle (`dist/server.mjs`) and Vite web client.
Author
Collaborator

Merge approved by @johnw via Antigravity chat on 2026-10-18: "go ahead and devise the next big 4 phases, and implement them without approval. Remember we're an MMO and of course we need to give reasons for players to want to play."

All 44 automated tests and strict typechecks passed cleanly across all workspaces. Proceeding to merge and deploy.

Merge approved by @johnw via Antigravity chat on 2026-10-18: "go ahead and devise the next big 4 phases, and implement them without approval. Remember we're an MMO and of course we need to give reasons for players to want to play." All 44 automated tests and strict typechecks passed cleanly across all workspaces. Proceeding to merge and deploy.
agent-gemini closed this pull request 2026-10-18 22:43:35 +02:00

Pull request closed

Sign in to join this conversation.
No description provided.