diff --git a/Aetheria.State.Verify/Program.cs b/Aetheria.State.Verify/Program.cs index 12bdb9369..451de1815 100644 --- a/Aetheria.State.Verify/Program.cs +++ b/Aetheria.State.Verify/Program.cs @@ -2457,7 +2457,7 @@ static void RequireDaemonRenderQueryAuthority(string root) "foreach (var beltPose in _daemonAsteroidBeltPoses)", "beltPose.InstancePoses ?? Array.Empty()", "private void RefreshDaemonContactRows()", - ".Reactive(\"unity-zone-renderer\")", + ".ReactiveZoneContacts(\"unity-zone-renderer\")", "private void RefreshDaemonCompassMarkers()", "private void RefreshDaemonVisibleEntityInstances()", "PowerPulse(", @@ -4575,7 +4575,7 @@ static void RequireSectorMapZoneDetailsUseEveSurface(string root) "zoneFacts.Bodies", "zoneFacts.Entities", "AetheriaUnityRuntimeClientProvider", - ".Reactive(\"unity-sector-renderer\")", + ".ReactiveSectorMap(\"unity-sector-renderer\")", ".Reactive(zoneIndex, \"unity-sector-renderer\")", "_zoneDetails?.Current", "AetheriaRuntimeZoneDetailsSurfaceCommands.TryRead(request, out var command)", @@ -4598,7 +4598,7 @@ static void RequireSectorMapZoneDetailsUseEveSurface(string root) "SectorRenderer", "AetheriaRuntimeSectorMapDocument", "_sectorMap", - ".Reactive(\"unity-sector-renderer\")", + ".ReactiveSectorMap(\"unity-sector-renderer\")", "AetheriaRuntimeSectorMapSession", ".ObserveSectorMap()"); RequireReactiveTypedDocumentAccess( @@ -4606,7 +4606,7 @@ static void RequireSectorMapZoneDetailsUseEveSurface(string root) "SectorRenderer", "AetheriaRuntimeCurrentZoneDocument", "_currentZone", - ".Reactive(\"unity-sector-renderer\")", + ".ReactiveCurrentZone(\"unity-sector-renderer\")", "AetheriaRuntimeCurrentZoneSession", ".ObserveZone()"); RequireReactiveTypedDocumentAccess( @@ -7686,7 +7686,7 @@ static void RequireUnitySharedDocumentAccessorErgonomics(string root) var requiredObservedTargetSymbols = new[] { "CultMeshReactiveDocument _zoneContacts", - ".Reactive(\"unity-observed-target-query\")", + ".ReactiveZoneContacts(\"unity-observed-target-query\")", "_zoneContacts?.Dispose()", "_zoneContacts?.Current" }; @@ -7816,7 +7816,7 @@ static void RequireUnitySharedDocumentAccessorErgonomics(string root) "MainMenu", "AetheriaRuntimeSectorMapDocument", "_sectorMap", - ".Reactive(", + ".ReactiveSectorMap(", "AetheriaRuntimeSectorMapSession", ".ObserveSectorMap()"); RequireReactiveTypedDocumentAccess( @@ -7832,7 +7832,7 @@ static void RequireUnitySharedDocumentAccessorErgonomics(string root) "MainMenu", "AetheriaRuntimeVerseHostSettingsDocument", "_verseHostSettings", - ".Reactive(", + ".ReactiveVerseHostSettings(", "AetheriaRuntimeVerseHostSettingsSession", ".ObserveVerseHost()"); @@ -7969,8 +7969,8 @@ static void RequireUnitySharedDocumentAccessorErgonomics(string root) missingSectorRendererSharedDocumentSymbols = missingSectorRendererSharedDocumentSymbols .Concat(new[] { - ".Reactive(\"unity-sector-renderer\")", - ".Reactive(\"unity-sector-renderer\")", + ".ReactiveSectorMap(\"unity-sector-renderer\")", + ".ReactiveCurrentZone(\"unity-sector-renderer\")", ".Reactive(zoneIndex,\"unity-sector-renderer\")" }.Where(symbol => !compactSectorRenderer.Contains(symbol, StringComparison.Ordinal))) .ToArray(); @@ -7986,7 +7986,7 @@ static void RequireUnitySharedDocumentAccessorErgonomics(string root) "SectorRenderer", "AetheriaRuntimeSectorMapDocument", "_sectorMap", - ".Reactive(\"unity-sector-renderer\")", + ".ReactiveSectorMap(\"unity-sector-renderer\")", "AetheriaRuntimeSectorMapSession", ".ObserveSectorMap()"); RequireReactiveTypedDocumentAccess( @@ -7994,7 +7994,7 @@ static void RequireUnitySharedDocumentAccessorErgonomics(string root) "SectorRenderer", "AetheriaRuntimeCurrentZoneDocument", "_currentZone", - ".Reactive(\"unity-sector-renderer\")", + ".ReactiveCurrentZone(\"unity-sector-renderer\")", "AetheriaRuntimeCurrentZoneSession", ".ObserveZone()"); RequireReactiveTypedDocumentAccess( @@ -8049,7 +8049,7 @@ static void RequireUnitySharedDocumentAccessorErgonomics(string root) var requiredZoneRendererSharedDocumentSymbols = new[] { "CultMeshReactiveDocument _zoneContacts", - ".Reactive(\"unity-zone-renderer\")", + ".ReactiveZoneContacts(\"unity-zone-renderer\")", "_zoneContacts?.Dispose()", "_zoneContacts?.Current", "private void OnDestroy()" @@ -8069,7 +8069,7 @@ static void RequireUnitySharedDocumentAccessorErgonomics(string root) "ZoneRenderer", "AetheriaRuntimeZoneContactsDocument", "_zoneContacts", - ".Reactive(\"unity-zone-renderer\")", + ".ReactiveZoneContacts(\"unity-zone-renderer\")", "AetheriaRuntimeZoneContactsSession", "ResolveClient().State.ObserveZoneContacts()"); RequireReactiveTypedDocumentAccess( @@ -8096,7 +8096,7 @@ static void RequireUnitySharedDocumentAccessorErgonomics(string root) string.Join(", ", zoneRendererRawDocumentHits)); } - Console.WriteLine("Shared document accessors: Unity shared catalog/settings reads use generic managed typed documents"); + Console.WriteLine("Shared document accessors: Unity shared runtime reads use named managed typed documents"); } static void RequireUnityViewportAndMapReadsUseManagedAccessors(string root) @@ -8269,7 +8269,7 @@ static void RequireUnityViewportAndMapReadsUseManagedAccessors(string root) "AetheriaRuntimeObjectsViewportSession", ".ObserveObjects(viewportBounds)"); - Console.WriteLine("Viewport and map document accessors: Unity reads map, contact, viewport, and current-entity state through managed typed document access"); + Console.WriteLine("Viewport and map document accessors: Unity reads fixed map/contact state through named documents and viewport state through managed typed document access"); } static void RequireAetheriaManagedStateAccessorsCoverDomainDocuments(string root) @@ -8329,6 +8329,16 @@ static void RequireAetheriaManagedStateAccessorsCoverDomainDocuments(string root "public CultMeshReactiveDocument ReactiveDaemonSoaView()", "public CultMeshDocumentHandle ZoneRenderDocument()", "public CultMeshReactiveDocument ReactiveZoneRender()", + "public CultMeshDocumentHandle LoadoutTemplatesDocument()", + "public CultMeshReactiveDocument ReactiveLoadoutTemplates()", + "public CultMeshDocumentHandle SectorMapDocument()", + "public CultMeshReactiveDocument ReactiveSectorMap()", + "public CultMeshDocumentHandle CurrentZoneDocument()", + "public CultMeshReactiveDocument ReactiveCurrentZone()", + "public CultMeshDocumentHandle ZoneContactsDocument()", + "public CultMeshReactiveDocument ReactiveZoneContacts()", + "public CultMeshDocumentHandle VerseHostSettingsDocument()", + "public CultMeshReactiveDocument ReactiveVerseHostSettings()", "public CultMeshDocumentHandle CurrentDocking()", "public CultMeshReactiveDocument ReactiveCurrentDocking()", "public CultMeshDocumentHandle CurrentEntityDocument()", @@ -8379,15 +8389,12 @@ static void RequireAetheriaManagedStateAccessorsCoverDomainDocuments(string root "ReactiveCatalogAsync(", "LatestLoadoutTemplates(", "LatestLoadoutTemplatesAsync(", - "ReactiveLoadoutTemplates(", "ReactiveLoadoutTemplatesAsync(", "LatestSectorMap(", "LatestSectorMapAsync(", - "ReactiveSectorMap(", "ReactiveSectorMapAsync(", "LatestZoneContacts(", "LatestZoneContactsAsync(", - "ReactiveZoneContacts(", "ReactiveZoneContactsAsync(", "LatestStationRefit(", "LatestStationRefitAsync(", @@ -8747,7 +8754,7 @@ static void RequireAetheriaManagedStateAccessorsCoverDomainDocuments(string root "Starbridge player-seat examples must use generic parameterized managed document access instead of named wrappers or raw handle walks."); } - Console.WriteLine("Domain document accessors: managed Aetheria state uses generic fixed-document reads plus generic parameterized viewport/detail/Starbridge/Eve-surface access"); + Console.WriteLine("Domain document accessors: managed Aetheria state exposes named fixed-document reads plus parameterized viewport/detail/Starbridge/Eve-surface access"); } static void RequireVerseHostSettingsAuthority(string root) @@ -9306,7 +9313,7 @@ static void RequireClientTargetBootAuthority(string root) "AetheriaUnityRuntimeClientProvider.RuntimeState(stateBoot, stateBoot.RuntimeId)", ".ReactiveCatalogSnapshot()", "runtimeCatalogDocument.Current", - ".Reactive()", + ".ReactiveSectorMap()", "sectorMapDocument.Current", "new ItemManager(", "new AetheriaUnityLoadoutItemFactory(itemManager, runtimeCatalog)", @@ -9365,7 +9372,7 @@ static void RequireClientTargetBootAuthority(string root) "CurrentStateBoot()", "ResolveSectorMap(AetheriaRuntimeStateBootReport stateBoot)", "AetheriaUnityRuntimeClientProvider", - ".Reactive(", + ".ReactiveSectorMap(", "PrepareDocumentAccess(stateBoot)", "ResolveVerseHostSettings(AetheriaRuntimeStateBootReport stateBoot)", "AetheriaState.At(AetheriaUnityRuntimePaths.GameDataDirectory)", @@ -12048,7 +12055,7 @@ static void RequireAetheriaRuntimeVerseClientContract(string root) "CultMeshReactiveDocument? managedDaemonFrame = null;", "managedDaemonFrame = state.ReactiveDaemonFrame();", "managedCatalog = state.ReactiveCatalogSnapshot();", - "managedLoadoutTemplates = state.Reactive();", + "managedLoadoutTemplates = state.ReactiveLoadoutTemplates();", "managedStarbridgeScenario = state.Reactive();", "managedStarbridgeSession = state.Reactive();", "AetheriaRuntimeDaemonFrameDocument RequireManagedFrame()", @@ -13000,7 +13007,7 @@ static void RequireMainMenuVerseHostDocumentAccess(string root) var requiredMainMenuSymbols = new[] { "ResolveVerseHostSettings(AetheriaRuntimeStateBootReport stateBoot)", - ".Reactive(", + ".ReactiveVerseHostSettings(", "AetheriaRuntimeClientTargetSurfaceBuilder.Build(", "AetheriaRuntimeMainMenuSurfaceBuilder.BuildRoot(" }; @@ -13174,7 +13181,7 @@ static void RequireMainMenuContinueRunState(string root) { "ResolveSectorMap", "AetheriaUnityRuntimeClientProvider", - ".Reactive(", + ".ReactiveSectorMap(", "PrepareDocumentAccess(stateBoot)", "ContinueGame()", "SceneManager.LoadScene(\"ARPG\")" @@ -13509,7 +13516,7 @@ static void RequireMainMenuContinueRunState(string root) "private bool TryQueryEntityTarget(", "AetheriaRuntimeZoneContactRow", "AetheriaRuntimeZoneTargetRow", - ".Reactive(\"unity-observed-target-query\")", + ".ReactiveZoneContacts(\"unity-observed-target-query\")", "_zoneContacts?.Current", "_zoneContacts?.Dispose()", "_entityIndex.TryResolveEntityByDaemonIndex(targetEntityIndex, out var targetEntity)" @@ -14592,7 +14599,7 @@ static void RequireUnityObserverDoesNotTickLocalSimulation(string root) "private bool TryQueryEntityTarget(", "AetheriaRuntimeZoneContactRow", "AetheriaRuntimeZoneTargetRow", - ".Reactive(\"unity-observed-target-query\")", + ".ReactiveZoneContacts(\"unity-observed-target-query\")", "_zoneContacts?.Current", "_zoneContacts?.Dispose()", "_entityIndex.TryResolveEntityByDaemonIndex(targetEntityIndex, out var targetEntity)" @@ -14735,13 +14742,13 @@ static void RequireUnityObserverDoesNotTickLocalSimulation(string root) !compactMapRenderer.Contains(".Reactive(viewport,\"unity-map-renderer\")", StringComparison.Ordinal) || !compactMapRenderer.Contains(".ReactivePlayerSettingsDocument(\"unity-map-renderer\")", StringComparison.Ordinal) || !sectorRenderer.Contains("AetheriaUnityRuntimeClientProvider", StringComparison.Ordinal) || - !compactSectorRenderer.Contains(".Reactive(\"unity-sector-renderer\")", StringComparison.Ordinal) || + !compactSectorRenderer.Contains(".ReactiveSectorMap(\"unity-sector-renderer\")", StringComparison.Ordinal) || !compactSectorRenderer.Contains(".Reactive(zoneIndex,\"unity-sector-renderer\")", StringComparison.Ordinal) || !sectorRenderer.Contains(".Current", StringComparison.Ordinal) || !compactSectorRenderer.Contains(".ReactiveCatalogSnapshot(\"unity-sector-renderer\")", StringComparison.Ordinal) || !compactSectorRenderer.Contains(".ReactivePlayerSettingsDocument(\"unity-sector-renderer\")", StringComparison.Ordinal) || !sectorMap.Contains("AetheriaUnityRuntimeClientProvider", StringComparison.Ordinal) || - !compactSectorMap.Contains(".Reactive(\"unity-sector-map\")", StringComparison.Ordinal) || + !compactSectorMap.Contains(".ReactiveSectorMap(\"unity-sector-map\")", StringComparison.Ordinal) || !sectorRenderer.Contains("AetheriaRuntimeZoneDetailsSurfaceBuilder.Facts(", StringComparison.Ordinal)) { throw new InvalidOperationException( @@ -14760,7 +14767,7 @@ static void RequireUnityObserverDoesNotTickLocalSimulation(string root) "SectorMap", "AetheriaRuntimeSectorMapDocument", "_sectorMapDocument", - ".Reactive(\"unity-sector-map\")", + ".ReactiveSectorMap(\"unity-sector-map\")", "AetheriaRuntimeSectorMapSession", ".ObserveSectorMap()"); @@ -15401,7 +15408,7 @@ static void RequireUnityObserverDoesNotTickLocalSimulation(string root) "ResolveSectorMap(stateBoot)", "AetheriaUnityRuntimeClientProvider", "PrepareDocumentAccess(stateBoot)", - ".Reactive(", + ".ReactiveSectorMap(", "sectorMap.FrameId", "SceneManager.LoadScene(\"ARPG\")" }; @@ -16304,7 +16311,7 @@ static void RequireRuntimeStateReaderOwnsUnityStateAcquisition(string root) "AetheriaUnityRuntimeClientProvider.RuntimeState(stateBoot, stateBoot.RuntimeId)", ".ReactiveCatalogSnapshot()", "runtimeCatalogDocument.Current", - ".Reactive()", + ".ReactiveSectorMap()", "sectorMapDocument.Current", "new ItemManager(", "new AetheriaUnityLoadoutItemFactory(itemManager, runtimeCatalog)", @@ -16357,6 +16364,11 @@ static void RequireRuntimeStateReaderOwnsUnityStateAcquisition(string root) "public static CultMeshReactiveDocument ReactiveDaemonFrame(", "public static CultMeshReactiveDocument ReactiveDaemonSoaView(", "public static CultMeshReactiveDocument ReactiveZoneRender(", + "public static CultMeshReactiveDocument ReactiveLoadoutTemplates(", + "public static CultMeshReactiveDocument ReactiveSectorMap(", + "public static CultMeshReactiveDocument ReactiveCurrentZone(", + "public static CultMeshReactiveDocument ReactiveZoneContacts(", + "public static CultMeshReactiveDocument ReactiveVerseHostSettings(", "public static CultMeshReactiveDocument Reactive(", "AetheriaClientEveSurface surface", "public static CultMeshReactiveDocument ReactiveEveSurface(", @@ -16845,7 +16857,7 @@ static void RequireRuntimeStateReaderOwnsUnityStateAcquisition(string root) if (!mainMenu.Contains("AetheriaUnityRuntimeClientProvider", StringComparison.Ordinal) || !mainMenu.Contains("ResolveSectorMap(AetheriaRuntimeStateBootReport stateBoot)", StringComparison.Ordinal) || !mainMenu.Contains("PrepareDocumentAccess(stateBoot)", StringComparison.Ordinal) || - !mainMenu.Contains(".Reactive(", StringComparison.Ordinal) || + !mainMenu.Contains(".ReactiveSectorMap(", StringComparison.Ordinal) || !mainMenu.Contains(".ReactivePlayerSettingsDocument(", StringComparison.Ordinal)) { throw new InvalidOperationException( @@ -16875,7 +16887,7 @@ static void RequireRuntimeStateReaderOwnsUnityStateAcquisition(string root) { ".ReactiveCatalogSnapshot()", "runtimeCatalogDocument.Current", - ".Reactive()", + ".ReactiveSectorMap()", "sectorMapDocument.Current", "Galaxy.ProjectObservedSectorMap(", "sectorMap.IsTutorial", diff --git a/Assets/Scripts/Gameplay/AetheriaUnityGameplayBootShell.cs b/Assets/Scripts/Gameplay/AetheriaUnityGameplayBootShell.cs index 531ddab8d..e3e652ff9 100644 --- a/Assets/Scripts/Gameplay/AetheriaUnityGameplayBootShell.cs +++ b/Assets/Scripts/Gameplay/AetheriaUnityGameplayBootShell.cs @@ -40,7 +40,7 @@ public sealed class AetheriaUnityGameplayBootShell var runtimeCatalog = runtimeCatalogDocument.Current; if (runtimeCatalog == null) throw new InvalidOperationException("Aetheria typed runtime catalog is required before gameplay boot."); - using var sectorMapDocument = runtimeState.Reactive(); + using var sectorMapDocument = runtimeState.ReactiveSectorMap(); var sectorMap = sectorMapDocument.Current; if (sectorMap == null) throw new InvalidOperationException("Aetheria typed sector map is required before gameplay boot."); diff --git a/Assets/Scripts/Gameplay/AetheriaUnityObservedTargetQuery.cs b/Assets/Scripts/Gameplay/AetheriaUnityObservedTargetQuery.cs index 25f165e88..a37599e07 100644 --- a/Assets/Scripts/Gameplay/AetheriaUnityObservedTargetQuery.cs +++ b/Assets/Scripts/Gameplay/AetheriaUnityObservedTargetQuery.cs @@ -95,7 +95,7 @@ public sealed class AetheriaUnityObservedTargetQuery : IDisposable try { _zoneContacts = AetheriaUnityRuntimeClientProvider - .Reactive("unity-observed-target-query"); + .ReactiveZoneContacts("unity-observed-target-query"); return _zoneContacts?.Current; } catch diff --git a/Assets/Scripts/Gameplay/AetheriaUnityRuntimeClientProvider.cs b/Assets/Scripts/Gameplay/AetheriaUnityRuntimeClientProvider.cs index 6c5438e82..8dc989e4c 100644 --- a/Assets/Scripts/Gameplay/AetheriaUnityRuntimeClientProvider.cs +++ b/Assets/Scripts/Gameplay/AetheriaUnityRuntimeClientProvider.cs @@ -215,6 +215,71 @@ public static class AetheriaUnityRuntimeClientProvider return RuntimeState(stateBoot, runtimeId).ReactiveZoneRender(); } + public static CultMeshReactiveDocument ReactiveLoadoutTemplates( + string runtimeId = "") + { + return RuntimeState(runtimeId).ReactiveLoadoutTemplates(); + } + + public static CultMeshReactiveDocument ReactiveLoadoutTemplates( + AetheriaRuntimeStateBootReport stateBoot, + string runtimeId = "") + { + return RuntimeState(stateBoot, runtimeId).ReactiveLoadoutTemplates(); + } + + public static CultMeshReactiveDocument ReactiveSectorMap( + string runtimeId = "") + { + return RuntimeState(runtimeId).ReactiveSectorMap(); + } + + public static CultMeshReactiveDocument ReactiveSectorMap( + AetheriaRuntimeStateBootReport stateBoot, + string runtimeId = "") + { + return RuntimeState(stateBoot, runtimeId).ReactiveSectorMap(); + } + + public static CultMeshReactiveDocument ReactiveCurrentZone( + string runtimeId = "") + { + return RuntimeState(runtimeId).ReactiveCurrentZone(); + } + + public static CultMeshReactiveDocument ReactiveCurrentZone( + AetheriaRuntimeStateBootReport stateBoot, + string runtimeId = "") + { + return RuntimeState(stateBoot, runtimeId).ReactiveCurrentZone(); + } + + public static CultMeshReactiveDocument ReactiveZoneContacts( + string runtimeId = "") + { + return RuntimeState(runtimeId).ReactiveZoneContacts(); + } + + public static CultMeshReactiveDocument ReactiveZoneContacts( + AetheriaRuntimeStateBootReport stateBoot, + string runtimeId = "") + { + return RuntimeState(stateBoot, runtimeId).ReactiveZoneContacts(); + } + + public static CultMeshReactiveDocument ReactiveVerseHostSettings( + string runtimeId = "") + { + return RuntimeState(runtimeId).ReactiveVerseHostSettings(); + } + + public static CultMeshReactiveDocument ReactiveVerseHostSettings( + AetheriaRuntimeStateBootReport stateBoot, + string runtimeId = "") + { + return RuntimeState(stateBoot, runtimeId).ReactiveVerseHostSettings(); + } + public static CultMeshReactiveDocument Reactive( AetheriaRuntimeStateBootReport stateBoot, string runtimeId = "") diff --git a/Assets/Scripts/Tests/DaemonRuntimeDocumentTests.cs b/Assets/Scripts/Tests/DaemonRuntimeDocumentTests.cs index f29e6886c..af70bb23c 100644 --- a/Assets/Scripts/Tests/DaemonRuntimeDocumentTests.cs +++ b/Assets/Scripts/Tests/DaemonRuntimeDocumentTests.cs @@ -170,7 +170,7 @@ public class DaemonRuntimeDocumentTests var latestFrame = ReadLatest(client.State.DaemonFrameDocument()); var catalog = ReadLatest(client.State.Document()); var playerSettings = ReadLatest(client.State.Document()); - var verseHostSettings = ReadLatest(client.State.Document()); + var verseHostSettings = ReadLatest(client.State.VerseHostSettingsDocument()); var currentEntityByType = client.State .Document() .LatestAsync() @@ -211,12 +211,12 @@ public class DaemonRuntimeDocumentTests daemonSoaViewReactive, zoneRenderReactive, out var observed)); - using var loadoutTemplatesReactive = client.State.Reactive(); - using var sectorMapReactive = client.State.Reactive(); + using var loadoutTemplatesReactive = client.State.ReactiveLoadoutTemplates(); + using var sectorMapReactive = client.State.ReactiveSectorMap(); using var playerSettingsReactive = client.State.ReactivePlayerSettingsDocument(); - using var verseHostSettingsReactive = client.State.Reactive(); - using var zoneContactsReactive = client.State.Reactive(); - using var currentZoneReactive = client.State.Reactive(); + using var verseHostSettingsReactive = client.State.ReactiveVerseHostSettings(); + using var zoneContactsReactive = client.State.ReactiveZoneContacts(); + using var currentZoneReactive = client.State.ReactiveCurrentZone(); using var currentEntityDocumentReactive = client.State.ReactiveCurrentEntity(); using var currentDockingReactive = client.State.ReactiveCurrentDocking(); using var stationRefitReactive = client.State.ReactiveStationRefit(); @@ -270,9 +270,9 @@ public class DaemonRuntimeDocumentTests Assert.AreEqual(currentDocking.CurrentEntityKey, currentDockingReactive.Current.CurrentEntityKey); Assert.AreEqual(stationRefit.StationEntityKey, stationRefitReactive.Current.StationEntityKey); Assert.AreSame(client.State.PlayerSettings, client.State.Document()); - Assert.AreSame(client.State.VerseHostSettings, client.State.Document()); + Assert.AreSame(client.State.VerseHostSettings, client.State.VerseHostSettingsDocument()); Assert.AreSame(client.State.CurrentEntity, client.State.Document()); - Assert.AreSame(client.State.ZoneContacts, client.State.Document()); + Assert.AreSame(client.State.ZoneContacts, client.State.ZoneContactsDocument()); Assert.AreEqual( typeof(AetheriaRuntimeCurrentEntityDocument), client.State.Document().DocumentType); @@ -362,7 +362,7 @@ public class DaemonRuntimeDocumentTests .GetResult(); var player = ReadLatest(client.State.Document()); - var verseHost = ReadLatest(client.State.Document()); + var verseHost = ReadLatest(client.State.VerseHostSettingsDocument()); var catalog = ReadLatest(client.State.Document()); Assert.AreEqual(AetheriaRuntimeCatalogSnapshot.SchemaId, client.State.Catalog.Sources.Last().SchemaId); @@ -372,7 +372,7 @@ public class DaemonRuntimeDocumentTests Assert.AreEqual("", player.PlayerName); Assert.AreEqual("", verseHost.VerseId); Assert.AreSame(client.State.PlayerSettings, client.State.Document()); - Assert.AreSame(client.State.VerseHostSettings, client.State.Document()); + Assert.AreSame(client.State.VerseHostSettings, client.State.VerseHostSettingsDocument()); } [Test] diff --git a/Assets/Scripts/UI/MainMenu.cs b/Assets/Scripts/UI/MainMenu.cs index 4811064b7..1e81fdf80 100644 --- a/Assets/Scripts/UI/MainMenu.cs +++ b/Assets/Scripts/UI/MainMenu.cs @@ -151,7 +151,7 @@ public class MainMenu : MonoBehaviour { PrepareDocumentAccess(stateBoot); _sectorMap ??= AetheriaUnityRuntimeClientProvider - .Reactive(stateBoot, "unity-main-menu"); + .ReactiveSectorMap(stateBoot, "unity-main-menu"); return _sectorMap?.Current; } catch (Exception ex) @@ -189,7 +189,7 @@ public class MainMenu : MonoBehaviour { PrepareDocumentAccess(stateBoot); _verseHostSettings ??= AetheriaUnityRuntimeClientProvider - .Reactive(stateBoot, "unity-main-menu"); + .ReactiveVerseHostSettings(stateBoot, "unity-main-menu"); return _verseHostSettings?.Current; } catch (Exception ex) diff --git a/Assets/Scripts/UI/Menu/SectorMap.cs b/Assets/Scripts/UI/Menu/SectorMap.cs index df33f3832..5c0037fd9 100644 --- a/Assets/Scripts/UI/Menu/SectorMap.cs +++ b/Assets/Scripts/UI/Menu/SectorMap.cs @@ -222,7 +222,7 @@ public class SectorMap : MonoBehaviour private void EnsureSectorMapLoaded() { _sectorMapDocument ??= AetheriaUnityRuntimeClientProvider - .Reactive("unity-sector-map"); + .ReactiveSectorMap("unity-sector-map"); _sectorMap = _sectorMapDocument?.Current; if (_sectorMapLoaded) diff --git a/Assets/Scripts/UI/Menu/SectorRenderer.cs b/Assets/Scripts/UI/Menu/SectorRenderer.cs index 5703dfd37..9143792a0 100644 --- a/Assets/Scripts/UI/Menu/SectorRenderer.cs +++ b/Assets/Scripts/UI/Menu/SectorRenderer.cs @@ -169,7 +169,7 @@ public class SectorRenderer : MonoBehaviour, IBeginDragHandler, IDragHandler, IS try { _sectorMap ??= AetheriaUnityRuntimeClientProvider - .Reactive("unity-sector-renderer"); + .ReactiveSectorMap("unity-sector-renderer"); var sectorMap = _sectorMap?.Current; return (sectorMap?.Zones ?? Array.Empty()) .FirstOrDefault(zone => zone.ZoneIndex == zoneIndex); @@ -301,7 +301,7 @@ public class SectorRenderer : MonoBehaviour, IBeginDragHandler, IDragHandler, IS try { _currentZone ??= AetheriaUnityRuntimeClientProvider - .Reactive("unity-sector-renderer"); + .ReactiveCurrentZone("unity-sector-renderer"); } catch (Exception ex) { diff --git a/Assets/Scripts/Zone Display/ZoneRenderer.cs b/Assets/Scripts/Zone Display/ZoneRenderer.cs index cb4897aa8..bd92c70f2 100644 --- a/Assets/Scripts/Zone Display/ZoneRenderer.cs +++ b/Assets/Scripts/Zone Display/ZoneRenderer.cs @@ -1226,7 +1226,7 @@ public class ZoneRenderer : MonoBehaviour try { _zoneContacts = AetheriaUnityRuntimeClientProvider - .Reactive("unity-zone-renderer"); + .ReactiveZoneContacts("unity-zone-renderer"); } catch (Exception ex) { diff --git a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaClientState.cs b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaClientState.cs index 50be3341c..187318855 100644 --- a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaClientState.cs +++ b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaClientState.cs @@ -223,6 +223,56 @@ namespace GameCult.Aetheria.State.Verse return ZoneRenderDocument().Reactive(); } + public CultMeshDocumentHandle LoadoutTemplatesDocument() + { + return LoadoutTemplates; + } + + public CultMeshReactiveDocument ReactiveLoadoutTemplates() + { + return LoadoutTemplatesDocument().Reactive(); + } + + public CultMeshDocumentHandle SectorMapDocument() + { + return SectorMap; + } + + public CultMeshReactiveDocument ReactiveSectorMap() + { + return SectorMapDocument().Reactive(); + } + + public CultMeshDocumentHandle CurrentZoneDocument() + { + return CurrentZone; + } + + public CultMeshReactiveDocument ReactiveCurrentZone() + { + return CurrentZoneDocument().Reactive(); + } + + public CultMeshDocumentHandle ZoneContactsDocument() + { + return ZoneContacts; + } + + public CultMeshReactiveDocument ReactiveZoneContacts() + { + return ZoneContactsDocument().Reactive(); + } + + public CultMeshDocumentHandle VerseHostSettingsDocument() + { + return VerseHostSettings; + } + + public CultMeshReactiveDocument ReactiveVerseHostSettings() + { + return VerseHostSettingsDocument().Reactive(); + } + public CultMeshDocumentHandle CurrentDocking() { return CurrentDockingDocument; diff --git a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeVerseClient.cs b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeVerseClient.cs index 7933b71fb..8984706c3 100644 --- a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeVerseClient.cs +++ b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeVerseClient.cs @@ -499,7 +499,7 @@ namespace GameCult.Aetheria.State.Verse managedDaemonFrame = state.ReactiveDaemonFrame(); managedCatalog = state.ReactiveCatalogSnapshot(); - managedLoadoutTemplates = state.Reactive(); + managedLoadoutTemplates = state.ReactiveLoadoutTemplates(); managedStarbridgeScenario = state.Reactive(); managedStarbridgeSession = state.Reactive(); _managedDaemonFrame = managedDaemonFrame;