From de13ea89eaf425c484f56048fc4e9d2e287cc102 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sun, 28 Jun 2026 11:49:27 +0100 Subject: [PATCH] Isolate runtime bootstrap document seeds --- Aetheria.State.Verify/Program.cs | 12 ++++++-- GameCult.Aetheria.State.Unity.csproj | 1 + .../AetheriaRuntimeBootstrapDocuments.cs | 28 +++++++++++++++++++ .../AetheriaRuntimeBootstrapDocuments.cs.meta | 2 ++ .../Runtime/AetheriaRuntimeVerseClient.cs | 13 ++++----- 5 files changed, 46 insertions(+), 10 deletions(-) create mode 100644 Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeBootstrapDocuments.cs create mode 100644 Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeBootstrapDocuments.cs.meta diff --git a/Aetheria.State.Verify/Program.cs b/Aetheria.State.Verify/Program.cs index f90c7dfe7..1a4a5114d 100644 --- a/Aetheria.State.Verify/Program.cs +++ b/Aetheria.State.Verify/Program.cs @@ -10988,11 +10988,15 @@ static void RequireAetheriaRuntimeVerseClientContract(string root) { "BootstrapCatalogDocument(", "CatalogBootstrapSource(", - "legacy catalog store bootstrap seed for managed Aetheria state", + "managed Aetheria document bootstrap seed", "BootstrapRuntimeCatalogSnapshot()", "BootstrapLoadoutTemplatesDocument()", "BootstrapPlayerSettingsDocument()", - "BootstrapVerseHostSettingsDocument()" + "BootstrapVerseHostSettingsDocument()", + "AetheriaRuntimeBootstrapDocuments.RuntimeCatalog(StatePath)", + "AetheriaRuntimeBootstrapDocuments.LoadoutTemplates(StatePath)", + "AetheriaRuntimeBootstrapDocuments.PlayerSettings(StatePath)", + "AetheriaRuntimeBootstrapDocuments.VerseHostSettings(StatePath)" }; var missingClientBootstrapSymbols = requiredClientBootstrapSymbols .Where(symbol => !client.Contains(symbol, StringComparison.Ordinal)) @@ -11008,6 +11012,10 @@ static void RequireAetheriaRuntimeVerseClientContract(string root) { "return Task.FromResult(AetheriaRuntimeCatalogStore.ReadPlayerSettings(StatePath));", "return Task.FromResult(AetheriaRuntimeCatalogStore.ReadVerseHostSettings(StatePath));", + "AetheriaRuntimeCatalogStore.OpenReadOnly(StatePath)", + "AetheriaRuntimeCatalogStore.ReadLoadoutTemplates(StatePath)", + "AetheriaRuntimeCatalogStore.ReadPlayerSettings(StatePath)", + "AetheriaRuntimeCatalogStore.ReadVerseHostSettings(StatePath)", "ReadRuntimeCatalogSnapshot()", "ReadLoadoutTemplatesDocument()", "ReadPlayerSettingsDocument()", diff --git a/GameCult.Aetheria.State.Unity.csproj b/GameCult.Aetheria.State.Unity.csproj index 51354eb22..c13c06f8b 100644 --- a/GameCult.Aetheria.State.Unity.csproj +++ b/GameCult.Aetheria.State.Unity.csproj @@ -83,6 +83,7 @@ + diff --git a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeBootstrapDocuments.cs b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeBootstrapDocuments.cs new file mode 100644 index 000000000..3b3421aeb --- /dev/null +++ b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeBootstrapDocuments.cs @@ -0,0 +1,28 @@ +namespace GameCult.Aetheria.State.Verse +{ + public static class AetheriaRuntimeBootstrapDocuments + { + public static AetheriaRuntimeCatalogSnapshot RuntimeCatalog(string statePath) + { + return AetheriaRuntimeCatalogStore.OpenReadOnly(statePath); + } + + public static AetheriaRuntimeLoadoutTemplatesDocument LoadoutTemplates(string statePath) + { + return new AetheriaRuntimeLoadoutTemplatesDocument( + AetheriaRuntimeCatalogStore.ReadLoadoutTemplates(statePath)); + } + + public static AetheriaRuntimePlayerSettingsDocument PlayerSettings(string statePath) + { + return AetheriaRuntimePlayerSettingsDocument.FromSnapshot( + AetheriaRuntimeCatalogStore.ReadPlayerSettings(statePath)); + } + + public static AetheriaRuntimeVerseHostSettingsDocument VerseHostSettings(string statePath) + { + return AetheriaRuntimeVerseHostSettingsDocument.FromSnapshot( + AetheriaRuntimeCatalogStore.ReadVerseHostSettings(statePath)); + } + } +} diff --git a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeBootstrapDocuments.cs.meta b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeBootstrapDocuments.cs.meta new file mode 100644 index 000000000..e738ea8c5 --- /dev/null +++ b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeBootstrapDocuments.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 2cbb2fbe4bd64f4ab8fb3183b59b42d3 diff --git a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeVerseClient.cs b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeVerseClient.cs index e52f3797c..b52bb6099 100644 --- a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeVerseClient.cs +++ b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeVerseClient.cs @@ -775,7 +775,7 @@ namespace GameCult.Aetheria.State.Verse { return CultMesh.ProjectionSource( sourceId, - description: "legacy catalog store bootstrap seed for managed Aetheria state"); + description: "managed Aetheria document bootstrap seed"); } private sealed class AetheriaRuntimeReactiveProjectionInputs : IDisposable @@ -829,25 +829,22 @@ namespace GameCult.Aetheria.State.Verse private AetheriaRuntimeCatalogSnapshot BootstrapRuntimeCatalogSnapshot() { - return AetheriaRuntimeCatalogStore.OpenReadOnly(StatePath); + return AetheriaRuntimeBootstrapDocuments.RuntimeCatalog(StatePath); } private AetheriaRuntimeLoadoutTemplatesDocument BootstrapLoadoutTemplatesDocument() { - return new AetheriaRuntimeLoadoutTemplatesDocument( - AetheriaRuntimeCatalogStore.ReadLoadoutTemplates(StatePath)); + return AetheriaRuntimeBootstrapDocuments.LoadoutTemplates(StatePath); } private AetheriaRuntimePlayerSettingsDocument BootstrapPlayerSettingsDocument() { - return AetheriaRuntimePlayerSettingsDocument.FromSnapshot( - AetheriaRuntimeCatalogStore.ReadPlayerSettings(StatePath)); + return AetheriaRuntimeBootstrapDocuments.PlayerSettings(StatePath); } private AetheriaRuntimeVerseHostSettingsDocument BootstrapVerseHostSettingsDocument() { - return AetheriaRuntimeVerseHostSettingsDocument.FromSnapshot( - AetheriaRuntimeCatalogStore.ReadVerseHostSettings(StatePath)); + return AetheriaRuntimeBootstrapDocuments.VerseHostSettings(StatePath); } } }