Use generic reactive fixed documents
This commit is contained in:
parent
0e694abe9a
commit
e9c5281e3f
18 changed files with 131 additions and 219 deletions
|
|
@ -95,7 +95,7 @@ public abstract class ActionBarBinding : IDisposable
|
|||
|
||||
try
|
||||
{
|
||||
_catalog ??= Client.State.ReactiveCatalog();
|
||||
_catalog ??= Client.State.Reactive<AetheriaRuntimeCatalogSnapshot>();
|
||||
return _catalog?.Current?.FindItem(item, x => x.ItemKey);
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
|
|
|||
|
|
@ -37,11 +37,11 @@ public sealed class AetheriaUnityGameplayBootShell
|
|||
|
||||
var aetheria = AetheriaUnityRuntimeClientProvider.ResolveClient(stateBoot.StateFilePath, stateBoot.RuntimeId)
|
||||
.State;
|
||||
using var runtimeCatalogDocument = aetheria.ReactiveCatalog();
|
||||
using var runtimeCatalogDocument = aetheria.Reactive<AetheriaRuntimeCatalogSnapshot>();
|
||||
var runtimeCatalog = runtimeCatalogDocument.Current;
|
||||
if (runtimeCatalog == null)
|
||||
throw new InvalidOperationException("Aetheria typed runtime catalog is required before gameplay boot.");
|
||||
using var sectorMapDocument = aetheria.ReactiveSectorMap();
|
||||
using var sectorMapDocument = aetheria.Reactive<AetheriaRuntimeSectorMapDocument>();
|
||||
var sectorMap = sectorMapDocument.Current;
|
||||
if (sectorMap == null)
|
||||
throw new InvalidOperationException("Aetheria typed sector map is required before gameplay boot.");
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ public sealed class AetheriaUnityObservedTargetQuery : IDisposable
|
|||
{
|
||||
_zoneContacts = _resolveClient()
|
||||
?.State
|
||||
.ReactiveZoneContacts();
|
||||
.Reactive<AetheriaRuntimeZoneContactsDocument>();
|
||||
return _zoneContacts?.Current;
|
||||
}
|
||||
catch
|
||||
|
|
|
|||
|
|
@ -96,8 +96,7 @@ public static class AetheriaUnityRuntimeClientProvider
|
|||
{
|
||||
_playerSettingsDocument ??= ResolveClient(AetheriaUnityRuntimePaths.RuntimeStateFilePath)
|
||||
.State
|
||||
.Settings
|
||||
.ReactivePlayer();
|
||||
.Reactive<AetheriaRuntimePlayerSettingsDocument>();
|
||||
|
||||
var stored = _playerSettingsDocument.Current;
|
||||
if (stored == null)
|
||||
|
|
|
|||
|
|
@ -205,18 +205,18 @@ public class DaemonRuntimeDocumentTests
|
|||
.Reactive<AetheriaRuntimeZoneRenderDocument>();
|
||||
var observed = client.State.LatestObservedDaemon();
|
||||
var observedAuthoritativeFrame = client.State.LatestDaemonFrame();
|
||||
using var catalogReactive = client.State.ReactiveCatalog();
|
||||
using var catalogReactive = client.State.Reactive<AetheriaRuntimeCatalogSnapshot>();
|
||||
using var daemonFrameReactive = client.State.Reactive<AetheriaRuntimeDaemonFrameDocument>();
|
||||
using var daemonSoaViewReactive = client.State.Reactive<AetheriaRuntimeDaemonSoaViewDocument>();
|
||||
using var loadoutTemplatesReactive = client.State.ReactiveLoadoutTemplates();
|
||||
using var sectorMapReactive = client.State.ReactiveSectorMap();
|
||||
using var playerSettingsReactive = client.State.Settings.ReactivePlayer();
|
||||
using var verseHostSettingsReactive = client.State.Settings.ReactiveVerseHost();
|
||||
using var zoneContactsReactive = client.State.ReactiveZoneContacts();
|
||||
using var loadoutTemplatesReactive = client.State.Reactive<AetheriaRuntimeLoadoutTemplatesDocument>();
|
||||
using var sectorMapReactive = client.State.Reactive<AetheriaRuntimeSectorMapDocument>();
|
||||
using var playerSettingsReactive = client.State.Reactive<AetheriaRuntimePlayerSettingsDocument>();
|
||||
using var verseHostSettingsReactive = client.State.Reactive<AetheriaRuntimeVerseHostSettingsDocument>();
|
||||
using var zoneContactsReactive = client.State.Reactive<AetheriaRuntimeZoneContactsDocument>();
|
||||
using var currentZoneReactive = client.State.Current.ReactiveZone();
|
||||
using var currentEntityDocumentReactive = client.State.Current.ReactiveEntity();
|
||||
using var currentDockingReactive = client.State.Current.ReactiveDocking();
|
||||
using var stationRefitReactive = client.State.ReactiveStationRefit();
|
||||
using var stationRefitReactive = client.State.Reactive<AetheriaRuntimeStationRefitDocument>();
|
||||
using var zoneDetailsReactive = client.State.Details.ReactiveZone(0);
|
||||
using var selectedObjectReactive = client.State.Details.ReactiveSelectedObject(0);
|
||||
using var inventoryReactive = client.State.Details.ReactiveInventory(0);
|
||||
|
|
@ -224,8 +224,8 @@ public class DaemonRuntimeDocumentTests
|
|||
using var objectsViewportReactive = client.State.Viewports.ReactiveObjects(viewport);
|
||||
using var gravityViewportReactive = client.State.Viewports.ReactiveGravity(viewport);
|
||||
using var renderSplatsViewportReactive = client.State.Viewports.ReactiveRenderSplats(viewport);
|
||||
using var playerHudCatalog = client.State.ReactiveCatalog();
|
||||
using var playerHudSettings = client.State.Settings.ReactivePlayer();
|
||||
using var playerHudCatalog = client.State.Reactive<AetheriaRuntimeCatalogSnapshot>();
|
||||
using var playerHudSettings = client.State.Reactive<AetheriaRuntimePlayerSettingsDocument>();
|
||||
using var playerHudEntity = client.State.Current.ReactiveEntity();
|
||||
var gameSurface = client.State.LatestGameSurface();
|
||||
var gameTuiSurface = client.State.LatestGameTuiSurface();
|
||||
|
|
|
|||
|
|
@ -326,7 +326,7 @@ public class SchematicDisplay : MonoBehaviour
|
|||
|
||||
try
|
||||
{
|
||||
_catalog = ResolveClient().State.ReactiveCatalog();
|
||||
_catalog = ResolveClient().State.Reactive<AetheriaRuntimeCatalogSnapshot>();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -342,7 +342,7 @@ public class SchematicDisplay : MonoBehaviour
|
|||
{
|
||||
try
|
||||
{
|
||||
_playerSettings = ResolveClient().State.Settings.ReactivePlayer();
|
||||
_playerSettings = ResolveClient().State.Reactive<AetheriaRuntimePlayerSettingsDocument>();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -394,8 +394,7 @@ public class InputDisplayLayout : MonoBehaviour
|
|||
{
|
||||
_playerSettings = ResolveClient()
|
||||
.State
|
||||
.Settings
|
||||
.ReactivePlayer();
|
||||
.Reactive<AetheriaRuntimePlayerSettingsDocument>();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ public class MainMenu : MonoBehaviour
|
|||
{
|
||||
_sectorMap ??= ResolveClient(stateBoot)
|
||||
.State
|
||||
.ReactiveSectorMap();
|
||||
.Reactive<AetheriaRuntimeSectorMapDocument>();
|
||||
return _sectorMap?.Current;
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
|
@ -171,8 +171,7 @@ public class MainMenu : MonoBehaviour
|
|||
{
|
||||
_playerSettings ??= ResolveClient(stateBoot)
|
||||
.State
|
||||
.Settings
|
||||
.ReactivePlayer();
|
||||
.Reactive<AetheriaRuntimePlayerSettingsDocument>();
|
||||
return _playerSettings?.Current;
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
|
@ -191,8 +190,7 @@ public class MainMenu : MonoBehaviour
|
|||
{
|
||||
_verseHostSettings ??= ResolveClient(stateBoot)
|
||||
.State
|
||||
.Settings
|
||||
.ReactiveVerseHost();
|
||||
.Reactive<AetheriaRuntimeVerseHostSettingsDocument>();
|
||||
return _verseHostSettings?.Current;
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
|
|
|||
|
|
@ -986,7 +986,7 @@ public class InventoryMenu : MonoBehaviour
|
|||
{
|
||||
_stationRefit = ResolveClient()
|
||||
.State
|
||||
.ReactiveStationRefit();
|
||||
.Reactive<AetheriaRuntimeStationRefitDocument>();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -1078,7 +1078,7 @@ public class InventoryMenu : MonoBehaviour
|
|||
|
||||
try
|
||||
{
|
||||
_catalog = ResolveClient().State.ReactiveCatalog();
|
||||
_catalog = ResolveClient().State.Reactive<AetheriaRuntimeCatalogSnapshot>();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -1097,8 +1097,7 @@ public class InventoryMenu : MonoBehaviour
|
|||
{
|
||||
_playerSettings = ResolveClient()
|
||||
.State
|
||||
.Settings
|
||||
.ReactivePlayer();
|
||||
.Reactive<AetheriaRuntimePlayerSettingsDocument>();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1525,7 +1525,7 @@ private void Update()
|
|||
{
|
||||
_stationRefit = ResolveClient()
|
||||
.State
|
||||
.ReactiveStationRefit();
|
||||
.Reactive<AetheriaRuntimeStationRefitDocument>();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -1592,7 +1592,7 @@ private void Update()
|
|||
|
||||
try
|
||||
{
|
||||
_catalog = ResolveClient().State.ReactiveCatalog();
|
||||
_catalog = ResolveClient().State.Reactive<AetheriaRuntimeCatalogSnapshot>();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -1611,8 +1611,7 @@ private void Update()
|
|||
{
|
||||
_playerSettings = ResolveClient()
|
||||
.State
|
||||
.Settings
|
||||
.ReactivePlayer();
|
||||
.Reactive<AetheriaRuntimePlayerSettingsDocument>();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -320,8 +320,7 @@ public class MapRenderer : MonoBehaviour
|
|||
{
|
||||
_playerSettings ??= ResolveClient()
|
||||
.State
|
||||
.Settings
|
||||
.ReactivePlayer();
|
||||
.Reactive<AetheriaRuntimePlayerSettingsDocument>();
|
||||
return _playerSettings?.Current?.ShowAsteroidsInMinimap ?? false;
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
|
|
|||
|
|
@ -223,7 +223,7 @@ public class SectorMap : MonoBehaviour
|
|||
{
|
||||
_sectorMapDocument ??= ResolveClient()
|
||||
.State
|
||||
.ReactiveSectorMap();
|
||||
.Reactive<AetheriaRuntimeSectorMapDocument>();
|
||||
_sectorMap = _sectorMapDocument?.Current;
|
||||
|
||||
if (_sectorMapLoaded)
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ public class SectorRenderer : MonoBehaviour, IBeginDragHandler, IDragHandler, IS
|
|||
{
|
||||
_sectorMap ??= ResolveClient()
|
||||
.State
|
||||
.ReactiveSectorMap();
|
||||
.Reactive<AetheriaRuntimeSectorMapDocument>();
|
||||
var sectorMap = _sectorMap?.Current;
|
||||
return (sectorMap?.Zones ?? Array.Empty<AetheriaRuntimeSectorMapZone>())
|
||||
.FirstOrDefault(zone => zone.ZoneIndex == zoneIndex);
|
||||
|
|
@ -232,7 +232,7 @@ public class SectorRenderer : MonoBehaviour, IBeginDragHandler, IDragHandler, IS
|
|||
|
||||
try
|
||||
{
|
||||
_catalog = ResolveClient().State.ReactiveCatalog();
|
||||
_catalog = ResolveClient().State.Reactive<AetheriaRuntimeCatalogSnapshot>();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -251,8 +251,7 @@ public class SectorRenderer : MonoBehaviour, IBeginDragHandler, IDragHandler, IS
|
|||
{
|
||||
_playerSettings = ResolveClient()
|
||||
.State
|
||||
.Settings
|
||||
.ReactivePlayer();
|
||||
.Reactive<AetheriaRuntimePlayerSettingsDocument>();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -626,7 +626,7 @@ public class TradeMenu : MonoBehaviour
|
|||
|
||||
try
|
||||
{
|
||||
_catalog = ResolveClient().State.ReactiveCatalog();
|
||||
_catalog = ResolveClient().State.Reactive<AetheriaRuntimeCatalogSnapshot>();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -645,8 +645,7 @@ public class TradeMenu : MonoBehaviour
|
|||
{
|
||||
_playerSettings = ResolveClient()
|
||||
.State
|
||||
.Settings
|
||||
.ReactivePlayer();
|
||||
.Reactive<AetheriaRuntimePlayerSettingsDocument>();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -103,8 +103,7 @@ public class VolumeCloudRenderer : EffectBase
|
|||
{
|
||||
_playerSettings = ResolveClient()
|
||||
.State
|
||||
.Settings
|
||||
.ReactivePlayer();
|
||||
.Reactive<AetheriaRuntimePlayerSettingsDocument>();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1208,7 +1208,7 @@ public class ZoneRenderer : MonoBehaviour
|
|||
|
||||
try
|
||||
{
|
||||
_catalog = ResolveClient().State.ReactiveCatalog();
|
||||
_catalog = ResolveClient().State.Reactive<AetheriaRuntimeCatalogSnapshot>();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -1225,7 +1225,7 @@ public class ZoneRenderer : MonoBehaviour
|
|||
|
||||
try
|
||||
{
|
||||
_zoneContacts = ResolveClient().State.ReactiveZoneContacts();
|
||||
_zoneContacts = ResolveClient().State.Reactive<AetheriaRuntimeZoneContactsDocument>();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue