Aetheria/Assets/Scripts/UI/InputScreen
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
..
InputDisplayButton.cs Dynamic Input System Rebinding 2021-05-07 23:31:39 +01:00
InputDisplayButton.cs.meta Dynamic Input System Rebinding 2021-05-07 23:31:39 +01:00
InputDisplayKey.cs Dynamic Input System Rebinding 2021-05-07 23:31:39 +01:00
InputDisplayKey.cs.meta Dynamic Input System Rebinding 2021-05-07 23:31:39 +01:00
InputDisplayLabel.cs Dynamic Input System Rebinding 2021-05-07 23:31:39 +01:00
InputDisplayLabel.cs.meta Dynamic Input System Rebinding 2021-05-07 23:31:39 +01:00
InputDisplayLayout.cs Land RunSave and the one-cache run and player lifecycle (Cut 10) 2026-09-14 22:00:27 +02:00
InputDisplayLayout.cs.meta Dynamic Input System Rebinding 2021-05-07 23:31:39 +01:00
InputDisplayRow.cs Dynamic Input System Rebinding 2021-05-07 23:31:39 +01:00
InputDisplayRow.cs.meta Dynamic Input System Rebinding 2021-05-07 23:31:39 +01:00