Remove Aetheria client state alias
This commit is contained in:
parent
a8f35a8f95
commit
a035a55fc3
22 changed files with 98 additions and 100 deletions
|
|
@ -95,7 +95,7 @@ public abstract class ActionBarBinding : IDisposable
|
|||
|
||||
try
|
||||
{
|
||||
_catalog ??= Client.Aetheria().ReactiveCatalog();
|
||||
_catalog ??= Client.State.ReactiveCatalog();
|
||||
return _catalog?.Current?.FindItem(item, x => x.ItemKey);
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ public sealed class AetheriaDaemonObserver : MonoBehaviour
|
|||
|
||||
private bool TryResolveReactiveObservedDaemonDocuments()
|
||||
{
|
||||
var state = ResolveClient()?.Aetheria();
|
||||
var state = ResolveClient()?.State;
|
||||
if (state == null)
|
||||
return false;
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ public sealed class AetheriaUnityGameplayBootShell
|
|||
}
|
||||
|
||||
var aetheria = AetheriaUnityRuntimeClientProvider.ResolveClient(stateBoot.StateFilePath, stateBoot.RuntimeId)
|
||||
.Aetheria();
|
||||
.State;
|
||||
using var runtimeCatalogDocument = aetheria.ReactiveCatalog();
|
||||
var runtimeCatalog = runtimeCatalogDocument.Current;
|
||||
if (runtimeCatalog == null)
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@ public sealed class AetheriaUnityObservedDockingIndex : IDisposable
|
|||
{
|
||||
try
|
||||
{
|
||||
var state = _resolveClient()?.Aetheria();
|
||||
var state = _ResolveClient()?.State;
|
||||
if (state == null)
|
||||
return false;
|
||||
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ public sealed class AetheriaUnityObservedTargetQuery : IDisposable
|
|||
try
|
||||
{
|
||||
_zoneContacts = _resolveClient()
|
||||
?.Aetheria()
|
||||
?.State
|
||||
.ReactiveZoneContacts();
|
||||
return _zoneContacts?.Current;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ public sealed class AetheriaUnityRenderSplatViewportSource : MonoBehaviour
|
|||
try
|
||||
{
|
||||
var nextRenderSplatsViewport = ResolveClient()
|
||||
.Aetheria()
|
||||
.State
|
||||
.Viewports
|
||||
.ReactiveRenderSplats(viewport);
|
||||
ClearViewportDocument();
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ public static class AetheriaUnityRuntimeClientProvider
|
|||
try
|
||||
{
|
||||
_playerSettingsDocument ??= ResolveClient(AetheriaUnityRuntimePaths.RuntimeStateFilePath)
|
||||
.Aetheria()
|
||||
.State
|
||||
.Settings
|
||||
.ReactivePlayer();
|
||||
|
||||
|
|
|
|||
|
|
@ -164,16 +164,16 @@ public class DaemonRuntimeDocumentTests
|
|||
.GetAwaiter()
|
||||
.GetResult();
|
||||
|
||||
var currentEntity = client.Aetheria().Current.LatestEntity();
|
||||
var latestFrame = client.Aetheria().LatestDaemonFrame();
|
||||
var catalog = client.Aetheria().LatestCatalog();
|
||||
var playerSettings = client.Aetheria().Settings.LatestPlayer();
|
||||
var verseHostSettings = client.Aetheria().Settings.LatestVerseHost();
|
||||
var currentEntityByType = client.Aetheria()
|
||||
var currentEntity = client.State.Current.LatestEntity();
|
||||
var latestFrame = client.State.LatestDaemonFrame();
|
||||
var catalog = client.State.LatestCatalog();
|
||||
var playerSettings = client.State.Settings.LatestPlayer();
|
||||
var verseHostSettings = client.State.Settings.LatestVerseHost();
|
||||
var currentEntityByType = client.State
|
||||
.LatestAsync<AetheriaRuntimeCurrentEntityDocument>()
|
||||
.GetAwaiter()
|
||||
.GetResult();
|
||||
var latestFrameByType = client.Aetheria()
|
||||
var latestFrameByType = client.State
|
||||
.LatestAsync<AetheriaRuntimeDaemonFrameDocument>()
|
||||
.GetAwaiter()
|
||||
.GetResult();
|
||||
|
|
@ -184,13 +184,13 @@ public class DaemonRuntimeDocumentTests
|
|||
MaxX = 100,
|
||||
MaxY = 100
|
||||
};
|
||||
var objectsViewport = client.Aetheria()
|
||||
var objectsViewport = client.State
|
||||
.Viewports
|
||||
.LatestObjects(viewport);
|
||||
var zoneDetails = client.Aetheria()
|
||||
var zoneDetails = client.State
|
||||
.Details
|
||||
.LatestZone(0);
|
||||
var inventory = client.Aetheria()
|
||||
var inventory = client.State
|
||||
.Details
|
||||
.LatestInventory(0);
|
||||
var currentEntityFromClientType = client.State
|
||||
|
|
@ -317,9 +317,9 @@ public class DaemonRuntimeDocumentTests
|
|||
.GetAwaiter()
|
||||
.GetResult();
|
||||
|
||||
var player = client.Aetheria().Settings.LatestPlayer();
|
||||
var verseHost = client.Aetheria().Settings.LatestVerseHost();
|
||||
var catalog = client.Aetheria().LatestCatalog();
|
||||
var player = client.State.Settings.LatestPlayer();
|
||||
var verseHost = client.State.Settings.LatestVerseHost();
|
||||
var catalog = client.State.LatestCatalog();
|
||||
|
||||
Assert.AreEqual(AetheriaRuntimeCatalogSnapshot.SchemaId, client.State.Catalog.Sources.Last().SchemaId);
|
||||
Assert.IsNotNull(catalog);
|
||||
|
|
|
|||
|
|
@ -79,13 +79,13 @@ public class StarbridgePlayerSeatDocumentTests
|
|||
var handle = client.Document<AetheriaRuntimeStarbridgePlayerSeatDocument>(
|
||||
AetheriaRuntimeVerseRecordKeys.StarbridgePlayerSeat(seat.SeatId));
|
||||
var aetheriaStarbridge = client
|
||||
.Aetheria()
|
||||
.State
|
||||
.Starbridge;
|
||||
using var reactive = handle.Reactive();
|
||||
using var aetheriaReactive = aetheriaStarbridge.ReactivePlayerSeat(seat.SeatId);
|
||||
|
||||
Assert.AreEqual("seat-support", handle.Latest().SeatId);
|
||||
Assert.AreEqual("seat-support", client.Aetheria().Starbridge.LatestPlayerSeat(seat.SeatId).SeatId);
|
||||
Assert.AreEqual("seat-support", client.State.Starbridge.LatestPlayerSeat(seat.SeatId).SeatId);
|
||||
Assert.AreEqual("item:cockpit:support", reactive.Current.CockpitItemKey);
|
||||
Assert.AreEqual("item:cockpit:support", aetheriaReactive.Current.CockpitItemKey);
|
||||
Assert.AreEqual("entity:pod:support", reactive.Current.EscapePodEntityKey);
|
||||
|
|
|
|||
|
|
@ -326,7 +326,7 @@ public class SchematicDisplay : MonoBehaviour
|
|||
|
||||
try
|
||||
{
|
||||
_catalog = ResolveClient().Aetheria().ReactiveCatalog();
|
||||
_catalog = ResolveClient().State.ReactiveCatalog();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -344,7 +344,7 @@ public class SchematicDisplay : MonoBehaviour
|
|||
try
|
||||
{
|
||||
_playerSettings = ResolveClient()
|
||||
.Aetheria()
|
||||
.State
|
||||
.Settings
|
||||
.ReactivePlayer();
|
||||
}
|
||||
|
|
@ -363,7 +363,7 @@ public class SchematicDisplay : MonoBehaviour
|
|||
try
|
||||
{
|
||||
_currentEntity = ResolveClient()
|
||||
.Aetheria()
|
||||
.State
|
||||
.Current
|
||||
.ReactiveEntity();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -393,7 +393,7 @@ public class InputDisplayLayout : MonoBehaviour
|
|||
try
|
||||
{
|
||||
_playerSettings = ResolveClient()
|
||||
.Aetheria()
|
||||
.State
|
||||
.Settings
|
||||
.ReactivePlayer();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ public class MainMenu : MonoBehaviour
|
|||
try
|
||||
{
|
||||
_sectorMap ??= ResolveClient(stateBoot)
|
||||
.Aetheria()
|
||||
.State
|
||||
.ReactiveSectorMap();
|
||||
return _sectorMap?.Current;
|
||||
}
|
||||
|
|
@ -170,7 +170,7 @@ public class MainMenu : MonoBehaviour
|
|||
try
|
||||
{
|
||||
_playerSettings ??= ResolveClient(stateBoot)
|
||||
.Aetheria()
|
||||
.State
|
||||
.Settings
|
||||
.ReactivePlayer();
|
||||
return _playerSettings?.Current;
|
||||
|
|
@ -190,7 +190,7 @@ public class MainMenu : MonoBehaviour
|
|||
try
|
||||
{
|
||||
_verseHostSettings ??= ResolveClient(stateBoot)
|
||||
.Aetheria()
|
||||
.State
|
||||
.Settings
|
||||
.ReactiveVerseHost();
|
||||
return _verseHostSettings?.Current;
|
||||
|
|
|
|||
|
|
@ -958,7 +958,7 @@ public class InventoryMenu : MonoBehaviour
|
|||
try
|
||||
{
|
||||
_currentEntity = ResolveClient()
|
||||
.Aetheria()
|
||||
.State
|
||||
.Current
|
||||
.ReactiveEntity();
|
||||
}
|
||||
|
|
@ -978,7 +978,7 @@ public class InventoryMenu : MonoBehaviour
|
|||
try
|
||||
{
|
||||
_stationRefit = ResolveClient()
|
||||
.Aetheria()
|
||||
.State
|
||||
.ReactiveStationRefit();
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
|
@ -997,7 +997,7 @@ public class InventoryMenu : MonoBehaviour
|
|||
try
|
||||
{
|
||||
var nextInventory = ResolveClient()
|
||||
.Aetheria()
|
||||
.State
|
||||
.Details
|
||||
.ReactiveInventory(entityIndex);
|
||||
_inventory?.Dispose();
|
||||
|
|
@ -1071,7 +1071,7 @@ public class InventoryMenu : MonoBehaviour
|
|||
|
||||
try
|
||||
{
|
||||
_catalog = ResolveClient().Aetheria().ReactiveCatalog();
|
||||
_catalog = ResolveClient().State.ReactiveCatalog();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -1089,7 +1089,7 @@ public class InventoryMenu : MonoBehaviour
|
|||
try
|
||||
{
|
||||
_playerSettings = ResolveClient()
|
||||
.Aetheria()
|
||||
.State
|
||||
.Settings
|
||||
.ReactivePlayer();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1496,7 +1496,7 @@ private void Update()
|
|||
try
|
||||
{
|
||||
_currentEntity = ResolveClient()
|
||||
.Aetheria()
|
||||
.State
|
||||
.Current
|
||||
.ReactiveEntity();
|
||||
}
|
||||
|
|
@ -1516,7 +1516,7 @@ private void Update()
|
|||
try
|
||||
{
|
||||
_stationRefit = ResolveClient()
|
||||
.Aetheria()
|
||||
.State
|
||||
.ReactiveStationRefit();
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
|
@ -1543,7 +1543,7 @@ private void Update()
|
|||
try
|
||||
{
|
||||
_loadoutFrame = ResolveClient()
|
||||
.Aetheria()
|
||||
.State
|
||||
.ReactiveDaemonFrame();
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
|
@ -1562,7 +1562,7 @@ private void Update()
|
|||
try
|
||||
{
|
||||
var nextInventory = ResolveClient()
|
||||
.Aetheria()
|
||||
.State
|
||||
.Details
|
||||
.ReactiveInventory(entityIndex);
|
||||
_inventory?.Dispose();
|
||||
|
|
@ -1584,7 +1584,7 @@ private void Update()
|
|||
|
||||
try
|
||||
{
|
||||
_catalog = ResolveClient().Aetheria().ReactiveCatalog();
|
||||
_catalog = ResolveClient().State.ReactiveCatalog();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -1602,7 +1602,7 @@ private void Update()
|
|||
try
|
||||
{
|
||||
_playerSettings = ResolveClient()
|
||||
.Aetheria()
|
||||
.State
|
||||
.Settings
|
||||
.ReactivePlayer();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -130,11 +130,11 @@ public class MapRenderer : MonoBehaviour
|
|||
var viewport = ResolveViewportBounds();
|
||||
ClearViewportCaches();
|
||||
_objectsViewport = client
|
||||
.Aetheria()
|
||||
.State
|
||||
.Viewports
|
||||
.ReactiveObjects(viewport);
|
||||
_renderSplatsViewport = client
|
||||
.Aetheria()
|
||||
.State
|
||||
.Viewports
|
||||
.ReactiveRenderSplats(viewport);
|
||||
|
||||
|
|
@ -319,7 +319,7 @@ public class MapRenderer : MonoBehaviour
|
|||
try
|
||||
{
|
||||
_playerSettings ??= ResolveClient()
|
||||
.Aetheria()
|
||||
.State
|
||||
.Settings
|
||||
.ReactivePlayer();
|
||||
return _playerSettings?.Current?.ShowAsteroidsInMinimap ?? false;
|
||||
|
|
|
|||
|
|
@ -222,7 +222,7 @@ public class SectorMap : MonoBehaviour
|
|||
private void EnsureSectorMapLoaded()
|
||||
{
|
||||
_sectorMapDocument ??= ResolveClient()
|
||||
.Aetheria()
|
||||
.State
|
||||
.ReactiveSectorMap();
|
||||
_sectorMap = _sectorMapDocument.Current;
|
||||
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@ public class SectorRenderer : MonoBehaviour, IBeginDragHandler, IDragHandler, IS
|
|||
try
|
||||
{
|
||||
_sectorMap ??= ResolveClient()
|
||||
.Aetheria()
|
||||
.State
|
||||
.ReactiveSectorMap();
|
||||
var sectorMap = _sectorMap.Current;
|
||||
return (sectorMap?.Zones ?? Array.Empty<AetheriaRuntimeSectorMapZone>())
|
||||
|
|
@ -204,7 +204,7 @@ public class SectorRenderer : MonoBehaviour, IBeginDragHandler, IDragHandler, IS
|
|||
try
|
||||
{
|
||||
var nextZoneDetails = ResolveClient()
|
||||
.Aetheria()
|
||||
.State
|
||||
.Details
|
||||
.ReactiveZone(zoneIndex);
|
||||
_zoneDetails?.Dispose();
|
||||
|
|
@ -232,7 +232,7 @@ public class SectorRenderer : MonoBehaviour, IBeginDragHandler, IDragHandler, IS
|
|||
|
||||
try
|
||||
{
|
||||
_catalog = ResolveClient().Aetheria().ReactiveCatalog();
|
||||
_catalog = ResolveClient().State.ReactiveCatalog();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -250,7 +250,7 @@ public class SectorRenderer : MonoBehaviour, IBeginDragHandler, IDragHandler, IS
|
|||
try
|
||||
{
|
||||
_playerSettings = ResolveClient()
|
||||
.Aetheria()
|
||||
.State
|
||||
.Settings
|
||||
.ReactivePlayer();
|
||||
}
|
||||
|
|
@ -323,7 +323,7 @@ public class SectorRenderer : MonoBehaviour, IBeginDragHandler, IDragHandler, IS
|
|||
try
|
||||
{
|
||||
_currentZone ??= ResolveClient()
|
||||
.Aetheria()
|
||||
.State
|
||||
.Current
|
||||
.ReactiveZone();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -634,7 +634,7 @@ public class TradeMenu : MonoBehaviour
|
|||
|
||||
try
|
||||
{
|
||||
_catalog = ResolveClient().Aetheria().ReactiveCatalog();
|
||||
_catalog = ResolveClient().State.ReactiveCatalog();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -652,7 +652,7 @@ public class TradeMenu : MonoBehaviour
|
|||
try
|
||||
{
|
||||
_playerSettings = ResolveClient()
|
||||
.Aetheria()
|
||||
.State
|
||||
.Settings
|
||||
.ReactivePlayer();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ public class VolumeCloudRenderer : EffectBase
|
|||
try
|
||||
{
|
||||
_playerSettings = ResolveClient()
|
||||
.Aetheria()
|
||||
.State
|
||||
.Settings
|
||||
.ReactivePlayer();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1208,7 +1208,7 @@ public class ZoneRenderer : MonoBehaviour
|
|||
|
||||
try
|
||||
{
|
||||
_catalog = ResolveClient().Aetheria().ReactiveCatalog();
|
||||
_catalog = ResolveClient().State.ReactiveCatalog();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -1225,7 +1225,7 @@ public class ZoneRenderer : MonoBehaviour
|
|||
|
||||
try
|
||||
{
|
||||
_zoneContacts = ResolveClient().Aetheria().ReactiveZoneContacts();
|
||||
_zoneContacts = ResolveClient().State.ReactiveZoneContacts();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -1244,7 +1244,7 @@ public class ZoneRenderer : MonoBehaviour
|
|||
try
|
||||
{
|
||||
var nextObjectsViewport = ResolveClient()
|
||||
.Aetheria()
|
||||
.State
|
||||
.Viewports
|
||||
.ReactiveObjects(viewportBounds);
|
||||
_objectsViewport?.Dispose();
|
||||
|
|
|
|||
Loading…
Reference in a new issue