Commit graph Aetheria/Assets/Scripts/UI/MainMenu.cs
Author SHA1 Message Date
Meta Vens
8a1e205cf0 A new run replaces the saved run only once it has staged; a failed start says why and leaves the saved run
Launch cleared the run store before generating, and a generation or staging failure only reached the log: the
Generating Galaxy dialog stayed up, StartGame threw, and the saved run was already gone.

RunSave.Replace runs a start with the saved run still stored: when it returns a staged run the saved run's records go,
and when it returns null or throws, only the records it wrote (the arena's orbits and bodies) go. StartGame's
new-run branch is StartScenario, chosen by PendingScenario rather than by the absence of a SavedGame; it mints into an
empty ledger, and a failed start clears CurrentGalaxy (so quitting saves nothing) and refuses on the main menu with
every failure. Launch no longer clears; a galaxy that throws is refused on the title menu. The menu offers Continue
whenever no run is live, which replaces MainMenu.InGame (cut, with its prefab value and scene override), so a
failed start can resume the saved run in place.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 22:03:50 +02:00
Meta Vens
d0782a7d14 Every new run is a scenario: the script harness, the tutorial and main galaxies as scenarios, the New Game submenu and six test arenas
A Scenario is an abstract C# class compiled with the game: Generate picks the galaxy through GalaxyStage (Main or
Prelude, at the scenario's seed, the background noise drawn from the same seed), Stage places the run's first
entities through ScenarioStage (Fit, Bare, Generated, Preset, Player, Place, Cargo), which collects named failures
and admits nothing. RunStart generates the galaxy, the arena under Ambient and admits everything through Zone.Admit,
all or nothing. The aetheria.scenario record, ScenarioShip, ScenarioEntity, RunStart.Check and the null-scenario
branch are cut.

New Game opens a submenu: Tutorial Galaxy and Main Galaxy, then (editor and development builds) Djinni Shakedown,
Starved Reactor, Arcs, Duel, Launcher Angles and Long Haul, each with its brief. MainMenu.Launch is the one way into a
new run; ActionGameManager.PendingScenario carries the scenario to StartGame once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 20:33:55 +02:00
Meta Vens
8a0a29e0de Galaxy.IsPrelude is the one owner of whether a run is the prelude: ActionGameManager.IsTutorial and PlayerSettings.TutorialPassed are cut
IsTutorial duplicated Galaxy.IsPrelude; its readers read CurrentGalaxy.IsPrelude, and RunSave.Capture writes
SavedGame.IsTutorial from galaxy.IsPrelude with no isTutorial argument. TutorialPassed was never written and its only
reader was New Game's unreachable main-galaxy branch, which goes with it (S2 brings the main galaxy back as a
scenario). spawnturret's two identical generator branches collapse to one. Old player.cc files still load.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 20:26:30 +02:00
Meta Vens
6709b06e2e Ship preload: a mod ship that fails to load or assemble is skipped, not fatal
PreloadAsync rethrew on the first failing hull, so one bad package faulted
Loading and no mod ship could spawn. Each hull now loads in its own try: a
failure destroys its partial visual, is logged with the hull's name, and the
rest still preload, as Compose skips a bad package. The play smoke installs the
package beside a broken sibling that composes but cannot assemble (its map icon
moved onto a meshless muzzle node) and proves the sibling has no prototype while
the good ship spawns.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 15:38:35 +02:00
Meta Vens
54917bb39d Ship S2 fixes: structural anchors are not mounts, mod presets refused, one bad mod never bricks the boot
- Validate: a hardpoint's anchor role is fixed by its type (thruster-emitter, radiator-mesh, else articulation); ShipModPlan's
  duplicate role check is deleted.
- Loadouts.Commit refuses a preset naming a mod design (mod-hull:/mod-ship:), so the shipped catalog never references a mod.
- Compose quarantines each package: a bad package is excluded and named, a collision excludes every package involved; the
  game boots on the rest (or the shipped catalog) and the main menu lists the exclusions.
