Aetheria/Assets/Scripts/ServerShared
Repository files (latest commit first)
Filename Latest commit message Latest commit date
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
..
Agents Move the ServerShared data model onto CultLib's CultCache 2026-09-14 19:00:42 +02:00
Behaviors Move the ServerShared data model onto CultLib's CultCache 2026-09-14 19:00:42 +02:00
Narrative Move the ServerShared data model onto CultLib's CultCache 2026-09-14 19:00:42 +02:00
NIH Swap Unity.Mathematics usings for CultMath 2026-09-14 17:39:12 +02:00
Serialization Delete the in-tree cache, JsonKnownTypes and vendored MessagePack 2026-09-14 18:42:09 +02:00
Aetheria.Shared.Unity.asmdef Replace the Database Tools with the Studio and cut Unity over 2026-09-14 19:15:20 +02:00
Aetheria.Shared.Unity.asmdef.meta Slime Stuff & DB Prep 2021-03-30 01:17:58 +01:00
AetheriaStores.cs Import the legacy catalog into GameData/Aetheria.cc (Cut 9) 2026-09-14 21:11:06 +02:00
AetheriaStores.cs.meta Move the ServerShared data model onto CultLib's CultCache 2026-09-14 19:00:42 +02:00
Agents.meta Local AI Testing & Interactive Tech Tab 2020-04-23 03:31:17 +01:00
AssemblyInfo.cs Move the ServerShared data model onto CultLib's CultCache 2026-09-14 19:00:42 +02:00
AssemblyInfo.cs.meta Move the ServerShared data model onto CultLib's CultCache 2026-09-14 19:00:42 +02:00
Attributes.cs Delete the in-tree cache, JsonKnownTypes and vendored MessagePack 2026-09-14 18:42:09 +02:00
Attributes.cs.meta Restore the stable legacy Unity project 2026-08-10 14:57:50 +01:00
Behaviors.meta Behavior Refactoring 2020-04-09 10:33:16 +01:00
BezierCurve.cs Swap Unity.Mathematics usings for CultMath 2026-09-14 17:39:12 +02:00
BezierCurve.cs.meta Database Improvements 2021-04-07 01:27:35 +01:00
ColorMath.cs Swap Unity.Mathematics usings for CultMath 2026-09-14 17:39:12 +02:00
ColorMath.cs.meta Improved Level Generator 2020-12-01 20:38:28 +00:00
Corporations.cs Move the ServerShared data model onto CultLib's CultCache 2026-09-14 19:00:42 +02:00
Corporations.cs.meta Infrastructure and Production 2020-06-02 07:01:03 +01:00
Entity.cs Move the ServerShared data model onto CultLib's CultCache 2026-09-14 19:00:42 +02:00
Entity.cs.meta Behavior Refactoring 2020-04-09 10:33:16 +01:00
EntitySerializer.cs Move the ServerShared data model onto CultLib's CultCache 2026-09-14 19:00:42 +02:00
EntitySerializer.cs.meta Restore the stable legacy Unity project 2026-08-10 14:57:50 +01:00
EntitySettings.cs Restore the stable legacy Unity project 2026-08-10 14:57:50 +01:00
EntitySettings.cs.meta Save/Load and Main Menu Submenus 2021-03-14 03:56:49 +00:00
EnumDictionary.cs Restore the stable legacy Unity project 2026-08-10 14:57:50 +01:00
EnumDictionary.cs.meta Database Improvements 2021-04-07 01:27:35 +01:00
Enums.cs Unified Volumetric Flow 2021-06-18 12:32:03 +01:00
Enums.cs.meta Database Support 2020-03-22 19:05:26 +00:00
Environment.cs Swap Unity.Mathematics usings for CultMath 2026-09-14 17:39:12 +02:00
Environment.cs.meta Unified Volumetric Flow 2021-06-18 12:32:03 +01:00
ExponentialCurve.cs Swap Unity.Mathematics usings for CultMath 2026-09-14 17:39:12 +02:00
ExponentialCurve.cs.meta Initial ARPG Port 2020-11-27 22:47:33 +00:00
Extensions.cs Move the ServerShared data model onto CultLib's CultCache 2026-09-14 19:00:42 +02:00
Extensions.cs.meta Database Support 2020-03-22 19:05:26 +00:00
FactionProduct.cs Move the ServerShared data model onto CultLib's CultCache 2026-09-14 19:00:42 +02:00
FactionProduct.cs.meta Author manufacturer variation as faction products 2026-09-12 01:12:12 +02:00
Galaxy.cs Move the ServerShared data model onto CultLib's CultCache 2026-09-14 19:00:42 +02:00
Galaxy.cs.meta Hostility Fix + Story Work 2021-05-14 03:03:28 +01:00
GlobalData.cs Delete the in-tree cache, JsonKnownTypes and vendored MessagePack 2026-09-14 18:42:09 +02:00
GlobalData.cs.meta Restore the stable legacy Unity project 2026-08-10 14:57:50 +01:00
InputLayout.cs Move the ServerShared data model onto CultLib's CultCache 2026-09-14 19:00:42 +02:00
InputLayout.cs.meta Move the ServerShared data model onto CultLib's CultCache 2026-09-14 19:00:42 +02:00
ItemData.cs Move the ServerShared data model onto CultLib's CultCache 2026-09-14 19:00:42 +02:00
ItemData.cs.meta Restore the stable legacy Unity project 2026-08-10 14:57:50 +01:00
ItemInstance.cs Move the ServerShared data model onto CultLib's CultCache 2026-09-14 19:00:42 +02:00
ItemInstance.cs.meta Database Support 2020-03-22 19:05:26 +00:00
ItemManager.cs Move the ServerShared data model onto CultLib's CultCache 2026-09-14 19:00:42 +02:00
ItemManager.cs.meta New Inventory System + Overhaul 2020-12-10 23:20:38 +00:00
LoadoutGenerator.cs Move the ServerShared data model onto CultLib's CultCache 2026-09-14 19:00:42 +02:00
LoadoutGenerator.cs.meta Enemy Loadout Generation 2021-03-18 00:36:34 +00:00
MarkovNameGenerator.cs Swap Unity.Mathematics usings for CultMath 2026-09-14 17:39:12 +02:00
MarkovNameGenerator.cs.meta Sector Generation 2021-03-10 09:18:07 +00:00
Narrative.meta UI Improvements 2021-04-27 16:44:44 +01:00
NIH.meta Database Support 2020-03-22 19:05:26 +00:00
Noise1D.cs Swap Unity.Mathematics usings for CultMath 2026-09-14 17:39:12 +02:00
Noise1D.cs.meta Hellfire 2021-01-10 03:59:47 +00:00
OrbitalEntity.cs Move the ServerShared data model onto CultLib's CultCache 2026-09-14 19:00:42 +02:00
OrbitalEntity.cs.meta Stat Effects and Tech Tree Improvements 2020-04-16 03:08:18 +01:00
PlayerSettings.cs Delete the old run, settings, layout and loadout authorities (Cut 10) 2026-09-14 21:51:10 +02:00
PlayerSettings.cs.meta Restore the stable legacy Unity project 2026-08-10 14:57:50 +01:00
Rect.cs Swap Unity.Mathematics usings for CultMath 2026-09-14 17:39:12 +02:00
Rect.cs.meta TECH TREES WHOO 2020-04-11 19:18:02 +01:00
SampleElimination.cs Swap Unity.Mathematics usings for CultMath 2026-09-14 17:39:12 +02:00
SampleElimination.cs.meta Sector Generation 2021-03-10 09:18:07 +00:00
SavedGame.cs Land RunSave and the one-cache run and player lifecycle (Cut 10) 2026-09-14 22:00:27 +02:00
SavedGame.cs.meta Restore the stable legacy Unity project 2026-08-10 14:57:50 +01:00
Serialization.meta Delete the in-tree cache, JsonKnownTypes and vendored MessagePack 2026-09-14 18:42:09 +02:00
Settings.cs Swap Unity.Mathematics usings for CultMath 2026-09-14 17:39:12 +02:00
Settings.cs.meta Asteroids & Refactoring 2020-12-01 00:16:11 +00:00
Ship.cs Delete AetheriaMath in favour of CultMath 2026-09-14 18:02:41 +02:00
Ship.cs.meta Database Support 2020-03-22 19:05:26 +00:00
Wormhole.cs Swap Unity.Mathematics usings for CultMath 2026-09-14 17:39:12 +02:00
Wormhole.cs.meta Restore the stable legacy Unity project 2026-08-10 14:57:50 +01:00
WwiseMetadata.cs Restore the stable legacy Unity project 2026-08-10 14:57:50 +01:00
WwiseMetadata.cs.meta Wwise Audio Integration 2021-04-30 06:39:57 +01:00
WwiseSoundBinding.cs Restore the stable legacy Unity project 2026-08-10 14:57:50 +01:00
WwiseSoundBinding.cs.meta Wwise Audio Integration 2021-04-30 06:39:57 +01:00
Zone.cs Move the ServerShared data model onto CultLib's CultCache 2026-09-14 19:00:42 +02:00
Zone.cs.meta Initial ARPG Port 2020-11-27 22:47:33 +00:00
ZoneData.cs Move the ServerShared data model onto CultLib's CultCache 2026-09-14 19:00:42 +02:00
ZoneData.cs.meta Restore the stable legacy Unity project 2026-08-10 14:57:50 +01:00
ZoneGenerator.cs Move the ServerShared data model onto CultLib's CultCache 2026-09-14 19:00:42 +02:00
ZoneGenerator.cs.meta Database Support 2020-03-22 19:05:26 +00:00