From 90e1e77c3f77fd311752bc8e42637e38cdedf44b Mon Sep 17 00:00:00 2001 From: soul Date: Thu, 22 Oct 2026 16:33:36 +0200 Subject: [PATCH 001/713] Living-world target r1: the economy (invariants, 0b table, cut sequence) Co-Authored-By: Claude Opus 5.5 --- docs/aetheria-living-world-target.md | 230 +++++++++++++++++++++++++++ 1 file changed, 230 insertions(+) create mode 100644 docs/aetheria-living-world-target.md diff --git a/docs/aetheria-living-world-target.md b/docs/aetheria-living-world-target.md new file mode 100644 index 000000000..dda9ae573 --- /dev/null +++ b/docs/aetheria-living-world-target.md @@ -0,0 +1,230 @@ +# Aetheria living world: target, revision 1 (the economy) + +Date: 2026-10-22. Status: target, drafted by Imagination (session self-2026-10-19-ag7) for Self to admit. +Body pinned at `GameCult/Aetheria` origin/master `5c38029e`. This revision covers the economy. The rest of the +strategic layer arrives in a later revision of this document: holdings changing hands, expansion, the lore institutions +as damping rules, and the strategic arena's scoring. + +## 1. Why + +The operator: "We cannot simulate an economy without "the crafting work". Turning basic stuff into more complex stuff +while trying to get an edge on your competitors is kinda the whole game." (`crafting-is-the-game`, 2026-10-22). + +The demo carries the living world (`demo-live-expansion`, `demo-one-region-living-presence`). Factions act on live needs, +and the job board posts work from them. Whether the demo ships a Sol-seeded history or a seeded region depends on how +well this simulation performs (`demo-start-gated-on-sim-quality`). The arenas train on the galaxy generator, extended +with plausible starting infrastructure (`strategic-start-r2-generator-trains`). So the economy is not decoration on a +fixed map. It is the engine the strategic layer, the arenas and the demo all run on. + +The rulings fix its shape: + +- **Chains are deep.** High-end goods sit five or more steps from extraction, with many intermediates, so the + station-kind set grows past the 17 kinds the station round authored (`chains-are-deep`). +- **Recipes.** Every commodity has an authored recipe naming its inputs, the station kind that makes it and a lore hook. + Gear and hulls take crafting components by role, permanently. That is what lets a higher-tech component replace an + old one without a new gear recipe (`named-recipes-gear-takes-components-by-role`). +- **Quality.** Stock carries grade from the first chain cut. Each facility's owner sets its good/fast/cheap setting and + routes better inputs to premium facilities (`crafting-is-the-game`, `quality-triangle-is-per-facility`). The final + assembly bounds what the parts give (`quality-is-assembly-over-supply-chain`, `quality-min-tolerance-binned-assembly`). + A maker may bin one design into several products (`maker-design-tiers-allowed`). +- **Demand.** Demand that is not gear comes from authored needs tables for population and institution kinds. The owning + faction issues unmet needs as obligations: quota, purchase order, contract or bounty (`demand-is-obligations`). +- **Allocators.** Faction economies are compiled allocators, one per economy kind (plan, market, project contract, + contraband). They all run over one needs-and-stockpile layer (`allocator-per-economy-kind`, `faction-economic-models`). +- **Labour.** Labour is a typed input, and every workforce kind has its own needs (`typed-workforce`). Zhestokost + permits no biodrones and no AGI automation (`faction-economic-models`). +- **Sinks.** Goods leave by consumption, destruction and upkeep. There is no general decay + (`sinks-consume-destroy-maintain`). Fights off screen destroy goods by the composition model's expected losses + (`matchup-composition-model`). +- **What the player reads.** The player reads shortages through a floating price band and through records. A record has + an issuer, a date and a confidence, and it can be stale, wrong or a lie (`shortages-are-records-and-price-band`). +- **Cargo is lore.** An intercepted shipment labelled biodrones is a way into the world (`catalog-crafting-chains`). +- **Stations.** Each faction gets stations for each part of its economy. The hull kinds and the simulation's station + kinds are one list (`stations-represent-faction-economy`, `faction-station-models`). +- **Goods move** on dock, into enclosed bays (`docking-is-enclosed-bays`), or by the ship-to-ship transfer verb + (`tender-transfer-verb`). + +Prior art (`docs/research/2026-10-22-crafting-chains-prior-art.md`) names the failure modes this target is built +against: + +- X4's seed-dependent shortages, and consumers stopping once storage is full; +- by-product backups in Satisfactory; +- the sink debate over EVE's destruction economy; +- the Anno deficit spiral; +- UO's dynamic ecology, which had to be constrained heavily to stay predictable. + +The Leontief and Hawkins-Simon conditions give the catalog a productivity check that the note found no game applying. + +## 2. Body facts (read at 5c38029e) + +- **Commodity records.** `SimpleCommodityData` (`ItemData.cs:323`) has a `SimpleCommodityCategory` (`Enums.cs:155`): + Minerals, Metals, Alloys, Compounds, Organics, Ammo and Consumer. The enum mixes raw goods with processed ones, and its + stage is not derivable from anything. `CompoundCommodityData` (`ItemData.cs:353`) carries `DemandProfile`, a Big Five + weight map over `PersonalityAttribute`, and `CompoundCommodityCategory`. No code reads `DemandProfile`. + `PersonalityAttribute` stays because `Corporations.cs:28` also uses it. The compound set is a set of gag placeholders, + not lore (predecessor's pass). +- **No recipes.** No recipe or facility record exists. The five factory designs (Refinery, Assembly Line, Shipyard, + Surface and Deep Ore Extractor) were deleted in `653ba490`. The station round's `INDEX.md` still lists them as a + source, so it is stale on that point. +- **Provenance.** It has the forward shape and no writer. `Produced {Faction, Station, Facility, Inputs}` and + `Extracted {Zone, Commodity}` exist (`Provenance.cs:122-137`), and only tests construct them. Every mint writes an + `Attributed` placeholder. `ProvenanceLedger.Reachable` already closes over `Produced.Facility` and `Inputs`. +- **Quality.** `Lot.Quality` is the assembly. `RoleFill` holds the parts. `QualityForRole` is the minimum of the part + and the assembly, and `EffectiveQuality` is the mean of the capped roles (`Provenance.cs:64-98`). `GetTier` bins + effective quality by `GameplaySettings.Tiers` (`ItemManager.cs:242`). Lots are minted from a product's distributions + on the item stream (`ItemManager.cs:126-170`). +- **Station stock.** `GenerateStationLoadout` puts `RandomProducts(16, 1, ...)` into a station's + cargo once, at zone generation (`LoadoutGenerator.cs:77,126`). The station round's CC6 records that nothing ever + restocks a station. Follow-up `station-restock` asks for a restock, and stockpiles supersede it. The trade menu sells + from station cargo through `StationServices`, which prices goods from catalog price and lot quality alone + (`StationServices.cs:13-40`). +- **No station kinds.** There is no station-kind datum. `ZoneGenerator` sets a station count from faction presence and + draws any `HullType.Station` hull (`ZoneGenerator.cs:290-340,422,443`; follow-up `station-hull-source-fit` item 3). +- **Only the player's zone ticks.** No job generator exists (`docs/aetheria-arena-target.md` section 2). `HaulingTask`, + `Mining`, `StationTowing` and `Survey` are defined, but nothing constructs them. +- **The lore seed.** It is one file: `AetheriaLore/Aetheria/Economy/Item Hooks/Pallas Strike Maintenance Assemblies.md`. + It proposes the VitaForge BioDrone Standard Limiter Interface, the Cephalopod Dry-Operation Harness, the Bloom Manifold + Seal Assembly and others, each with candidate parts and performance aspects. It reads as recipes waiting for a schema. + +## 3. Invariants + +These are the ends. Each label is what Soul measures against. + +- `L-source-sink`: Every commodity has at least one source and at least one sink. A source is an extraction recipe or a + recipe output. A sink is a recipe input, a role fill, a needs-table entry, an upkeep entry, or destruction for gear and + hulls. The catalog check refuses a commodity that has either one missing. +- `L-productive`: The recipe graph is productive. Its input matrix A has spectral radius below 1 (Hawkins-Simon). + - A is augmented with each workforce kind's needs per unit of labour, so the labour, food and labour loop is in the + matrix. It also holds every facility's upkeep per unit of output. + - The check is measured at the most input-hungry good/fast/cheap setting any facility may choose. + - Catalog validation computes it on every catalog build, and a failure names the cycle that carries the eigenvalue. +- `L-deep`: Every high-end good has a longest path of five or more recipe steps from extraction. The catalog check + reports depth per good, and Self names which goods count as high-end in the recipe cut. +- `L-recipe`: Every commodity has one authored recipe. The recipe names its inputs, its cycle, its workforce need, the + station kind that makes it and its lore hook. Every recipe input is a commodity, except in gear and hull recipes, + whose inputs are roles. No recipe is generated at runtime. +- `L-roles`: A gear or hull recipe names roles, never specific component commodities. Any commodity tagged for a role + can fill it. A higher-tech component therefore enters a design without a new gear recipe. +- `L-one-stock`: One owner, the stock ledger, holds every count of every good outside an entity's cargo. Station trade, + hauling, production, consumption, upkeep and destruction all change counts through its commits and nothing else. + Station cargo generated at zone creation is not a second stock. +- `L-graded`: Stock is held by grade. A production step's output grade is its facility's assembly, as the facility's + good/fast/cheap setting gives it, capped by the grades of the inputs it consumed. This is the + min-with-tolerance rule, so the best parts cannot rescue a poor assembly. No step other than production writes a + grade. +- `L-lot-at-boundary`: Stock becomes a `Lot` only when it crosses into an entity: on dock, by the transfer verb, by + seizure or by loot. The new lot carries a `Produced` or `Extracted` origin that names the station and facility it came + from. Its input lots are synthesised to agree with its grade. The ledger never mints a lot for stock that no entity + holds. +- `L-no-omniscience`: The player reads the economy only through the price band at stations they dock at, and through + records: obligations, notices, and scanned or seized manifests. Every record has an issuer, a date and a confidence. + No player-facing surface reads the stock ledger, needs tables or allocator state directly. +- `L-obligations`: All demand that is not gear reaches the world as obligations, which the owning faction's allocator + issues from unmet needs. Haulers, NPC or player, serve obligations, and the job board lists them. No other writer posts + work. +- `L-allocator`: Each faction names one compiled allocator per economy kind. An allocator reads needs, stock and prices. + It issues obligations, sets prices inside the band, sets rations, and chooses recipes and settings for its own + faction's facilities. It never writes a stock count. +- `L-workforce`: A facility's throughput is gated by a workforce of a kind its owning faction permits. Each kind's needs + are a needs table like any other. Zhestokost facilities never hold biodrones or AGI automation. +- `L-sinks`: Goods leave only by consumption (needs and recipe inputs), destruction (on screen, or the matchup model's + expected losses off screen) and upkeep. No stock decays with time. +- `L-no-stall`: A region left alone does not stall. Over the arena's generated seed set, a region simulated for the + check's horizon with no player keeps every recipe in its station-kind set producing. No commodity's regional output + sits at zero for longer than the check's window while its inputs exist in reach. No population falls to its floor and + stays there. The strategic arena runs this check, and its horizon and window are set in the stall-check cut. +- `L-one-sim`: The economy on screen and off screen is one set of rules. The off-screen tick is the same tick at reduced + detail: flows instead of ships, and the matchup model instead of combat. It is never a second model. This shares the + arena's `A-one-sim`, `A-pure` and `A-no-clock`. Every economic draw is a `SimulationDice` draw keyed by a structured + seed. +- `L-lore`: Every commodity carries a lore hook: what a player learns by inspecting or intercepting it. +- `L-one-kind-list`: The station kinds the simulation runs and the station kinds the hulls are authored for are one + catalog list. + +## 4. What is not a consumer, and not in scope + +Not consumers (nothing in this campaign keeps them working or compatible): + +- `DemandProfile` and `CompoundCommodityCategory`. Their deletion is ruled. +- `SimpleCommodityCategory` as a stored field. A commodity's stage is derived from its recipe: raw if extraction makes + it, processed otherwise. +- The gag compound commodities. +- `RandomProducts` used as station stock. +- Follow-up `station-restock`, which stockpiles supersede. +- The five deleted factory designs. +- The `INDEX.md` table's claim that factory designs exist. +- AetheriaEve, which is archived. + +Not in scope for this revision: + +- Ownership changing hands, expansion, the lore institutions as damping rules + (`snowball-damping-lore-institutions`) and strategic scoring. These come in the next revision of this target, and + they share these owners. +- Fitting the matchup model (campaign `aetheria-matchups`). This campaign consumes it through one typed predictor and + uses a fixed stub until it lands. +- Named, recoverable components and disassembly (`named-components-after-demo`). Role fills stay statistical on + lots. Stock is graded counts, not named parts. +- Alternative recipes per commodity, which would be production methods in the Victoria sense. Facilities trade off + good, fast and cheap. They do not switch recipes. +- An omniscient economy panel, now or as a debug view the player can reach. A developer view through Eve/CultMesh is + allowed and reads the same ledger. +- Runtime model calls, and agent-written content at runtime. Allocators ship compiled, like brains. +- Station hull art. The hull bench owns it. This campaign owns only the station-kind list the hulls are authored + against. + +## 5. Identity, lifecycle, authority (Eureka step 0b) + +| Kind | What names it | What happens to it over time | Who decides (owner; forbidden writers) | +|---|---|---|---| +| Commodity | A catalog record with a stable id and name. One commodity kind; its stage (raw or processed) is derived from its recipe, not stored. It may carry role tags naming the gear and hull roles it can fill | Authored as content from the lore, agent-written and reviewed by the operator, and revised by commit. It never changes during a run | Owner: the catalog, with the economy content pass as author. Forbidden: runtime creation, and a category field that disagrees with the recipe | +| Recipe | One per output commodity, keyed by that commodity's id. It names its inputs (commodity and count, or role for gear and hulls), its cycle, its workforce need, its station kind and its lore hook | Authored with its commodity. Catalog validation (`L-source-sink`, `L-productive`, `L-deep`, `L-lore`) checks it on every catalog build. It never changes during a run | Owner: the catalog. Checks: AetherDb validation. Forbidden: runtime-generated or allocator-edited recipes | +| Station kind | A catalog record with a stable id, such as `processing.smelter`. It names its facility slots (the recipes it may run), its resident population kind and its institution kind, and it maps each faction that builds it to a hull | Authored content that grows with the chains past 17. Each new kind is authored with the recipes that need it. The hull bench station round adds a model per faction that builds it (question `station-kind-before-model`) | Owner: the catalog, as the one list (`L-one-kind-list`). Kind data is authored by the economy content pass, and models by the hull bench (`faction-station-models`). Forbidden: `ZoneGenerator` drawing any station hull without a kind | +| Facility | (station id, slot ordinal). It holds its recipe, its owner (faction or corporation), its good/fast/cheap setting and its workforce slot | Built in place by its owner from raw materials, and retooled at a cost when its recipe or a sub-assembly changes (item-provenance F2). It runs, slows when short of workforce, idles when short of input, and is destroyed with its station | Owner: the facility's owner, through that faction's allocator, which sets recipe and setting. The production step runs it. Forbidden: any writer of its setting other than the owner | +| Stockpile | (holder station id, commodity, grade). The holder is a station; goods in a ship are cargo and become lots | Created on first deposit. Its count changes only through stock-ledger commits: produce, consume, upkeep, transfer (dock, transfer verb, off-screen haul flow), destroy. It is never decayed or regenerated | Owner: the stock ledger, one ServerShared owner (`L-one-stock`). Forbidden: trade menu, allocators, `GenerateStationLoadout` and any Unity type | +| Grade | A bin index on the existing quality scale. The bins are `GameplaySettings.Tiers`, the ones `GetTier` already reads, so a stock grade and an item's tier mean one thing | Fixed per catalog revision. Stock's grade is set when it is produced and never changes. A lot minted from stock draws its assembly and fills inside the grade's bin | Owner: the production step, by `L-graded`. Bins: `GameplaySettings`. Forbidden: price, allocators or records writing a grade | +| Workforce | Its kind is a catalog record (human, a supplier's biodrone line, automation) with its own needs table. A facility's staffing is (facility, kind, count) | Humans live in residential stations and staff facilities (question `human-workforce-mobility`). Biodrones are bought as cargo, which is stock until installed in a facility, and then draw their feed and limiter upkeep as needs. Automation is built where its faction allows it | Owner: kinds in the catalog, and which kinds a faction permits on the faction record. Staffing: the strategic tick's population step. Forbidden: a facility staffed by a kind its faction does not permit | +| Population or institution | (station, population or institution kind), with a size | Grows while its basic needs are met. Under a sustained shortfall it shrinks slowly, down to a floor, so a region can recover. Size scales its needs table | Owner: the population step of the strategic tick. Forbidden: needs read as fixed numbers that ignore size | +| Needs table | One catalog record per population, institution or workforce kind: commodity (or role) to a per-capita rate, split into basic and lifestyle | Authored, and revised by commit. Scaled by size every tick and never stored per instance. Biodrone tables carry no entertainment or lifestyle rows (`typed-workforce`) | Owner: the catalog. Forbidden: `DemandProfile`, and any demand formula outside the tables | +| Obligation | (issuer faction, issuing station, ordinal). It holds a kind (quota, purchase order, contract, bounty), a commodity, a grade floor, a quantity, a deadline, a reward and a consequence | The allocator issues it from an unmet need. A hauler, NPC or player, claims it. A delivery commit through the stock ledger fulfils it, or its deadline passes and the issuer applies the consequence. It is never edited: a revised demand is a new obligation that supersedes the old | Owner: the issuing faction's allocator. The job board lists obligations and decides nothing. Forbidden: a job generator of its own (`Galaxy.cs:578` placeholder), and work with no issuer | +| Allocator | A compiled C# class with a stable id per economy kind: `plan`, `market`, `project-contract`, `contraband`. The faction record names its allocator | Code, revised by commits and versioned like arena brains. Each tick it reads needs, stock and prices. It writes obligations, prices within the band, rations, and recipes and settings for its own facilities | Owner: the allocator registry, compiled (`A-compiled`). Forbidden: runtime-loaded or model-written allocators, and an allocator writing a stock count | +| Price band | (station, commodity, grade). The catalog price is the base; the band width is a parameter of the station's allocator | Derived each tick from stock against the allocator's target, inside the band. A plan allocator may hold its band narrow and ration instead | Owner: the station's allocator, within the band. `StationServices` reads the price and decides none of it. Forbidden: a price from catalog price and quality alone once stock exists | +| Notice or record | (issuer, subject, issued date). It holds a confidence and its source: dock, broadcast, scan or seizure. A manifest is a record of one cargo | Created when the player docks, hears a broadcast, scans or seizes. It is never updated, so it grows stale with age. It may be false, if its issuer lies | Owner: the record maker, from obligations and stock at the moment of issue, through the issuer's honesty policy. The player's surfaces read only records and the price band (`L-no-omniscience`). Forbidden: any UI reading the stock ledger | +| Region boundary | The region's wormhole gate | Depends on question `region-boundary`: either nothing crosses it, or an authored outside market trades through it at band prices and a capped rate | Owner: the outside-market record, if the ruling makes one. Until then this row is the question | + +The table leaves three cells to questions: human workforce movement, the station-kind stand-in, and the region +boundary. Every other cell is filled from rulings or Body facts. + +## 6. Cut sequence + +Each line names its cut and what it waits on. + +1. `catalog-subtraction`: delete `DemandProfile`, `CompoundCommodityCategory`, the stored `SimpleCommodityCategory` and + the gag compounds; withdraw `station-restock`; mark the `INDEX.md` factory-design line stale. Waits on nothing. +2. `station-kind-datum`: add the station-kind record and the hull per (faction, kind); `ZoneGenerator` places stations + by kind (closing `station-hull-source-fit` item 3). Waits on 1 and on question `station-kind-before-model`. +3. `commodities-and-recipes`: the lore-built commodity set, seeded from `Economy/Item Hooks/`, and recipes with role + inputs for gear. It also adds the new station kinds and the catalog checks (`L-source-sink`, `L-productive`, `L-deep`, + `L-recipe`, `L-lore`). It is an economy content pass (agent-authored, operator reviews) plus one Hands cut for the + schema and the checks. Waits on 2. +4. `stock-ledger`: stockpiles by (station, commodity, grade); station trade materialises lots on dock + (`L-lot-at-boundary`); delete `RandomProducts` as station stock. Waits on 3. +5. `facilities-and-setting`: facility records, the production step, the good/fast/cheap setting and grade output by + `L-graded`. Waits on 4. +6. `workforce`: workforce kinds, faction permits, residential staffing, and biodrone cargo and upkeep. Waits on 5 and on + question `human-workforce-mobility`. +7. `needs-and-obligations`: needs tables, population size, obligations, and the job board reading them. Waits on 4 and 6. +8. `allocators`: the four compiled allocators, the faction record naming one, the price band and rations. Waits on 7. +9. `off-screen-tick`: every zone in the region ticks the economy at reduced detail under `SimClock`; hauling as flows; + the matchup predictor stub as the destruction sink; it runs in the arena runner; the region boundary goes in here. + Waits on 8, on aetheria-arena cuts 1 and 5, and on question `region-boundary`. +10. `legibility`: notices, records, manifests on scan or seizure, and the price band shown at dock. Waits on 7 and 9. +11. `stall-checks`: the strategic arena runs `L-no-stall` and runtime `L-source-sink` over generated seeds and reports + the horizon and window. Waits on 9 and on aetheria-arena cut 6. + +**Who authors the new station kinds.** Deep chains grow the kind list past 17. + +- **Kind data.** The economy content pass authors each new kind in cut 3, together with the recipes that need it. That + pass is Imagination with lore authoring, agent-written, and the operator reviews it as she reviews recipes. +- **Models.** The hull bench station round authors a model for each (faction, kind) pair under `faction-station-models`. + Its next round takes its brief list from cut 3's new kinds, and question `station-kind-before-model` decides what + stands on screen until each model lands. From d61948f6dcfbcb262a31d0ddc775bdb902d2c965 Mon Sep 17 00:00:00 2001 From: soul Date: Thu, 22 Oct 2026 17:25:36 +0200 Subject: [PATCH 002/713] Living-world target r2: consumer goods share gear's components, the gate is an exchange, crews are zone-local - L-consumer-demand: every component commodity has a consumer-good sink, enforced by the catalog check - L-source-sink counts the gate's outside market; L-gate-cap sits beside L-no-stall - L-zone-crew: human crews come from their own zone; people move by migration - Station kinds name a stand-in kind until their model lands - DemandProfile is deleted in cut 1 (demandprofile-goes-in-cut-1); the compound records and the Ammo commodity stay - Cut sequence: cut 2 no longer waits on cut 1; cuts 6 and 9 no longer wait on questions Co-Authored-By: Claude Opus 5.5 --- docs/aetheria-living-world-target.md | 153 +++++++++++++++++++-------- 1 file changed, 107 insertions(+), 46 deletions(-) diff --git a/docs/aetheria-living-world-target.md b/docs/aetheria-living-world-target.md index dda9ae573..b0e8a99fc 100644 --- a/docs/aetheria-living-world-target.md +++ b/docs/aetheria-living-world-target.md @@ -1,6 +1,10 @@ -# Aetheria living world: target, revision 1 (the economy) +# Aetheria living world: target, revision 2 (the economy) -Date: 2026-10-22. Status: target, drafted by Imagination (session self-2026-10-19-ag7) for Self to admit. +Date: 2026-10-22. Status: target, drafted by Imagination (session self-2026-10-19-ag7) for Self to admit. Revision 2 +takes in the day's later rulings: consumer goods built from gear's components (`consumer-goods-share-gear-components`), +DemandProfile deleted in cut 1 (`demandprofile-goes-in-cut-1`), the gate as an exchange (`region-gate-is-an-exchange`), +zone-local workforce (`workforce-is-zone-local`), the station-kind stand-in (`station-kind-family-stand-in`) and +give-only transfer (`transfer-is-give-only`). Body pinned at `GameCult/Aetheria` origin/master `5c38029e`. This revision covers the economy. The rest of the strategic layer arrives in a later revision of this document: holdings changing hands, expansion, the lore institutions as damping rules, and the strategic arena's scoring. @@ -29,10 +33,21 @@ The rulings fix its shape: A maker may bin one design into several products (`maker-design-tiers-allowed`). - **Demand.** Demand that is not gear comes from authored needs tables for population and institution kinds. The owning faction issues unmet needs as obligations: quota, purchase order, contract or bounty (`demand-is-obligations`). + DemandProfile is obsolete and goes in the first cut. The operator: "DemandProfile was a crude field that this work + clearly replaces with much more nuanced push and pull" (`demandprofile-goes-in-cut-1`). +- **Consumer goods.** The old joke compounds become consumer products. Like gear, they are built by role from the same + component commodities gear uses. The operator: "consumers provide predictable demand for compound commodities in the + tree. The same cognition substrate that goes in your gear's automation components can also make someone's toaster + smart" (`consumer-goods-share-gear-components`). Her examples illustrate; the set is not closed. +- **The region's edge.** The gate is an exchange with an authored outside market at band prices and a capped rate. A + good the region cannot make costs the outside price plus the haul, and a blockade of the gate is felt as shortages + (`region-gate-is-an-exchange`). - **Allocators.** Faction economies are compiled allocators, one per economy kind (plan, market, project contract, contraband). They all run over one needs-and-stockpile layer (`allocator-per-economy-kind`, `faction-economic-models`). - **Labour.** Labour is a typed input, and every workforce kind has its own needs (`typed-workforce`). Zhestokost - permits no biodrones and no AGI automation (`faction-economic-models`). + permits no biodrones and no AGI automation (`faction-economic-models`). Human crews live in residential stations in + their facility's own zone; between zones people move only by slow off-screen migration toward work and goods. + Biodrones remain cargo (`workforce-is-zone-local`). - **Sinks.** Goods leave by consumption, destruction and upkeep. There is no general decay (`sinks-consume-destroy-maintain`). Fights off screen destroy goods by the composition model's expected losses (`matchup-composition-model`). @@ -40,9 +55,12 @@ The rulings fix its shape: an issuer, a date and a confidence, and it can be stale, wrong or a lie (`shortages-are-records-and-price-band`). - **Cargo is lore.** An intercepted shipment labelled biodrones is a way into the world (`catalog-crafting-chains`). - **Stations.** Each faction gets stations for each part of its economy. The hull kinds and the simulation's station - kinds are one list (`stations-represent-faction-economy`, `faction-station-models`). -- **Goods move** on dock, into enclosed bays (`docking-is-enclosed-bays`), or by the ship-to-ship transfer verb - (`tender-transfer-verb`). + kinds are one list (`stations-represent-faction-economy`, `faction-station-models`). A new kind whose faction has no + model yet stands in with that faction's model of the nearest existing kind, keeping its own name, facilities and + stock (`station-kind-family-stand-in`). +- **Goods move** on dock, into enclosed bays where the docked entity leaves space (`docking-is-enclosed-bays`), or by + the ship-to-ship transfer verb (`tender-transfer-verb`). A transfer is always a give by the holder's own pilot + (`transfer-is-give-only`). Prior art (`docs/research/2026-10-22-crafting-chains-prior-art.md`) names the failure modes this target is built against: @@ -61,11 +79,24 @@ The Leontief and Hawkins-Simon conditions give the catalog a productivity check Minerals, Metals, Alloys, Compounds, Organics, Ammo and Consumer. The enum mixes raw goods with processed ones, and its stage is not derivable from anything. `CompoundCommodityData` (`ItemData.cs:353`) carries `DemandProfile`, a Big Five weight map over `PersonalityAttribute`, and `CompoundCommodityCategory`. No code reads `DemandProfile`. - `PersonalityAttribute` stays because `Corporations.cs:28` also uses it. The compound set is a set of gag placeholders, - not lore (predecessor's pass). + `PersonalityAttribute` stays because `Corporations.cs:28` also uses it. The only reader of either category is + `TradeMenu` (`UI/Menu/TradeMenu.cs:31-32,65-151,200-216,240-244`): two filter dropdowns and the Type column. +- **What the catalog holds** (read through `AetheriaStores.Open` on the LFS file at 5c38029e). 13 simple commodities: + Minerals (Rock, Hydrogen, Potassium), Metals (New Metals, Uranium, Gold), Compounds (Methane, Water), Organics (Algae, + Bacteria, Fungi, Animal Products) and Ammo (one commodity, `Ammo`); no record is Alloys or Consumer. 51 compound + commodities, none with roles and none sold by a product. Four carry a DemandProfile (Neural Lace, Sure Bet Sherbet + Fountain, Super Tough Toffee, Holo-desk: seven keys in all). By the old category they split into consumer-shaped goods + (Wearables 9, Consumables 3, Luxuries 8, Tools 7) and component-shaped ones (Manufacturing 18, such as Circuit Board, + Heat Sink Tile, Sheet Metal, Support Strut, Fuel; Assemblies 6, such as Reaction Chamber, Cockpit, Cargo Pod). The + content pass in cut 3 reads that split from this list and from git history; the field itself goes in cut 1. +- **The Ammo commodity is live.** `Weapon.AmmoType` (`Behaviors/Weapon.cs:64`) references it: the Autocannon and the + point-defence and flak designs draw it (seven references in the catalog), and `EvasionTrackingTests.cs:362-396` pins + that. Its replacement by branded rounds of a calibre belongs to follow-ups `branded-ammo-calibre` and `matrix-rounds`, + not to this campaign. Only the `Ammo` value of `SimpleCommodityCategory` goes, with the enum. - **No recipes.** No recipe or facility record exists. The five factory designs (Refinery, Assembly Line, Shipyard, Surface and Deep Ore Extractor) were deleted in `653ba490`. The station round's `INDEX.md` still lists them as a - source, so it is stale on that point. + source, so it is stale on that point. That file is not in the repo: it is + `F:\Projects\eureka-handoff-aux-2026-10-19\hull-bench\round2\briefs\stations\INDEX.md`, line 23. - **Provenance.** It has the forward shape and no writer. `Produced {Faction, Station, Facility, Inputs}` and `Extracted {Zone, Commodity}` exist (`Provenance.cs:122-137`), and only tests construct them. Every mint writes an `Attributed` placeholder. `ProvenanceLedger.Reachable` already closes over `Produced.Facility` and `Inputs`. @@ -90,9 +121,18 @@ The Leontief and Hawkins-Simon conditions give the catalog a productivity check These are the ends. Each label is what Soul measures against. -- `L-source-sink`: Every commodity has at least one source and at least one sink. A source is an extraction recipe or a - recipe output. A sink is a recipe input, a role fill, a needs-table entry, an upkeep entry, or destruction for gear and - hulls. The catalog check refuses a commodity that has either one missing. +- `L-source-sink`: Every commodity has at least one source and at least one sink. A source is an extraction recipe, a + recipe output, or the region gate's outside market selling it. A sink is a recipe input, a role fill, a needs-table + entry, an upkeep entry, destruction for gear and hulls, or the outside market buying it. The catalog check refuses a + commodity that has either one missing. +- `L-consumer-demand`: Every component commodity also has a consumer sink. A component commodity is one tagged for a + role that some gear or hull recipe names. Its consumer sink is a consumer-good recipe that takes it by role, where a + consumer good is a commodity that some population or institution needs table names. The gate does not count here: the + demand must be the region's own. The catalog check refuses a component with no consumer sink. The role-fill half is + checked from cut 3 and the needs-table half from cut 7. + - Why it is enforced rather than reported: the ruling makes consumer demand part of how the economy stays stable, and + a catalog-wide property that is only reported rots as content grows. A component that seems military only is a + content prompt (a fuze also fires a mining charge), not an exemption. No exemption list exists. - `L-productive`: The recipe graph is productive. Its input matrix A has spectral radius below 1 (Hawkins-Simon). - A is augmented with each workforce kind's needs per unit of labour, so the labour, food and labour loop is in the matrix. It also holds every facility's upkeep per unit of output. @@ -101,10 +141,10 @@ These are the ends. Each label is what Soul measures against. - `L-deep`: Every high-end good has a longest path of five or more recipe steps from extraction. The catalog check reports depth per good, and Self names which goods count as high-end in the recipe cut. - `L-recipe`: Every commodity has one authored recipe. The recipe names its inputs, its cycle, its workforce need, the - station kind that makes it and its lore hook. Every recipe input is a commodity, except in gear and hull recipes, - whose inputs are roles. No recipe is generated at runtime. -- `L-roles`: A gear or hull recipe names roles, never specific component commodities. Any commodity tagged for a role - can fill it. A higher-tech component therefore enters a design without a new gear recipe. + station kind that makes it and its lore hook. Every recipe input is a commodity, except in gear, hull and consumer-good + recipes, whose inputs are roles. No recipe is generated at runtime. +- `L-roles`: A gear, hull or consumer-good recipe names roles, never specific component commodities. Any commodity + tagged for a role can fill it. A higher-tech component therefore enters a design, or a toaster, without a new recipe. - `L-one-stock`: One owner, the stock ledger, holds every count of every good outside an entity's cargo. Station trade, hauling, production, consumption, upkeep and destruction all change counts through its commits and nothing else. Station cargo generated at zone creation is not a second stock. @@ -127,34 +167,49 @@ These are the ends. Each label is what Soul measures against. faction's facilities. It never writes a stock count. - `L-workforce`: A facility's throughput is gated by a workforce of a kind its owning faction permits. Each kind's needs are a needs table like any other. Zhestokost facilities never hold biodrones or AGI automation. +- `L-zone-crew`: A facility's human crew comes only from residential populations in its own zone. People cross zones + only through the population step's migration, which is slow and moves toward work and goods. Biodrones are cargo and + move as stock. - `L-sinks`: Goods leave only by consumption (needs and recipe inputs), destruction (on screen, or the matchup model's - expected losses off screen) and upkeep. No stock decays with time. + expected losses off screen), upkeep, and export through the region gate. No stock decays with time. +- `L-gate-cap`: The region gate trades each commodity at no more than its capped rate per tick, at band prices around + the outside market's price. Imports cost the outside price plus the haul. Its flows are stock-ledger commits like any + other. The cap is below the region's demand for every good its kind set can make, so the gate supplements an + in-region chain and cannot stand in for a broken one. - `L-no-stall`: A region left alone does not stall. Over the arena's generated seed set, a region simulated for the check's horizon with no player keeps every recipe in its station-kind set producing. No commodity's regional output sits at zero for longer than the check's window while its inputs exist in reach. No population falls to its floor and - stays there. The strategic arena runs this check, and its horizon and window are set in the stall-check cut. + stays there. The gate is open at its cap (`L-gate-cap`) while the check runs, so it counts imports as inputs in reach + but cannot hide a chain that only the gate keeps alive. The strategic arena runs this check, and its horizon and window + are set in the stall-check cut. - `L-one-sim`: The economy on screen and off screen is one set of rules. The off-screen tick is the same tick at reduced detail: flows instead of ships, and the matchup model instead of combat. It is never a second model. This shares the arena's `A-one-sim`, `A-pure` and `A-no-clock`. Every economic draw is a `SimulationDice` draw keyed by a structured seed. - `L-lore`: Every commodity carries a lore hook: what a player learns by inspecting or intercepting it. - `L-one-kind-list`: The station kinds the simulation runs and the station kinds the hulls are authored for are one - catalog list. + catalog list. A kind whose faction has no model yet names its stand-in kind on its own record. It is placed with that + faction's model of the stand-in kind, keeping its own name, facilities and stock, and the stand-in reference is + deleted when the model lands. ## 4. What is not a consumer, and not in scope Not consumers (nothing in this campaign keeps them working or compatible): -- `DemandProfile` and `CompoundCommodityCategory`. Their deletion is ruled. -- `SimpleCommodityCategory` as a stored field. A commodity's stage is derived from its recipe: raw if extraction makes - it, processed otherwise. -- The gag compound commodities. +- `DemandProfile`, deleted in cut 1 (`demandprofile-goes-in-cut-1`). +- `CompoundCommodityCategory` and `SimpleCommodityCategory` as stored fields, deleted in cut 1, with the trade menu's + two filters that read them. A commodity's stage is derived from its recipe: raw if extraction makes it, processed + otherwise. Whether it is a component is said by its role tags, and whether it is a consumer good by the needs tables + that name it. A stored category would be a third answer that can disagree with both. - `RandomProducts` used as station stock. - Follow-up `station-restock`, which stockpiles supersede. - The five deleted factory designs. - The `INDEX.md` table's claim that factory designs exist. - AetheriaEve, which is archived. +Kept, and not this campaign's to delete: the 51 compound commodity records, which become consumer goods and components +in cut 3 (`consumer-goods-share-gear-components`), and the `Ammo` commodity, which weapons draw today (section 2). + Not in scope for this revision: - Ownership changing hands, expansion, the lore institutions as damping rules @@ -176,55 +231,61 @@ Not in scope for this revision: | Kind | What names it | What happens to it over time | Who decides (owner; forbidden writers) | |---|---|---|---| -| Commodity | A catalog record with a stable id and name. One commodity kind; its stage (raw or processed) is derived from its recipe, not stored. It may carry role tags naming the gear and hull roles it can fill | Authored as content from the lore, agent-written and reviewed by the operator, and revised by commit. It never changes during a run | Owner: the catalog, with the economy content pass as author. Forbidden: runtime creation, and a category field that disagrees with the recipe | +| Commodity | A catalog record with a stable id and name. One commodity kind; its stage (raw or processed) is derived from its recipe, not stored. It may carry role tags naming the gear, hull and consumer-good roles it can fill. A consumer good is a commodity a needs table names; its recipe takes roles, as gear's does | Authored as content from the lore, agent-written and reviewed by the operator, and revised by commit. It never changes during a run | Owner: the catalog, with the economy content pass as author. Forbidden: runtime creation, and a category field that disagrees with the recipe | | Recipe | One per output commodity, keyed by that commodity's id. It names its inputs (commodity and count, or role for gear and hulls), its cycle, its workforce need, its station kind and its lore hook | Authored with its commodity. Catalog validation (`L-source-sink`, `L-productive`, `L-deep`, `L-lore`) checks it on every catalog build. It never changes during a run | Owner: the catalog. Checks: AetherDb validation. Forbidden: runtime-generated or allocator-edited recipes | -| Station kind | A catalog record with a stable id, such as `processing.smelter`. It names its facility slots (the recipes it may run), its resident population kind and its institution kind, and it maps each faction that builds it to a hull | Authored content that grows with the chains past 17. Each new kind is authored with the recipes that need it. The hull bench station round adds a model per faction that builds it (question `station-kind-before-model`) | Owner: the catalog, as the one list (`L-one-kind-list`). Kind data is authored by the economy content pass, and models by the hull bench (`faction-station-models`). Forbidden: `ZoneGenerator` drawing any station hull without a kind | +| Station kind | A catalog record with a stable id, such as `processing.smelter`. It names its facility slots (the recipes it may run), its resident population kind and its institution kind, and it maps each faction that builds it to a hull. Until that faction's model exists, the mapping names a stand-in kind instead, whose hull for that faction is used (`station-kind-family-stand-in`) | Authored content that grows with the chains past 17. Each new kind is authored with the recipes that need it and its stand-in. The hull bench station round adds a model per faction that builds it, and that commit replaces the stand-in reference with the hull | Owner: the catalog, as the one list (`L-one-kind-list`). Kind data is authored by the economy content pass, and models by the hull bench (`faction-station-models`). Forbidden: `ZoneGenerator` drawing any station hull without a kind | | Facility | (station id, slot ordinal). It holds its recipe, its owner (faction or corporation), its good/fast/cheap setting and its workforce slot | Built in place by its owner from raw materials, and retooled at a cost when its recipe or a sub-assembly changes (item-provenance F2). It runs, slows when short of workforce, idles when short of input, and is destroyed with its station | Owner: the facility's owner, through that faction's allocator, which sets recipe and setting. The production step runs it. Forbidden: any writer of its setting other than the owner | | Stockpile | (holder station id, commodity, grade). The holder is a station; goods in a ship are cargo and become lots | Created on first deposit. Its count changes only through stock-ledger commits: produce, consume, upkeep, transfer (dock, transfer verb, off-screen haul flow), destroy. It is never decayed or regenerated | Owner: the stock ledger, one ServerShared owner (`L-one-stock`). Forbidden: trade menu, allocators, `GenerateStationLoadout` and any Unity type | | Grade | A bin index on the existing quality scale. The bins are `GameplaySettings.Tiers`, the ones `GetTier` already reads, so a stock grade and an item's tier mean one thing | Fixed per catalog revision. Stock's grade is set when it is produced and never changes. A lot minted from stock draws its assembly and fills inside the grade's bin | Owner: the production step, by `L-graded`. Bins: `GameplaySettings`. Forbidden: price, allocators or records writing a grade | -| Workforce | Its kind is a catalog record (human, a supplier's biodrone line, automation) with its own needs table. A facility's staffing is (facility, kind, count) | Humans live in residential stations and staff facilities (question `human-workforce-mobility`). Biodrones are bought as cargo, which is stock until installed in a facility, and then draw their feed and limiter upkeep as needs. Automation is built where its faction allows it | Owner: kinds in the catalog, and which kinds a faction permits on the faction record. Staffing: the strategic tick's population step. Forbidden: a facility staffed by a kind its faction does not permit | +| Workforce | Its kind is a catalog record (human, a supplier's biodrone line, automation) with its own needs table. A facility's staffing is (facility, kind, count) | Humans live in residential stations and staff facilities in the same zone only; between zones they move by the population step's slow migration toward work and goods (`workforce-is-zone-local`, `L-zone-crew`). Passenger transport may come later as content. Biodrones are bought as cargo, which is stock until installed in a facility, and then draw their feed and limiter upkeep as needs. Automation is built where its faction allows it | Owner: kinds in the catalog, and which kinds a faction permits on the faction record. Staffing: the strategic tick's population step. Forbidden: a facility staffed by a kind its faction does not permit | | Population or institution | (station, population or institution kind), with a size | Grows while its basic needs are met. Under a sustained shortfall it shrinks slowly, down to a floor, so a region can recover. Size scales its needs table | Owner: the population step of the strategic tick. Forbidden: needs read as fixed numbers that ignore size | | Needs table | One catalog record per population, institution or workforce kind: commodity (or role) to a per-capita rate, split into basic and lifestyle | Authored, and revised by commit. Scaled by size every tick and never stored per instance. Biodrone tables carry no entertainment or lifestyle rows (`typed-workforce`) | Owner: the catalog. Forbidden: `DemandProfile`, and any demand formula outside the tables | | Obligation | (issuer faction, issuing station, ordinal). It holds a kind (quota, purchase order, contract, bounty), a commodity, a grade floor, a quantity, a deadline, a reward and a consequence | The allocator issues it from an unmet need. A hauler, NPC or player, claims it. A delivery commit through the stock ledger fulfils it, or its deadline passes and the issuer applies the consequence. It is never edited: a revised demand is a new obligation that supersedes the old | Owner: the issuing faction's allocator. The job board lists obligations and decides nothing. Forbidden: a job generator of its own (`Galaxy.cs:578` placeholder), and work with no issuer | | Allocator | A compiled C# class with a stable id per economy kind: `plan`, `market`, `project-contract`, `contraband`. The faction record names its allocator | Code, revised by commits and versioned like arena brains. Each tick it reads needs, stock and prices. It writes obligations, prices within the band, rations, and recipes and settings for its own facilities | Owner: the allocator registry, compiled (`A-compiled`). Forbidden: runtime-loaded or model-written allocators, and an allocator writing a stock count | | Price band | (station, commodity, grade). The catalog price is the base; the band width is a parameter of the station's allocator | Derived each tick from stock against the allocator's target, inside the band. A plan allocator may hold its band narrow and ration instead | Owner: the station's allocator, within the band. `StationServices` reads the price and decides none of it. Forbidden: a price from catalog price and quality alone once stock exists | | Notice or record | (issuer, subject, issued date). It holds a confidence and its source: dock, broadcast, scan or seizure. A manifest is a record of one cargo | Created when the player docks, hears a broadcast, scans or seizes. It is never updated, so it grows stale with age. It may be false, if its issuer lies | Owner: the record maker, from obligations and stock at the moment of issue, through the issuer's honesty policy. The player's surfaces read only records and the price band (`L-no-omniscience`). Forbidden: any UI reading the stock ledger | -| Region boundary | The region's wormhole gate | Depends on question `region-boundary`: either nothing crosses it, or an authored outside market trades through it at band prices and a capped rate | Owner: the outside-market record, if the ruling makes one. Until then this row is the question | +| Population or institution migration | (from zone, to zone, population kind), a flow per tick | The population step moves people slowly toward zones with unfilled work and met needs. It is a flow, never a ship | Owner: the population step. Forbidden: any other writer of a population's size or zone | +| Region boundary (outside market) | One catalog record per region gate: per commodity, an outside price, whether it buys, sells or both, and a capped rate per tick | Authored, and revised by commit. Each tick the gate step trades at band prices around the outside price, up to the cap, through stock-ledger commits. A blockade of the gate stops its flows (`region-gate-is-an-exchange`) | Owner: the catalog for the record; the gate step of the strategic tick for the flows. Checks: `L-source-sink` counts it, `L-consumer-demand` does not. Forbidden: flows above the cap, and a gate writing stock other than by ledger commits | -The table leaves three cells to questions: human workforce movement, the station-kind stand-in, and the region -boundary. Every other cell is filled from rulings or Body facts. +Every cell is filled from rulings or Body facts. ## 6. Cut sequence Each line names its cut and what it waits on. -1. `catalog-subtraction`: delete `DemandProfile`, `CompoundCommodityCategory`, the stored `SimpleCommodityCategory` and - the gag compounds; withdraw `station-restock`; mark the `INDEX.md` factory-design line stale. Waits on nothing. -2. `station-kind-datum`: add the station-kind record and the hull per (faction, kind); `ZoneGenerator` places stations - by kind (closing `station-hull-source-fit` item 3). Waits on 1 and on question `station-kind-before-model`. -3. `commodities-and-recipes`: the lore-built commodity set, seeded from `Economy/Item Hooks/`, and recipes with role - inputs for gear. It also adds the new station kinds and the catalog checks (`L-source-sink`, `L-productive`, `L-deep`, - `L-recipe`, `L-lore`). It is an economy content pass (agent-authored, operator reviews) plus one Hands cut for the - schema and the checks. Waits on 2. +1. `catalog-subtraction`: delete `DemandProfile` and both stored categories with their enums, and the trade menu's two + category filters; withdraw `station-restock`; mark the `INDEX.md` factory-design line stale. The compound records + and the `Ammo` commodity stay. Waits on nothing. +2. `station-kind-datum`: add the station-kind record, the hull per (faction, kind) and the stand-in kind + (`station-kind-family-stand-in`); `ZoneGenerator` places stations by kind (closing `station-hull-source-fit` item 3). + Waits on nothing; it touches no file cut 1 touches. +3. `commodities-and-recipes`: the lore-built commodity set, seeded from `Economy/Item Hooks/` and from the 51 kept + compounds, which become consumer goods and components; recipes with role inputs for gear, hulls and consumer goods; + the region gate's outside-market record. It also adds the new station kinds and the catalog checks (`L-source-sink` + counting the gate, `L-consumer-demand`'s role-fill half, `L-productive`, `L-deep`, `L-recipe`, `L-lore`). It is an + economy content pass (agent-authored, operator reviews) plus one Hands cut for the schema and the checks. Waits on 1 + and 2. 4. `stock-ledger`: stockpiles by (station, commodity, grade); station trade materialises lots on dock (`L-lot-at-boundary`); delete `RandomProducts` as station stock. Waits on 3. 5. `facilities-and-setting`: facility records, the production step, the good/fast/cheap setting and grade output by `L-graded`. Waits on 4. -6. `workforce`: workforce kinds, faction permits, residential staffing, and biodrone cargo and upkeep. Waits on 5 and on - question `human-workforce-mobility`. -7. `needs-and-obligations`: needs tables, population size, obligations, and the job board reading them. Waits on 4 and 6. +6. `workforce`: workforce kinds, faction permits, residential staffing from the facility's own zone (`L-zone-crew`), + and biodrone cargo and upkeep. Waits on 5. +7. `needs-and-obligations`: needs tables, population size, obligations, and the job board reading them; the + needs-table half of `L-consumer-demand`. Waits on 4 and 6. 8. `allocators`: the four compiled allocators, the faction record naming one, the price band and rations. Waits on 7. 9. `off-screen-tick`: every zone in the region ticks the economy at reduced detail under `SimClock`; hauling as flows; - the matchup predictor stub as the destruction sink; it runs in the arena runner; the region boundary goes in here. - Waits on 8, on aetheria-arena cuts 1 and 5, and on question `region-boundary`. + the matchup predictor stub as the destruction sink; it runs in the arena runner; the gate step trades with the + outside market at its cap (`L-gate-cap`); the population step migrates people between zones. Waits on 8 and on + aetheria-arena cuts 1 and 5. 10. `legibility`: notices, records, manifests on scan or seizure, and the price band shown at dock. Waits on 7 and 9. -11. `stall-checks`: the strategic arena runs `L-no-stall` and runtime `L-source-sink` over generated seeds and reports - the horizon and window. Waits on 9 and on aetheria-arena cut 6. +11. `stall-checks`: the strategic arena runs `L-no-stall`, with the gate open at its cap, and runtime `L-source-sink` + over generated seeds and reports the horizon and window. Waits on 9 and on aetheria-arena cut 6. **Who authors the new station kinds.** Deep chains grow the kind list past 17. - **Kind data.** The economy content pass authors each new kind in cut 3, together with the recipes that need it. That pass is Imagination with lore authoring, agent-written, and the operator reviews it as she reviews recipes. - **Models.** The hull bench station round authors a model for each (faction, kind) pair under `faction-station-models`. - Its next round takes its brief list from cut 3's new kinds, and question `station-kind-before-model` decides what - stands on screen until each model lands. + Its next round takes its brief list from cut 3's new kinds. Until each model lands, the kind stands in with its + faction's model of the stand-in kind its record names (`station-kind-family-stand-in`). From 8b0b50382a56a86becf6b350821f83f56f2ac281 Mon Sep 17 00:00:00 2001 From: soul Date: Thu, 22 Oct 2026 20:23:17 +0200 Subject: [PATCH 003/713] WeaponData: drop the dead [Union] list; BehaviorData's union owns behavior arms Co-Authored-By: Claude Sonnet 5.5 --- Assets/Scripts/ServerShared/Behaviors/Weapon.cs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Assets/Scripts/ServerShared/Behaviors/Weapon.cs b/Assets/Scripts/ServerShared/Behaviors/Weapon.cs index 12166d46c..cb42d6bd4 100644 --- a/Assets/Scripts/ServerShared/Behaviors/Weapon.cs +++ b/Assets/Scripts/ServerShared/Behaviors/Weapon.cs @@ -11,12 +11,7 @@ using Newtonsoft.Json; using CultMath; using static CultMath.math; -[Inspectable, - Union(0, typeof(InstantWeaponData)), - Union(1, typeof(LauncherData)), - Union(2, typeof(ConstantWeaponData)), - Union(3, typeof(ChargedWeaponData)), - RuntimeInspectable] +[Inspectable, RuntimeInspectable] public abstract class WeaponData : BehaviorData { [Inspectable, JsonProperty("damageType"), Key(1), RuntimeInspectable] From 1dce24a226277d8570a3a40eb17d282fd04c746d Mon Sep 17 00:00:00 2001 From: soul Date: Thu, 22 Oct 2026 20:23:23 +0200 Subject: [PATCH 004/713] Pin CultLib 2.0.0 (42dce361) and CultMath 0.5.0 (7a8933b0): manifest tags and build revisions Co-Authored-By: Claude Sonnet 5.5 --- Directory.Build.props | 8 ++++---- Packages/manifest.json | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 190e89780..e17a8e5d5 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -2,12 +2,12 @@ $(CULTLIB_ROOT) $(MSBuildThisFileDirectory)..\CultLib - - 45c2f4006f5f7dab357426cabd3197e8d0a17f66 + + 42dce3611a81adc5c5fac54cadbaa5637d6022d3 $(CULTMATH_ROOT) $(CultLibRoot) - - 9c1b06cd703bfa44352050e819b0d0659cf5978a + + 7a8933b085468e1fc6f9d3bce4a85e7d101aaca3 C:\Program Files\Git\cmd\git.exe git diff --git a/Packages/manifest.json b/Packages/manifest.json index 2dd2a3bb3..d4dafcbf2 100644 --- a/Packages/manifest.json +++ b/Packages/manifest.json @@ -52,8 +52,8 @@ "com.unity.modules.vr": "1.0.0", "com.unity.modules.wind": "1.0.0", "com.unity.modules.xr": "1.0.0", - "org.gamecult.caching.unity": "https://github.com/GameCult/CultLib.git?path=/src/GameCult.Unity/Assets/Caching#caching-unity-v1.4.0", - "org.gamecult.cultlib": "https://github.com/GameCult/CultLib.git?path=/unity/org.gamecult.cultlib#cultlib-unity-v1.0.60", - "org.gamecult.cultmath": "https://github.com/GameCult/CultLib.git?path=/packages/cultmath/unity/org.gamecult.cultmath#cultmath-unity-v0.4.1" + "org.gamecult.caching.unity": "https://github.com/GameCult/CultLib.git?path=/src/GameCult.Unity/Assets/Caching#caching-unity-v2.0.0", + "org.gamecult.cultlib": "https://github.com/GameCult/CultLib.git?path=/unity/org.gamecult.cultlib#cultlib-unity-v2.0.0", + "org.gamecult.cultmath": "https://github.com/GameCult/CultLib.git?path=/packages/cultmath/unity/org.gamecult.cultmath#cultmath-unity-v0.5.0" } } From bd0293d6836e43f4a26a7d9c6021b0901a401ead Mon Sep 17 00:00:00 2001 From: soul Date: Thu, 22 Oct 2026 20:23:27 +0200 Subject: [PATCH 005/713] BehaviorData: LockWeaponData is arm 52; union-closure and null-gear tests Co-Authored-By: Claude Sonnet 5.5 --- .../ServerShared/Behaviors/Behaviors.cs | 1 + .../CultLibAdoptionTests.cs | 38 +++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 tests/Aetheria.Shared.Tests/CultLibAdoptionTests.cs diff --git a/Assets/Scripts/ServerShared/Behaviors/Behaviors.cs b/Assets/Scripts/ServerShared/Behaviors/Behaviors.cs index 7150e47a1..6b899ee35 100644 --- a/Assets/Scripts/ServerShared/Behaviors/Behaviors.cs +++ b/Assets/Scripts/ServerShared/Behaviors/Behaviors.cs @@ -198,6 +198,7 @@ public interface IPowerConsumer Union(49, typeof(LaunchSuppressorData)), Union(50, typeof(ListenerData)), Union(51, typeof(ScannerData)), + Union(52, typeof(LockWeaponData)), JsonObject(MemberSerialization.OptIn)] public abstract class BehaviorData { diff --git a/tests/Aetheria.Shared.Tests/CultLibAdoptionTests.cs b/tests/Aetheria.Shared.Tests/CultLibAdoptionTests.cs new file mode 100644 index 000000000..bfe379d36 --- /dev/null +++ b/tests/Aetheria.Shared.Tests/CultLibAdoptionTests.cs @@ -0,0 +1,38 @@ +using System; +using System.IO; +using System.Linq; +using System.Reflection; +using GameCult.Caching; +using GameCult.Caching.MessagePack; +using MessagePack; +using Xunit; + +// CultLib 2.0 refuses a union subtype no arm names (it used to write nil). These keep that refusal a build-time failure. +public sealed class CultLibAdoptionTests +{ + [Fact] + public void EveryConcreteSubtypeOfAUnionBaseIsAnArmOfIt() + { + var types = typeof(BehaviorData).Assembly.GetTypes(); + var missing = new System.Collections.Generic.List(); + foreach (var root in types) + { + var arms = root.GetCustomAttributes(false).Select(u => u.SubType).ToHashSet(); + if (arms.Count == 0) continue; + foreach (var subtype in types.Where(t => t != root && !t.IsAbstract && !t.IsInterface && root.IsAssignableFrom(t))) + if (!arms.Contains(subtype)) missing.Add($"{subtype.Name} is not an arm of {root.Name}"); + } + Assert.Empty(missing); + } + + [Fact] + public void NoShippedGearHoldsANullBehavior() + { + using var cache = new CultCache(TestCatalog.Registry()); + cache.AddBackingStore(new SingleFileMessagePackBackingStore(TestCatalog.Repo, true), AetheriaStores.CatalogTypes); + var gear = cache.GetAll().ToArray(); + Assert.NotEmpty(gear); + var bad = gear.Where(g => g.Behaviors != null && g.Behaviors.Any(b => b == null)).Select(g => g.Name).ToArray(); + Assert.Empty(bad); + } +} From fb8f2ea2fb7211563b3e491afb69ba32199782e5 Mon Sep 17 00:00:00 2001 From: soul Date: Thu, 22 Oct 2026 20:23:32 +0200 Subject: [PATCH 006/713] ShipAuthoring: Load follows the pull's InvalidDataException, RefuseLegacyEmbeddedHull the nil-stamp NotSupportedException Co-Authored-By: Claude Sonnet 5.5 --- Assets/Scripts/ServerShared/ShipAuthoring.cs | 4 ++-- .../ShipAuthoringTests.cs | 23 ++++++++++++++++++- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/Assets/Scripts/ServerShared/ShipAuthoring.cs b/Assets/Scripts/ServerShared/ShipAuthoring.cs index eafbacd2d..2f6db9e5c 100644 --- a/Assets/Scripts/ServerShared/ShipAuthoring.cs +++ b/Assets/Scripts/ServerShared/ShipAuthoring.cs @@ -136,7 +136,7 @@ public static class ShipAuthoringStore { RefuseLegacyEmbeddedHull(path); try { return LoadRecords(path); } - catch (MessagePackSerializationException error) + catch (Exception error) when (error is InvalidDataException or MessagePackSerializationException) { throw new InvalidOperationException($"{path}: a record does not decode as its schema: {error.Message}", error); } @@ -152,7 +152,7 @@ public static class ShipAuthoringStore if (bytes.Length == 0) return; CultPersistedStoreSnapshot snapshot; try { snapshot = CultDocumentMessagePackSerialization.DeserializeSnapshot(bytes); } - catch (MessagePackSerializationException error) + catch (Exception error) when (error is MessagePackSerializationException or NotSupportedException) { throw new InvalidOperationException($"{path}: not a readable ship file: {error.Message}", error); } diff --git a/tests/Aetheria.Shared.Tests/ShipAuthoringTests.cs b/tests/Aetheria.Shared.Tests/ShipAuthoringTests.cs index eced4c6f7..35a346fe0 100644 --- a/tests/Aetheria.Shared.Tests/ShipAuthoringTests.cs +++ b/tests/Aetheria.Shared.Tests/ShipAuthoringTests.cs @@ -173,7 +173,28 @@ public sealed class ShipAuthoringTests RewritePayload(path, "aetheria.hulldata", slots => ((object[])((object[])slots[5])[0])[2] = new object[] { 5, false, true, false }); var error = Assert.Throws(() => ShipAuthoringStore.Load(path)); Assert.Contains(path, error.Message); - Assert.IsAssignableFrom(error.InnerException); + // The pull names the record key and schema; the MessagePack failure is its cause. + var pull = Assert.IsType(error.InnerException); + Assert.Contains("aetheria.hulldata", pull.Message); + Assert.Contains(ShipModCatalog.HullKey("mod.skiff").ToString(), pull.Message); + Assert.IsAssignableFrom(pull.InnerException); + } + + // A store header with a nil format stamp is refused by the runtime with NotSupportedException; Load names the file. + [Fact] + public void LoadNamesTheFileWhoseFormatStampIsNil() + { + using var directory = new TempDirectory(); + var path = Path.Combine(directory.Path, "nilstamp.cc"); + File.WriteAllBytes(path, CultDocumentMessagePackSerialization.SerializeSnapshot(new CultPersistedStoreSnapshot + { + FormatVersion = null, + SchemaCatalog = Array.Empty(), + Records = Array.Empty(), + })); + var error = Assert.Throws(() => ShipAuthoringStore.Load(path)); + Assert.Contains(path, error.Message); + Assert.IsType(error.InnerException); } // Decodes one record's payload of the named schema to its slot array, lets the edit change it, and stores it again. From fbf88e85c514daaeba06b1b8f18abe704810b3ef Mon Sep 17 00:00:00 2001 From: soul Date: Thu, 22 Oct 2026 20:23:37 +0200 Subject: [PATCH 007/713] ship_cc.read owns its unreadable-path refusal, naming no path Co-Authored-By: Claude Sonnet 5.5 --- tools/blender/aetheria_ships/ship_cc.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/blender/aetheria_ships/ship_cc.py b/tools/blender/aetheria_ships/ship_cc.py index dd3ca78be..b7dca307c 100644 --- a/tools/blender/aetheria_ships/ship_cc.py +++ b/tools/blender/aetheria_ships/ship_cc.py @@ -119,7 +119,10 @@ class ShipFile(NamedTuple): def read(path: str, cultlib_packages: str) -> ShipFile: cultcache, msgpack = _libraries(cultlib_packages) store = cultcache.SingleFileMessagePackBackingStore(path) - envelopes = store.pull_all() + try: + envelopes = store.pull_all() + except OSError as error: + raise ValueError(f"The ship file cannot be read: {error.strerror}") from None ships = [envelope for envelope in envelopes if envelope.type == SCHEMA] hulls = [envelope for envelope in envelopes if envelope.type == HULL_SCHEMA] # Before S1 the hull lived inside the ship record. Saving such a file would preserve the stale hull under a ship that From e518a0b3d161a05029f86d6973d1186d6f9afead Mon Sep 17 00:00:00 2001 From: soul Date: Thu, 22 Oct 2026 20:37:40 +0200 Subject: [PATCH 008/713] packages-lock: regenerated by Unity at the 2.0.0 / 0.5.0 tags Co-Authored-By: Claude Sonnet 5.5 --- Packages/packages-lock.json | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json index 5d26bd587..7345ecc47 100644 --- a/Packages/packages-lock.json +++ b/Packages/packages-lock.json @@ -256,27 +256,29 @@ "url": "https://packages.unity.com" }, "org.gamecult.caching.unity": { - "version": "https://github.com/GameCult/CultLib.git?path=/src/GameCult.Unity/Assets/Caching#caching-unity-v1.4.0", + "version": "https://github.com/GameCult/CultLib.git?path=/src/GameCult.Unity/Assets/Caching#caching-unity-v2.0.0", "depth": 0, "source": "git", "dependencies": { - "org.gamecult.cultlib": "1.0.60" + "org.gamecult.cultlib": "2.0.0" }, - "hash": "45c2f4006f5f7dab357426cabd3197e8d0a17f66" + "hash": "42dce3611a81adc5c5fac54cadbaa5637d6022d3" }, "org.gamecult.cultlib": { - "version": "https://github.com/GameCult/CultLib.git?path=/unity/org.gamecult.cultlib#cultlib-unity-v1.0.60", + "version": "https://github.com/GameCult/CultLib.git?path=/unity/org.gamecult.cultlib#cultlib-unity-v2.0.0", "depth": 0, "source": "git", - "dependencies": {}, - "hash": "45c2f4006f5f7dab357426cabd3197e8d0a17f66" + "dependencies": { + "org.gamecult.cultmath": "0.5.0" + }, + "hash": "42dce3611a81adc5c5fac54cadbaa5637d6022d3" }, "org.gamecult.cultmath": { - "version": "https://github.com/GameCult/CultLib.git?path=/packages/cultmath/unity/org.gamecult.cultmath#cultmath-unity-v0.4.1", + "version": "https://github.com/GameCult/CultLib.git?path=/packages/cultmath/unity/org.gamecult.cultmath#cultmath-unity-v0.5.0", "depth": 0, "source": "git", "dependencies": {}, - "hash": "9c1b06cd703bfa44352050e819b0d0659cf5978a" + "hash": "7a8933b085468e1fc6f9d3bce4a85e7d101aaca3" }, "com.unity.modules.accessibility": { "version": "1.0.0", From f448957f3ad1d1de2c9a96477acacb53047683da Mon Sep 17 00:00:00 2001 From: soul Date: Thu, 22 Oct 2026 20:39:29 +0200 Subject: [PATCH 009/713] Brush: name AnimatedSimplexBrush and RadialWaveBrush as arms; pull-failure test asserts the record key Co-Authored-By: Claude Sonnet 5.5 --- Assets/Scripts/ServerShared/Environment.cs | 2 ++ tests/Aetheria.Shared.Tests/ShipAuthoringTests.cs | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Assets/Scripts/ServerShared/Environment.cs b/Assets/Scripts/ServerShared/Environment.cs index 737033e4e..9d4994fa3 100644 --- a/Assets/Scripts/ServerShared/Environment.cs +++ b/Assets/Scripts/ServerShared/Environment.cs @@ -72,6 +72,8 @@ public class NoiseSettings [Union(0, typeof(PowerBrush)), Union(1, typeof(SimplexBrush)), + Union(2, typeof(AnimatedSimplexBrush)), + Union(3, typeof(RadialWaveBrush)), Serializable, MessagePackObject, JsonObject(MemberSerialization.OptIn)] public abstract class Brush { diff --git a/tests/Aetheria.Shared.Tests/ShipAuthoringTests.cs b/tests/Aetheria.Shared.Tests/ShipAuthoringTests.cs index 35a346fe0..cb4d12d5f 100644 --- a/tests/Aetheria.Shared.Tests/ShipAuthoringTests.cs +++ b/tests/Aetheria.Shared.Tests/ShipAuthoringTests.cs @@ -175,8 +175,8 @@ public sealed class ShipAuthoringTests Assert.Contains(path, error.Message); // The pull names the record key and schema; the MessagePack failure is its cause. var pull = Assert.IsType(error.InnerException); - Assert.Contains("aetheria.hulldata", pull.Message); - Assert.Contains(ShipModCatalog.HullKey("mod.skiff").ToString(), pull.Message); + Assert.Contains("Record '" + ShipModCatalog.HullKey("mod.skiff") + "'", pull.Message); + Assert.Contains("schema", pull.Message); Assert.IsAssignableFrom(pull.InnerException); } From da5ba653cb78cb0ba2029ba83b924db7b455bf60 Mon Sep 17 00:00:00 2001 From: soul Date: Thu, 22 Oct 2026 23:34:08 +0200 Subject: [PATCH 010/713] Tests (red at 42dce361): a CultLib 1.0.60 run.cc opens; Load names a ship file of a newer store format tests/vectors/cultlib-1.0.60/run.cc is the run store Soul wrote with the base build (cl2-old-run-save-refused). Both new tests fail at the 2.0.0 pin; the first needs 2.0.1, the second needs ShipAuthoringStore.Load. Co-Authored-By: Claude Sonnet 5.5 --- .../RunSaveCompatibilityTests.cs | 33 ++++++++++++++++++ .../ShipAuthoringTests.cs | 19 ++++++++++ tests/vectors/cultlib-1.0.60/run.cc | Bin 0 -> 53949 bytes 3 files changed, 52 insertions(+) create mode 100644 tests/Aetheria.Shared.Tests/RunSaveCompatibilityTests.cs create mode 100644 tests/vectors/cultlib-1.0.60/run.cc diff --git a/tests/Aetheria.Shared.Tests/RunSaveCompatibilityTests.cs b/tests/Aetheria.Shared.Tests/RunSaveCompatibilityTests.cs new file mode 100644 index 000000000..8b8c98217 --- /dev/null +++ b/tests/Aetheria.Shared.Tests/RunSaveCompatibilityTests.cs @@ -0,0 +1,33 @@ +using System; +using System.IO; +using System.Linq; +using GameCult.Caching; +using GameCult.Caching.MessagePack; +using Xunit; + +// tests/vectors/cultlib-1.0.60/run.cc is a run.cc written by Aetheria on CultLib 1.0.60 (64 zones, factions, one entity). +// A player's save outlives the runtime that wrote it, so the current runtime must open it as compatible drift. +public sealed class RunSaveCompatibilityTests : IDisposable +{ + private readonly string _root = Path.Combine(Path.GetTempPath(), "aetheria-runcompat-" + Guid.NewGuid().ToString("N")); + + public RunSaveCompatibilityTests() => Directory.CreateDirectory(_root); + + public void Dispose() => Directory.Delete(_root, true); + + [Fact] + public void ARunWrittenByCultLib1060OpensWithEveryZoneAndFactionResolving() + { + var run = Path.Combine(_root, "run.cc"); + File.Copy(Path.Combine(RunStartTests.FindRepoRoot(), "tests", "vectors", "cultlib-1.0.60", "run.cc"), run); + using var cache = new CultCache(TestCatalog.Registry()); + cache.AddBackingStore(new SingleFileMessagePackBackingStore(TestCatalog.Repo, true), AetheriaStores.CatalogTypes); + cache.AddBackingStore(new SingleFileMessagePackBackingStore(run), AetheriaStores.RunTypes); + var saved = cache.GetGlobal(); + Assert.NotNull(saved); + Assert.NotEmpty(saved.Zones); + Assert.NotEmpty(saved.Factions); + Assert.All(saved.Zones, zone => Assert.NotNull(cache.Get(zone))); + Assert.All(saved.Factions, faction => Assert.NotNull(cache.Get(faction))); + } +} diff --git a/tests/Aetheria.Shared.Tests/ShipAuthoringTests.cs b/tests/Aetheria.Shared.Tests/ShipAuthoringTests.cs index cb4d12d5f..850e83dfd 100644 --- a/tests/Aetheria.Shared.Tests/ShipAuthoringTests.cs +++ b/tests/Aetheria.Shared.Tests/ShipAuthoringTests.cs @@ -197,6 +197,25 @@ public sealed class ShipAuthoringTests Assert.IsType(error.InnerException); } + // A store format this runtime does not know is refused on read with NotSupportedException from the attach; Load names the file. + [Fact] + public async Task LoadNamesTheFileWhoseStoreFormatIsNewer() + { + using var directory = new TempDirectory(); + var path = Path.Combine(directory.Path, "newer.cc"); + using (var cache = ShipAuthoringStore.Open(path, writable: true)) + { + ShipAuthoringStore.Write(cache, Fixture().Hull, Fixture().Visual); + await cache.FlushAsync(); + } + var snapshot = CultDocumentMessagePackSerialization.DeserializeSnapshot(File.ReadAllBytes(path)); + snapshot.FormatVersion = "cultcache.store.v9"; + File.WriteAllBytes(path, CultDocumentMessagePackSerialization.SerializeSnapshot(snapshot)); + var error = Assert.Throws(() => ShipAuthoringStore.Load(path)); + Assert.Contains(path, error.Message); + Assert.IsType(error.InnerException); + } + // Decodes one record's payload of the named schema to its slot array, lets the edit change it, and stores it again. private static void RewritePayload(string path, string schemaName, Action edit) { diff --git a/tests/vectors/cultlib-1.0.60/run.cc b/tests/vectors/cultlib-1.0.60/run.cc new file mode 100644 index 0000000000000000000000000000000000000000..fc2a4e76e119257e70ccafe82b3916de79159aef GIT binary patch literal 53949 zcmeHw36vbwb#~99(aIvgpbe?D00OB*?TeOfjYbjzBP2^QI5u8tc_lT>OpERrK*Vtf z1nl_7Sn3%Xfw95Akr)ILn;iqOVIsiBh2z9oFaxqpaDH&GgK@$k@%AgPz3;wTeUF;Gojs;*?jXyuJ?RWtb~ShV?L!x2cj&w%FXwqy z77alr8sSWvS2$iKL^f4P7Ytq$Ox5BzlV=T9BbsIMGA9bQuG%Oq5|IJt|%Ef%_zWU{GrH_CCi)H`5Hp>zK+;OL^ja`EQBEaozb26Z`_lBWw6|zG!xHVjdO)?{ zQ@v5oW&@%<_JQ6`Qcl>|u&;~~(Whh!$)#rg2@f}ng+W1&_$67FSBEr-I>;V#E*S^Jdxnzf3nBdGDfS$ z+_ksqUJB9&OZa*C@Zd9pdz<&UkUMm44Y&w^`I*Cy`bvtAvWExvw%kiW(|?AGm3Rj3 zwBGN7*ifoS!}x>OGtYd>r?UzafvyQ(uZAqu-eB@m$CmWf>P&e&RHtNORx3UA>9B;U z0w&ceO?x6-spd0Ic&v()sMhW&k5o+Bp=HPDxGIyi(DSG6FHE9GD&~%RKhV@g$>wy~ z6b#emOj$83TO=IeY+e^Qm572a@PZ<6HfQjrDO;MQ3LLRy!iT{INd9 z5C#QBKDv&+S%(JxKSehVpl~fjvra7sUov`frE&Uk0DPNw=-Ky_lt5KqpSqSHXX@6majsZ9{4|t=dn!IV*=k{W?TdfC6xcX2TGt0yX1cGc@ zBBm{@dP%eup71PZ36`vJx+p;iNU*#uT{ktwk}Z>y3ilT}FQ7nPyEY8+6NhYeHLI%Cua$q<) z5*eo zon%7lqM{SgCbFnnmTB0ErW=wb={(OvStOipDvE6hMALZSfFu#i)gN_{g0P!}EBwgD1B)c3+YE4~E~OVCyv9OSv(m*2{%5Rfd%$Nzr9PFo>o~yd)SJRx$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Z#VOY!J(xNrcgn)uM@v#Pi490whA(b;DMFCxZ6iLs*+aAWIFD?05^ukFXMgj_ zahe;XGL(;v7-q1%z#t(N}NRZQ!?#}jPdd*^@p+jw#AdBkB zkM^H&Hp>+<_=R%5hz*zr_;Qt(=M70M3;hZrdopR7WhlPmPw{enbr`rlD+Y^kS3zbY)^H^({_Aa zCX=Q~ULW}ivTl9ihHvGT$nJCqVO9fXgNiTF_~|weZ0POU*|RIYHcip={2w6&(r4a& zu&=32EKklPH3YY0Zz{~p-@CPk<|s?7xOszJk6Hk2wkLnn}3{=akgYp;Q0gzu-F$m#w%gcftynw9qtYfE-itE$ZUbguY0#WLxn|@UiOn z#rT*t7 Date: Thu, 22 Oct 2026 23:34:24 +0200 Subject: [PATCH 011/713] Pins: cultlib-unity-v2.0.1 at b8fc5eb0 (1.0.x saves with ref lists open as compatible drift) packages-lock.json follows from the Unity resolve. caching-unity stays at v2.0.0; cultmath at 7a8933b0. Co-Authored-By: Claude Sonnet 5.5 --- Directory.Build.props | 4 ++-- Packages/manifest.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index e17a8e5d5..05d5e4d22 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -2,8 +2,8 @@ $(CULTLIB_ROOT) $(MSBuildThisFileDirectory)..\CultLib - - 42dce3611a81adc5c5fac54cadbaa5637d6022d3 + + b8fc5eb07720a187a0421424ac2cb3aa2966ca1d $(CULTMATH_ROOT) $(CultLibRoot) diff --git a/Packages/manifest.json b/Packages/manifest.json index d4dafcbf2..7693bd94f 100644 --- a/Packages/manifest.json +++ b/Packages/manifest.json @@ -53,7 +53,7 @@ "com.unity.modules.wind": "1.0.0", "com.unity.modules.xr": "1.0.0", "org.gamecult.caching.unity": "https://github.com/GameCult/CultLib.git?path=/src/GameCult.Unity/Assets/Caching#caching-unity-v2.0.0", - "org.gamecult.cultlib": "https://github.com/GameCult/CultLib.git?path=/unity/org.gamecult.cultlib#cultlib-unity-v2.0.0", + "org.gamecult.cultlib": "https://github.com/GameCult/CultLib.git?path=/unity/org.gamecult.cultlib#cultlib-unity-v2.0.1", "org.gamecult.cultmath": "https://github.com/GameCult/CultLib.git?path=/packages/cultmath/unity/org.gamecult.cultmath#cultmath-unity-v0.5.0" } } From 7886f0a231890ab3f69932feec1e8d3a97e17926 Mon Sep 17 00:00:00 2001 From: soul Date: Thu, 22 Oct 2026 23:34:26 +0200 Subject: [PATCH 012/713] ShipAuthoringStore.Load names the file when its store format is newer than this runtime reads Co-Authored-By: Claude Sonnet 5.5 --- Assets/Scripts/ServerShared/ShipAuthoring.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Assets/Scripts/ServerShared/ShipAuthoring.cs b/Assets/Scripts/ServerShared/ShipAuthoring.cs index 2f6db9e5c..3962fa468 100644 --- a/Assets/Scripts/ServerShared/ShipAuthoring.cs +++ b/Assets/Scripts/ServerShared/ShipAuthoring.cs @@ -140,6 +140,10 @@ public static class ShipAuthoringStore { throw new InvalidOperationException($"{path}: a record does not decode as its schema: {error.Message}", error); } + catch (NotSupportedException error) + { + throw new InvalidOperationException($"{path}: not a readable ship file: {error.Message}", error); + } } // Key 1 of ShipAuthoring held the whole hull before S1. The type no longer has that member, so a deserialized record From d9bc46535566fa3b702ae8ca7d21287d7a4209ec Mon Sep 17 00:00:00 2001 From: soul Date: Fri, 23 Oct 2026 01:26:14 +0200 Subject: [PATCH 013/713] Packages: lock regenerated by Unity at cultlib-unity-v2.0.1 (b8fc5eb0) Co-Authored-By: Claude Opus 5.5 --- Packages/packages-lock.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json index 7345ecc47..919cf94d1 100644 --- a/Packages/packages-lock.json +++ b/Packages/packages-lock.json @@ -265,13 +265,13 @@ "hash": "42dce3611a81adc5c5fac54cadbaa5637d6022d3" }, "org.gamecult.cultlib": { - "version": "https://github.com/GameCult/CultLib.git?path=/unity/org.gamecult.cultlib#cultlib-unity-v2.0.0", + "version": "https://github.com/GameCult/CultLib.git?path=/unity/org.gamecult.cultlib#cultlib-unity-v2.0.1", "depth": 0, "source": "git", "dependencies": { "org.gamecult.cultmath": "0.5.0" }, - "hash": "42dce3611a81adc5c5fac54cadbaa5637d6022d3" + "hash": "b8fc5eb07720a187a0421424ac2cb3aa2966ca1d" }, "org.gamecult.cultmath": { "version": "https://github.com/GameCult/CultLib.git?path=/packages/cultmath/unity/org.gamecult.cultmath#cultmath-unity-v0.5.0", From 7f1337167dd505bd103565d4f541fc5c6807ed12 Mon Sep 17 00:00:00 2001 From: soul Date: Wed, 21 Oct 2026 20:32:11 +0200 Subject: [PATCH 014/713] Loadouts.Commit stops refusing package designs (ruling catalog-is-a-package-stack) The catalog is a stack of packages, the shipped content included, so a Loadout may name any design the stack holds. The mod-design refusal (from 54917bb3, backed by no ruling) is deleted, and its test now pins that a package design commits under its key. The IsModKey comment no longer claims the shipped catalog never references a mod. Co-Authored-By: Claude Opus 5.5 --- Assets/Scripts/ServerShared/Loadout.cs | 7 +++---- Assets/Scripts/ServerShared/ShipModCatalog.cs | 3 ++- tests/Aetheria.Shared.Tests/LoadoutTests.cs | 20 +++++++++---------- 3 files changed, 14 insertions(+), 16 deletions(-) diff --git a/Assets/Scripts/ServerShared/Loadout.cs b/Assets/Scripts/ServerShared/Loadout.cs index d7fec7f03..15e832a58 100644 --- a/Assets/Scripts/ServerShared/Loadout.cs +++ b/Assets/Scripts/ServerShared/Loadout.cs @@ -99,14 +99,13 @@ public static class Loadouts // The only writer of Loadout records. It opens its own short-lived cache over the catalog file, writable, and disposes it // after the one commit. No other cache is touched, so no catalog instance play holds (or has mutated) can reach the // file; a cache that already has the catalog open sees the loadout only once it reloads. - // Throws and writes nothing when the loadout names a mod design (hull or slot), when the file is missing (capture never creates a catalog), when a loadout of this name + // The catalog is a stack of packages, the shipped content included (ruling catalog-is-a-package-stack), so a loadout may + // name any design the stack holds; one whose package is later removed fails closed where it is built, with its reason logged. + // Throws and writes nothing when the file is missing (capture never creates a catalog), when a loadout of this name // exists under another key, or when one exists under KeyOf(Name) and replace is not set. The commit is conditional // on the record at KeyOf(Name), so a loadout changed on disk since this open is not clobbered: returns false then. public static bool Commit(string catalogPath, Loadout loadout, bool replace) { - var modDesigns = new[] { loadout.Hull.Key }.Concat(loadout.Slots.Select(slot => slot.Design.Key)).Where(ShipModCatalog.IsModKey).Select(key => key.Value).Distinct().ToArray(); - if (modDesigns.Length > 0) - throw new InvalidOperationException($"Loadout '{loadout.Name}' names mod designs ({string.Join(", ", modDesigns)}); the shipped catalog never references a mod, so a mod ship cannot be captured as a loadout."); if (!File.Exists(catalogPath)) throw new InvalidOperationException($"Catalog {catalogPath} does not exist; a loadout commit never creates one."); using var cache = AetheriaStores.Open(catalogPath, catalogWritable: true); diff --git a/Assets/Scripts/ServerShared/ShipModCatalog.cs b/Assets/Scripts/ServerShared/ShipModCatalog.cs index 4f1908466..9e89411b8 100644 --- a/Assets/Scripts/ServerShared/ShipModCatalog.cs +++ b/Assets/Scripts/ServerShared/ShipModCatalog.cs @@ -25,7 +25,8 @@ public static class ShipModCatalog public static CultRecordKey ProductKey(string id, CultRecordKey maker) => new CultRecordKey("mod-product:" + id + ":" + maker.Value); - // A key the mods own. The shipped catalog and its authored records never reference one: a mod may be uninstalled. + // A key a package owns. Any record may reference one (ruling catalog-is-a-package-stack); one whose package is removed + // fails closed where it is read. public static bool IsModKey(CultRecordKey key) => key.IsSet() && (key.Value.StartsWith("mod-hull:", StringComparison.Ordinal) || key.Value.StartsWith("mod-ship:", StringComparison.Ordinal) || key.Value.StartsWith("mod-product:", StringComparison.Ordinal)); diff --git a/tests/Aetheria.Shared.Tests/LoadoutTests.cs b/tests/Aetheria.Shared.Tests/LoadoutTests.cs index 7d3316302..c073bf37e 100644 --- a/tests/Aetheria.Shared.Tests/LoadoutTests.cs +++ b/tests/Aetheria.Shared.Tests/LoadoutTests.cs @@ -122,27 +122,25 @@ public sealed class LoadoutTests : IDisposable Assert.True(!File.Exists(Player) || !SchemaNames(Player).Contains("aetheria.loadout")); } - // The shipped catalog never references a mod: a mod may be uninstalled, and a preset naming one would dangle. The - // refusal is at the only writer, so no caller (the editor command included) can get one into the file. + // The catalog is a stack of packages (ruling catalog-is-a-package-stack): a preset may name a package's design, hull or + // slot, and the only writer commits it under the package's key. Whether the design resolves is decided where the preset is + // built, not here. [Theory] [InlineData("hull", "mod-hull:mod.skiff")] [InlineData("slot", "mod-hull:mod.skiff")] [InlineData("slot", "mod-ship:mod.skiff")] - public void APresetNamingAModDesignIsRefusedAndNothingIsWritten(string where, string key) + public void APresetNamingAPackageDesignIsCommitted(string where, string key) { - var mod = new CultRecordRef(new CultRecordKey(key)); using var cache = Open(); var loadout = HandBuilt(cache); if (where == "hull") loadout.Hull = new CultRecordRef(new CultRecordKey(key)); - else loadout.Slots[1].Design = mod; - var before = Hash(Catalog); + else loadout.Slots[1].Design = new CultRecordRef(new CultRecordKey(key)); - var error = Assert.Throws(() => Loadouts.Commit(Catalog, loadout, replace: false)); + Assert.True(Loadouts.Commit(Catalog, loadout, replace: false)); - Assert.Contains("names mod designs", error.Message); - Assert.Contains(key, error.Message); - Assert.Equal(before, Hash(Catalog)); - Assert.True(Loadouts.Commit(Catalog, HandBuilt(cache), replace: false)); + using var reopened = Open(); + var written = Assert.Single(reopened.GetAll()); + Assert.Equal(key, (where == "hull" ? written.Hull.Key : written.Slots[1].Design.Key).Value); } // Recapturing a name refuses without replace and leaves the file untouched; with replace it replaces, never duplicates. From 80283d18a9dd1cacd70eaf70f78b42105f6efc46 Mon Sep 17 00:00:00 2001 From: soul Date: Wed, 21 Oct 2026 20:36:14 +0200 Subject: [PATCH 015/713] Loadouts.Commit takes bossOf: the Loadout and Faction.BossLoadout land in one batch With bossOf set, the same conditional batch Expects the faction unchanged and Upserts it with BossLoadout = KeyOf(Name), so both land or neither does. The batch lives in an internal overload over a caller's cache; tests pin that a faction changed on disk after the read refuses both, and that a missing boss faction writes nothing. Co-Authored-By: Claude Opus 5.5 --- Assets/Scripts/ServerShared/Loadout.cs | 34 ++++++++--- tests/Aetheria.Shared.Tests/LoadoutTests.cs | 67 +++++++++++++++++++++ 2 files changed, 92 insertions(+), 9 deletions(-) diff --git a/Assets/Scripts/ServerShared/Loadout.cs b/Assets/Scripts/ServerShared/Loadout.cs index 15e832a58..b8b73a0ab 100644 --- a/Assets/Scripts/ServerShared/Loadout.cs +++ b/Assets/Scripts/ServerShared/Loadout.cs @@ -96,19 +96,28 @@ public static class Loadouts _ => "" }; - // The only writer of Loadout records. It opens its own short-lived cache over the catalog file, writable, and disposes it - // after the one commit. No other cache is touched, so no catalog instance play holds (or has mutated) can reach the - // file; a cache that already has the catalog open sees the loadout only once it reloads. - // The catalog is a stack of packages, the shipped content included (ruling catalog-is-a-package-stack), so a loadout may - // name any design the stack holds; one whose package is later removed fails closed where it is built, with its reason logged. - // Throws and writes nothing when the file is missing (capture never creates a catalog), when a loadout of this name - // exists under another key, or when one exists under KeyOf(Name) and replace is not set. The commit is conditional - // on the record at KeyOf(Name), so a loadout changed on disk since this open is not clobbered: returns false then. - public static bool Commit(string catalogPath, Loadout loadout, bool replace) + // The only writer of Loadout records, and of the Faction.BossLoadout that names one. It opens its own short-lived cache + // over the catalog file, writable, and disposes it after the one commit. No other cache is touched, so no catalog + // instance play holds (or has mutated) can reach the file; a cache that already has the catalog open sees the loadout + // only once it reloads. The catalog is a stack of packages, the shipped content included (ruling + // catalog-is-a-package-stack), so a loadout may name any design the stack holds; one whose package is later removed fails + // closed where it is built, with its reason logged. With bossOf set, the same batch makes the loadout that faction's boss + // (Faction.BossLoadout), so the loadout and the reference land together or not at all. + // Throws and writes nothing when the file is missing (capture never creates a catalog), when bossOf names no faction in + // it, when a loadout of this name exists under another key, or when one exists under KeyOf(Name) and replace is not set. + // The commit is conditional on the record at KeyOf(Name) and on the faction, so a record changed on disk since this open + // is not clobbered: returns false then, and neither is written. + public static bool Commit(string catalogPath, Loadout loadout, bool replace, CultRecordRef bossOf = default) { if (!File.Exists(catalogPath)) throw new InvalidOperationException($"Catalog {catalogPath} does not exist; a loadout commit never creates one."); using var cache = AetheriaStores.Open(catalogPath, catalogWritable: true); + return Commit(cache, loadout, replace, bossOf); + } + + // The one batch Commit(path, ...) makes, over a writable catalog cache the caller opened. + internal static bool Commit(CultCache cache, Loadout loadout, bool replace, CultRecordRef bossOf) + { var key = KeyOf(loadout.Name); var namesake = cache.GetAll().FirstOrDefault(other => other.Name == loadout.Name && !cache.RefOf(other).Key.Equals(key)); if (namesake != null) @@ -116,10 +125,17 @@ public static class Loadouts var existing = cache.Get(key); if (existing != null && !replace) throw new InvalidOperationException($"Loadout '{loadout.Name}' already exists; replace it explicitly."); + var boss = bossOf.IsSet() + ? cache.Get(bossOf) ?? throw new InvalidOperationException($"Loadout '{loadout.Name}': the boss faction is not in the catalog.") + : null; return cache.Commit(batch => { batch.Expect(key, existing); batch.Upsert(typeof(Loadout), loadout, key); + if (boss == null) return; + batch.Expect(bossOf.Key, boss); + boss.BossLoadout = new CultRecordRef(key); + batch.Upsert(boss.GetType(), boss, bossOf.Key); }); } diff --git a/tests/Aetheria.Shared.Tests/LoadoutTests.cs b/tests/Aetheria.Shared.Tests/LoadoutTests.cs index c073bf37e..6f55baa76 100644 --- a/tests/Aetheria.Shared.Tests/LoadoutTests.cs +++ b/tests/Aetheria.Shared.Tests/LoadoutTests.cs @@ -143,6 +143,73 @@ public sealed class LoadoutTests : IDisposable Assert.Equal(key, (where == "hull" ? written.Hull.Key : written.Slots[1].Design.Key).Value); } + // With bossOf, one commit writes the loadout and makes it that faction's boss: Faction.BossLoadout names its key. + [Fact] + public void ABossCommitWritesTheLoadoutAndTheFactionsBossReference() + { + using (var cache = Open()) + Assert.True(Loadouts.Commit(Catalog, HandBuilt(cache), replace: false, cache.RefOf(cache.GetByName("Maker")))); + + using (var cache = Open()) + { + var loadout = Assert.Single(cache.GetAll()); + Assert.Equal(Loadouts.KeyOf("Skiff build"), cache.RefOf(loadout).Key); + Assert.Same(loadout, Loadouts.BossOf(cache, cache.GetByName("Maker"), out var refusal)); + Assert.Equal(BossRefusal.None, refusal); + } + } + + // The loadout and the boss reference are one batch: when the faction changed on disk after the commit's cache read it, + // the commit returns false and neither lands, though the loadout alone would have; the other writer's change survives. + [Fact] + public void ABossCommitOverAFactionChangedOnDiskWritesNeitherTheLoadoutNorTheReference() + { + Loadout loadout; + CultRecordRef maker; + using (var read = Open()) + { + loadout = HandBuilt(read); + maker = read.RefOf(read.GetByName("Maker")); + } + + using (var stale = AetheriaStores.Open(Catalog, catalogWritable: true)) + { + Assert.NotNull(stale.Get(maker)); + using (var other = AetheriaStores.Open(Catalog, catalogWritable: true)) + { + var fresh = other.Get(maker); + Assert.True(other.Commit(batch => + { + batch.Expect(maker.Key, fresh); + fresh.ShortName = "NEW"; + batch.Upsert(typeof(Faction), fresh, maker.Key); + })); + } + + Assert.False(Loadouts.Commit(stale, loadout, replace: false, maker)); + } + + using var after = Open(); + Assert.Empty(after.GetAll()); + var faction = after.Get(maker); + Assert.Equal("NEW", faction.ShortName); + Assert.False(faction.BossLoadout.IsSet()); + } + + // A boss faction the catalog does not hold is refused before anything is written. + [Fact] + public void ABossCommitNamingNoFactionIsRefusedAndNothingIsWritten() + { + var before = Hash(Catalog); + using (var cache = Open()) + { + var error = Assert.Throws(() => + Loadouts.Commit(Catalog, HandBuilt(cache), replace: false, new CultRecordRef(new CultRecordKey("faction:absent")))); + Assert.Contains("boss faction is not in the catalog", error.Message); + } + Assert.Equal(before, Hash(Catalog)); + } + // Recapturing a name refuses without replace and leaves the file untouched; with replace it replaces, never duplicates. [Fact] public void SameNameCaptureReplacesOnlyWhenAsked() From 3bfac250279141aef87cf56129f84c9d368d3bbb Mon Sep 17 00:00:00 2001 From: soul Date: Thu, 22 Oct 2026 20:02:16 +0200 Subject: [PATCH 016/713] New Game is a two-pane scenario picker: names by group, selected brief/seed/ambient, one Launch, arrows and Enter MainMenu.AddScenarios and the per-scenario launching buttons are deleted; the seven Clear+Title pairs collapse into Next. The main menu EventSystem no longer deselects on background click so the arrows keep working. Co-Authored-By: Claude Sonnet 5.5 --- Assets/Scenes/Main Menu.unity | 2 +- Assets/Scripts/UI/MainMenu.cs | 68 +++++++-------- Assets/Scripts/UI/ScenarioPicker.cs | 130 ++++++++++++++++++++++++++++ 3 files changed, 162 insertions(+), 38 deletions(-) create mode 100644 Assets/Scripts/UI/ScenarioPicker.cs diff --git a/Assets/Scenes/Main Menu.unity b/Assets/Scenes/Main Menu.unity index 4fafe8336..c1f111f09 100644 --- a/Assets/Scenes/Main Menu.unity +++ b/Assets/Scenes/Main Menu.unity @@ -525,7 +525,7 @@ MonoBehaviour: type: 3} m_TrackedDeviceOrientationAction: {fileID: 1025543830046995696, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} - m_DeselectOnBackgroundClick: 1 + m_DeselectOnBackgroundClick: 0 m_PointerBehavior: 0 --- !u!114 &553528108 MonoBehaviour: diff --git a/Assets/Scripts/UI/MainMenu.cs b/Assets/Scripts/UI/MainMenu.cs index e72ce5263..401f4b2af 100644 --- a/Assets/Scripts/UI/MainMenu.cs +++ b/Assets/Scripts/UI/MainMenu.cs @@ -23,7 +23,7 @@ public class MainMenu : MonoBehaviour public float FadeAlphaExponent = 2; public float FadePositionExponent = 2; - private (PropertiesPanel panel, CanvasGroup group) _currentMenu, _nextMenu; + private (PropertiesPanel panel, CanvasGroup group, PropertiesPanel detail) _currentMenu, _nextMenu; private bool _fadeFromRight; private float _fadeLerp; private bool _fading; @@ -38,10 +38,14 @@ public class MainMenu : MonoBehaviour _panelPosition = PanelPrototype.transform.position; var panel1 = PanelPrototype.Instantiate(); - _currentMenu = (panel1, panel1.GetComponent()); + var detail1 = PanelPrototype.Instantiate(); + ScenarioPicker.Dock(detail1, panel1); + _currentMenu = (panel1, panel1.GetComponent(), detail1); var panel2 = PanelPrototype.Instantiate(); - _nextMenu = (panel2, panel2.GetComponent()); + var detail2 = PanelPrototype.Instantiate(); + ScenarioPicker.Dock(detail2, panel2); + _nextMenu = (panel2, panel2.GetComponent(), detail2); _currentMenu.panel.gameObject.SetActive(false); //_saveDirectory = ActionGameManager.GameDataDirectory.CreateSubdirectory("Saves"); @@ -74,7 +78,7 @@ public class MainMenu : MonoBehaviour } } - private string TitleSubtitle(string title, string subtitle) => $"{title}\n{subtitle}"; + public static string TitleSubtitle(string title, string subtitle) => $"{title}\n{subtitle}"; private void Fade(bool fromRight) { @@ -87,10 +91,18 @@ public class MainMenu : MonoBehaviour private static bool _exclusionsShown; - private void ShowMain() + // Starts the next screen on an empty panel with a title and its scenario detail pane hidden and empty. + private void Next(string title) { _nextMenu.panel.Clear(); - _nextMenu.panel.Title.text = TitleSubtitle("aetheria", "terminus"); + _nextMenu.panel.Title.text = title; + _nextMenu.detail.Clear(); + _nextMenu.detail.gameObject.SetActive(false); + } + + private void ShowMain() + { + Next(TitleSubtitle("aetheria", "terminus")); if (ActionGameManager.CurrentGalaxy == null) { // No run is live: at the title, after death, or after a new run failed to start. A saved run exists only as @@ -131,31 +143,18 @@ public class MainMenu : MonoBehaviour // to set up a run and the test arenas are listed only in editor and development builds. private void ShowScenarios() { - _nextMenu.panel.Clear(); - _nextMenu.panel.Title.text = TitleSubtitle("new game", "scenarios"); - AddScenarios(Scenarios.Modes); + Next(TitleSubtitle("new game", "scenarios")); + var groups = new List<(string label, Scenario[] scenarios)> { ("modes", Scenarios.Modes) }; if (Debug.isDebugBuild) { - _nextMenu.panel.AddSection("development"); - AddScenarios(Scenarios.Development); - _nextMenu.panel.AddSection("test arenas"); - AddScenarios(Scenarios.Tests); + groups.Add(("development", Scenarios.Development)); + groups.Add(("test arenas", Scenarios.Tests)); } - _nextMenu.panel.AddButton("Back", - () => - { - ShowMain(); - Fade(false); - }); - } - - private void AddScenarios(IEnumerable scenarios) - { - foreach (var scenario in scenarios) + ScenarioPicker.Show(_nextMenu.panel, _nextMenu.detail, groups, Launch, () => { - _nextMenu.panel.AddButton(scenario.Name, () => Launch(scenario)); - _nextMenu.panel.AddProperty(() => scenario.Brief); - } + ShowMain(); + Fade(false); + }); } // The only way into a new run: generates the scenario's galaxy off the main thread and enters the game, where @@ -263,8 +262,7 @@ public class MainMenu : MonoBehaviour private void ShowSettings() { - _nextMenu.panel.Clear(); - _nextMenu.panel.Title.text = "settings"; + Next("settings"); _nextMenu.panel.AddButton("Gameplay", () => { @@ -299,8 +297,7 @@ public class MainMenu : MonoBehaviour private void ShowGameplaySettings() { - _nextMenu.panel.Clear(); - _nextMenu.panel.Title.text = TitleSubtitle("gameplay", "settings"); + Next(TitleSubtitle("gameplay", "settings")); _nextMenu.panel.AddField("Name", () => ActionGameManager.PlayerSettings.Name, s => ActionGameManager.PlayerSettings.Name = s); @@ -322,8 +319,7 @@ public class MainMenu : MonoBehaviour private void ShowGraphicsSettings() { - _nextMenu.panel.Clear(); - _nextMenu.panel.Title.text = TitleSubtitle("graphics", "settings"); + Next(TitleSubtitle("graphics", "settings")); _nextMenu.panel.AddField("Nebula Quality", () => (int)ActionGameManager.PlayerSettings.GraphicsSettings.NebulaQuality, i => @@ -347,8 +343,7 @@ public class MainMenu : MonoBehaviour private void ShowInputSettings() { - _nextMenu.panel.Clear(); - _nextMenu.panel.Title.text = TitleSubtitle("input", "settings"); + Next(TitleSubtitle("input", "settings")); _nextMenu.panel.AddButton("Back", () => { @@ -359,8 +354,7 @@ public class MainMenu : MonoBehaviour private void ShowAudioSettings() { - _nextMenu.panel.Clear(); - _nextMenu.panel.Title.text = TitleSubtitle("audio", "settings"); + Next(TitleSubtitle("audio", "settings")); _nextMenu.panel.AddButton("Back", () => { diff --git a/Assets/Scripts/UI/ScenarioPicker.cs b/Assets/Scripts/UI/ScenarioPicker.cs new file mode 100644 index 000000000..4d6ab393e --- /dev/null +++ b/Assets/Scripts/UI/ScenarioPicker.cs @@ -0,0 +1,130 @@ +using System; +using System.Collections.Generic; +using UniRx; +using UniRx.Triggers; +using UnityEngine; +using UnityEngine.EventSystems; +using UnityEngine.UI; + +// The New Game screen: scenario names on the left pane by group, the selected scenario's brief, seed and ambient on a +// docked right pane, one Launch. This class owns which scenario is selected (one index into the rows it built); +// everything the screen shows about a scenario, and what Launch and Enter launch, reads that index. Keys arrive only as +// Input System UI events on the focused Launch button, so Enter and a mouse click are the same Button.onClick. +public sealed class ScenarioPicker +{ + private readonly List _scenarios = new List(); + private readonly List _groupLabels = new List(); + private readonly List