- RequireDesigns refuses a save with a null item or lot instead of throwing NullReferenceException.
- Tests: per structural role, muzzle id ties, every slot/zone/lot in RequireDesigns, listing order, exclusion cases.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-09-30 08:30:52 +02:00
Meta Vens
460bb85ed0 Ship S2: the game composes and loads mod ships
Boot opens the derived catalog when GameData/Mods holds packages
(ShipModCatalog.ResolveCatalog), preloads each hull's GLB into an assembled
inactive prototype (ShipModShips), and LoadEntity clones it when the hull names
a Visual. ShipModPlan decides which anchor fills which ShipInstance slot; a
ShipModTemplate prefab carries the shared effects. Continue refuses a run that
names a design the catalog no longer holds (RunSave.RequireDesigns).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-09-30 06:43:52 +02:00
Meta Vens
f839631334 Cut 0: MainMenu takes a run-owned copy of the background settings
MainMenu.cs wrote NoisePosition directly onto the shared authored
SectorBackgroundSettings/TutorialBackgroundSettings objects on every New
Game. Once settings are a catalog global that write lands on the cached
record. Take a MessagePack round-trip copy before searching and seeding
Galaxy; the authored object is never assigned (settings-globals-cut.md 1.4,
Cut 0).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 18:22:41 +02:00
Meta Vens
95e164adce Land RunSave and the one-cache run and player lifecycle (Cut 10)
Owner: ActionGameManager composes the process's one cache. Its CultCache
getter attaches the catalog, GameData/run.cc and GameData/player.cc on
first access, in either scene, and nothing reopens it.

- RunSave (SavedGame.cs) replaces the SavedGame constructor:
  - Capture builds the live run as plain documents and writes nothing. Zone
    contents are `zone.Contents?.PackZone() ?? zone.PackedContents`, so a
    zone generated earlier but not loaded this session keeps its contents
    and its orbit and body records instead of being erased by the next save.
  - Commit is the only writer of SavedGame and SavedZone: one Commit with
    zone i at `savedzone-{i}`, SavedGame.Zones set to those refs, and every
    stored SavedZone outside that set removed. Orbits and bodies staged by
    zone generation land in the same single-file write.
  - Clear removes every run record in one Commit.
- Run begins: New Game's first statement is RunSave.Clear. Run saves:
  ActionGameManager.SaveRun at wormhole arrival and quit. Run ends: Die
  clears the run, then saves settings.
- Run exists only as the run store's SavedGame global: MainMenu enables
  Continue from it (and logs when the run store holds records but no
  SavedGame), and StartGame reads it once to pick the new-run or resume
  branch.
- PlayerSettings: the getter returns the player store's global and, on
  first launch, commits GetDefaultPlayerSettings; it is the only creator.
  SavePlayerSettings commits the instance.
- InputDisplayLayout reads its InputLayout from the catalog by the layout
  asset's name and throws when the catalog has none.

Tests: new RunSaveTests (5): RepeatedSavesKeepRecordCountConstant,
SaveRemovesZonesNoLongerInTheRun, SaveWritesOnlyTheRunStore,
ResumeThenSaveKeepsUnloadedZoneContents, ClearRemovesEveryRunRecord. Each
fails with its rule mutated out.

Builds: headless, 11 tests pass, Unity batchmode compile reports no error CS.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-14 22:00:27 +02:00
Meta Vens
5c5c3d5e19 Delete the old run, settings, layout and loadout authorities (Cut 10)
The deletion line lands before RunSave, as the spec orders. Deleted, not
demoted:
- PlayerSettings.SavedRun (Key 1 stays unclaimed) and the SavedGame
  constructor that upserted a fresh SavedZone per zone on every save.
- ActionGameManager: the PlayerSettings.msgpack getter, file path and
  writer; the .loadout format (_loadoutPath, Loadouts, SaveLoadout and its
  default-options serializer, the commented loader); OnApplicationQuit and
  SaveState; SaveZone, which had no caller.
- MainMenu's SavedRun Continue branch and both `SavedRun = null` writes.
- InventoryPanel's Save Loadout and Restore Loadout bodies.
- InputDisplayLayout's KeyboardLayouts file reader, ParseJson,
  AssociateInputKeys, SaveLayout and the usings they alone needed.
- AetherDb's Cut 9 importer (Import.cs, legacy-census, import).
- The three-gates note on loading writes; Cut 3 made loading non-writing.
- .gitignore ignores GameData/run.cc and GameData/player.cc instead of
  PlayerSettings.msgpack.

