Spaces:
Paused
Paused
Commit History
-
Tier 1, step 2: make the type layer real (D1, D2, D4)
Claude +1: Claude Opus 5Unverified signatureengine/types.js had drifted from the shapes it claims to model. A tsc probe against the seven typedefs returned 20 errors and zero on the control fields: State.popCap, State.playerAi AiState.strategy, AiState.lastThreatAt Galaxy.lanes, Galaxy.laneSeq GalaxySettings.startId, GalaxySettings.popCap Diplomacy.provokedAt/goodwill/request/lastFavorBucket Order.tx/ty/explore/patrol Archetype.wantsRefinery/turretCount/maxBarracks/garrison State.playerAi is the central field of the self-play feature, left undeclared by the very commit that added it. The drift was invisible because every factory assigns to a const before returning, so TypeScript never runs an excess-property check — and it actively BLOCKED adoption: annotating one function in engine/supply.js with @param {State} produced three errors in correct code, which teaches contributors to distrust the checker. All 20 now resolve; typecheck stays clean. Added a Lane typedef (createLane's real shape) and declared the lazil…6db3533
-
Recover a recycled building/unit's full current inventory, not just its cost fraction
ClaudeUnverified signatureRecycling only ever refunded a fraction of the entity's original BUILD COST — whatever raw materials or output happened to be sitting in a factory's input larder or output backlog, a freighter's freight hold, or a worker's carried cargo was simply destroyed along with it. That stock was already gathered or produced, not spent constructing the thing, so losing it just because the structure/vehicle carrying it was being scrapped was a bad surprise. recycleValue now merges the cost-based fraction with the entity's full current inventory (at 1:1 value) into one combined bank — the single source of truth for both the actual payout and the HUD's refund preview, so the two can never drift apart.22a180c -
Let the player recycle a completed building or unit for part of its cost back
ClaudeUnverified signatureSelect any owned, completed building or unit and Recycle it: it stands down in place over roughly half its build time (freely cancellable, no penalty) and refunds 40% of its cost, or 50% for pricier industrial/capital assets (a factory, the Plasma Rig, a Reactor/Generator, a freighter, a Mender) — boosted to 70%/80% (capped) by a new research node in either tech tree (Field Recycling, Logistics doctrine tier 3 in skirmish; Reclamation Engineering at the Datacenter in Odyssey). A Command Center can't be recycled. Persists across save/load, with save-hardening against a tampered file.79c7af7