DOES NOT BUILD in Unity: ActionGameManager, MainMenu and InputDisplayLayout
still reference the deleted members until the next commit wires RunSave,
the settings getter and the catalog layout read. Headless builds.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-14 21:51:10 +02:00
Meta Vens
9bdf6ef23f Replace the Database Tools with the Studio and cut Unity over
Cut 8b. The Unity project compiles with 0 errors in 6000.3.24f1 batchmode.

Packages: manifest.json pins org.gamecult.cultlib at cultlib-unity-v1.0.57
and org.gamecult.caching.unity at caching-unity-v1.2.0, next to the 8a
CultMath tag. Aetheria.Shared.Unity references GameCult.CultLib and keeps
noEngineReferences.

The Database Tools (Assets/Scripts/CultCache/Editor) are deleted in this
commit, alongside their five ported drawers in
Assets/Scripts/Editor/CultCacheDrawers.cs, each an
[CultInspectorDrawer] ICultInspectorDrawer:
- InspectableType: popup of the attribute type's [Union] member names,
  writing the string.
- InspectableColor: float3 and float4 through ColorField.
- InspectableAnimationCurve: float4[] and BezierCurve through CurveField.
- InspectableTemperature: Kelvin, Celsius and Fahrenheit fields over one
  value.
- InspectableSchematicShape: size and cell toggles. The old drawer also
  drew the item's schematic texture and tinted hull hardpoints, which need
  the parent document. The tagged Studio hands a drawer only the value, so
  those wait on the Studio exposing the open record.

Unity call sites:
- ActionGameManager opens the catalog through AetheriaStores; Cut 10 adds
  the run and player stores.
- Refs resolve through ItemManager.GetData or Get(ref); orbit, planet and
  belt maps key by CultRecordKey; identity is compared by reference or key.
- The PlayerSettings.msgpack reader and writer, which Cut 10 deletes, pass
  CultDocumentMessagePackSerialization.OptionsFor, since the embedded run
  reaches CultMath values and refs. Keyboard layouts need no resolver and
  keep MessagePack's defaults until Cut 10.
- The input map uses the nested action to binding shape.
- PropertiesPanel reads CultInspectorRangeAttribute.
- NameTools loses its legacy name-file writer.
- Slime compares serialized settings instead of the deleted SHA1 helper.
- FieldDriver drops InspectorHeader.
- .gitignore covers the test project's build output.

Builds: Aetheria.Shared, AetherDb, Aetheria.Shared.Tests (6/6), Unity
batchmode (0 errors).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-14 19:15:20 +02:00
Meta Vens
6140a06a0a Swap Unity.Mathematics usings for CultMath
Every Unity.Mathematics using, alias and qualified name under Assets\Scripts
and tools now names CultMath. The nine `using static ...noise;` lines are
gone: snoise lives on CultMath's math. UnityExtensions loses float4.ToColor
and Color.ToFloat4, which duplicate the bridge's ToColor and ToCultMath; the
float3 colour pair stays because the bridge has none.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-14 17:39:12 +02:00
Meta Vens
cc7f2c8877 Remove dead code, unused plugins, and multiplayer remnants
Delete Economy.Server/Economy.Shared, LiteNetLib, network message types,
the texture-based Gravity duplicate, unreferenced scripts and agent
states, and unused plugins (MSAGL, NaughtyAttributes, AsyncAwaitUtil,
Allegorithmic, Localization samples, MrtTest, ThinkGear, QuickGraph),
plus vendored sample scenes, root zips/logs, and the stray Obsidian
folder. MainMenu logs faulted galaxy-generation tasks directly instead of
AsyncAwaitUtil's WrapErrors. Stop tracking UserSettings and the Wwise
.backup folder; ignore generated .sln/.csproj by pattern.

Game-system test scenes are kept. Playdead stays: VolumeCloudRenderer
derives from its EffectBase.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-11 22:14:57 +02:00
Meta Vens
7006a6b0dd Restore the stable legacy Unity project 2026-08-10 14:57:50 +01:00
Meta Vens
56b0910a90 Persist and select playable tutorial runs 2026-07-17 08:48:56 +01:00
Meta Vens
b88bafd9e1 Use managed Verse target copy 2026-07-06 01:29:53 +01:00
Meta Vens
b86635fda5 Move RTS menu panel authority to daemon 2026-07-05 18:07:21 +01:00
Meta Vens
188188cec8 Simplify CultMesh menu surface access 2026-07-01 14:33:46 +01:00
Meta Vens
eb0760c81f Move main menu surface access to CultMesh 2026-06-30 23:15:57 +01:00
Meta Vens
764f7c25c9 Resolve embedded main menu font assets 2026-06-30 22:51:02 +01:00
Meta Vens
e9024149c0 Use UI Toolkit font assets for main menu 2026-06-30 22:45:44 +01:00
Meta Vens
c28cb4beff Stop main menu requiring daemon frame 2026-06-30 21:25:03 +01:00
Meta Vens
c95677375e Restore main menu typography 2026-06-30 20:40:34 +01:00
Meta Vens
4d7bb65868 Integrate CultMesh UI and URP cleanup 2026-06-30 19:14:49 +01:00
Meta Vens
a1f3d08676 Use provider-native current state reads 2026-06-29 13:04:01 +01:00
Meta Vens
6708581363 Sample main menu state through current typed access 2026-06-29 10:00:35 +01:00
Meta Vens
c2ef01f8b4 Add named map and zone document access 2026-06-29 07:43:02 +01:00
Meta Vens
a3d6df3bfd Add named catalog and settings document access 2026-06-29 07:30:21 +01:00
Meta Vens
ae3c1f9ff2 Use provider UI handle for Unity commands 2026-06-29 06:46:38 +01:00
Meta Vens
3d48c762de Use provider-native runtime access in menus 2026-06-29 06:25:07 +01:00
Meta Vens
c29bad6a1c Build main menu surfaces from typed state 2026-06-29 05:41:54 +01:00
Meta Vens
8bf8bcc52c Route Verse settings through typed document owner 2026-06-29 05:18:50 +01:00
Meta Vens
296a0b6de8 Add native reactive client state access 2026-06-29 04:18:22 +01:00
Meta Vens
0830588cbb Flatten Aetheria CultMesh reactive access 2026-06-29 02:42:08 +01:00
Meta Vens
e9c5281e3f Use generic reactive fixed documents 2026-06-28 23:50:28 +01:00
Meta Vens
15d6732528 Use reactive menu state documents 2026-06-28 22:36:46 +01:00
Meta Vens
1a535c416d Centralize main menu state sessions 2026-06-28 14:03:52 +01:00
Meta Vens
a035a55fc3 Remove Aetheria client state alias 2026-06-28 13:13:07 +01:00
Meta Vens
309450d60d Use reactive documents for main menu state 2026-06-28 09:21:03 +01:00
Meta Vens
55e6dbbfc7 Use reactive player settings in main menu 2026-06-28 09:13:16 +01:00
Meta Vens
5b7a5b3a8c Move observed sector projection into gameplay boot 2026-06-28 08:34:28 +01:00
Meta Vens
e1052eba30 Use named managed map and viewport accessors 2026-06-28 08:13:17 +01:00
Meta Vens
68fc0b0aa1 Use named managed shared state accessors 2026-06-28 08:02:16 +01:00
Meta Vens
09e18a4b4c Name main menu catalog access as document read 2026-06-28 03:21:47 +01:00
Meta Vens
2df226ec16 Route main menu through managed runtime client 2026-06-28 02:49:42 +01:00
Meta Vens
03b1e082ea Route catalog reads through managed document 2026-06-28 01:58:58 +01:00
Meta Vens
943a210bc5 Route Unity settings reads through managed documents 2026-06-28 01:52:11 +01:00
Meta Vens
e0e8265682 Use Aetheria state handles for sector map reads 2026-06-27 14:03:57 +01:00
Meta Vens
6dba17d86c Keep Unity state surface compile fixes 2026-06-27 13:36:40 +01:00
Meta Vens
2e96660d48 Build typed Aetheria client surfaces 2026-06-25 18:09:33 +01:00
Meta Vens
6e2460962f Submit Unity Eve commands through Verse client 2026-06-22 14:33:48 +01:00