Use generic fixed document reads
This commit is contained in:
parent
3048b52058
commit
19c354ed9b
5 changed files with 74 additions and 250 deletions
|
|
@ -5732,7 +5732,7 @@ static void RequireTradeCargoSelectorUseEveSurface(string root)
|
|||
"SetObservedEntityIndex(AetheriaUnityObservedEntityIndex observedEntityIndex)",
|
||||
"AetheriaRuntimeCurrentDockingDocument",
|
||||
"ResolveClient().State.Latest<AetheriaRuntimeCurrentDockingDocument>()",
|
||||
"ResolveClient().State.LatestStationRefit()",
|
||||
"ResolveClient().State.Latest<AetheriaRuntimeStationRefitDocument>()",
|
||||
"SetTargetCargo(",
|
||||
"selection.EntityKey",
|
||||
"OwnedQuantity",
|
||||
|
|
@ -7227,7 +7227,7 @@ static bool HasManagedDockingSnapshotAccess(string source)
|
|||
source.Contains("var state = _resolveClient()?.State;", StringComparison.Ordinal) &&
|
||||
source.Contains("state.Latest<AetheriaRuntimeCurrentEntityDocument>()", StringComparison.Ordinal) &&
|
||||
source.Contains("state.Latest<AetheriaRuntimeCurrentDockingDocument>()", StringComparison.Ordinal) &&
|
||||
source.Contains("state.LatestStationRefit()", StringComparison.Ordinal) &&
|
||||
source.Contains("state.Latest<AetheriaRuntimeStationRefitDocument>()", StringComparison.Ordinal) &&
|
||||
!source.Contains("State?.CurrentDocking()", StringComparison.Ordinal) &&
|
||||
!source.Contains(".State.CurrentDocking()", StringComparison.Ordinal) &&
|
||||
!source.Contains("ResolveClient().State.CurrentDocking()", StringComparison.Ordinal) &&
|
||||
|
|
@ -7251,7 +7251,7 @@ static bool HasManagedDockingSnapshotAccess(string source)
|
|||
source.Contains("var state = _resolveClient()?.State;", StringComparison.Ordinal) &&
|
||||
source.Contains("state.Latest<AetheriaRuntimeCurrentEntityDocument>()", StringComparison.Ordinal) &&
|
||||
source.Contains("state.Latest<AetheriaRuntimeCurrentDockingDocument>()", StringComparison.Ordinal) &&
|
||||
source.Contains("state.LatestStationRefit()", StringComparison.Ordinal) &&
|
||||
source.Contains("state.Latest<AetheriaRuntimeStationRefitDocument>()", StringComparison.Ordinal) &&
|
||||
!source.Contains("State?.CurrentDocking()", StringComparison.Ordinal) &&
|
||||
!source.Contains(".State.CurrentDocking()", StringComparison.Ordinal) &&
|
||||
!source.Contains("CultMeshReactiveDocument<AetheriaRuntimeCurrentEntityDocument> _currentEntity", StringComparison.Ordinal) &&
|
||||
|
|
@ -7278,11 +7278,8 @@ static void RequireUnitySharedDocumentAccessorErgonomics(string root)
|
|||
"public CultMeshDocumentHandle<TDocument> Document<TDocument>()",
|
||||
"public Task<CultMeshReactiveDocument<TDocument>> ReactiveAsync<TDocument>(",
|
||||
"public CultMeshReactiveDocument<TDocument> Reactive<TDocument>(",
|
||||
"public AetheriaRuntimeCatalogSnapshot LatestCatalog()",
|
||||
"public Task<AetheriaRuntimePlayerSettingsDocument> LatestPlayerAsync()",
|
||||
"public AetheriaRuntimePlayerSettingsDocument LatestPlayer()",
|
||||
"public Task<AetheriaRuntimeVerseHostSettingsDocument> LatestVerseHostAsync()",
|
||||
"public AetheriaRuntimeVerseHostSettingsDocument LatestVerseHost()",
|
||||
"public Task<TDocument> LatestAsync<TDocument>()",
|
||||
"public TDocument Latest<TDocument>()",
|
||||
"public Task<TDocument> LatestAsync<TDocument>()",
|
||||
"public TDocument Latest<TDocument>()",
|
||||
"public Task<CultMeshReactiveDocument<TDocument>> ReactiveAsync<TDocument>(",
|
||||
|
|
@ -7902,8 +7899,8 @@ static void RequireUnityViewportAndMapReadsUseManagedAccessors(string root)
|
|||
var clientState = File.ReadAllText(clientStatePath);
|
||||
var requiredClientSymbols = new[]
|
||||
{
|
||||
"public AetheriaRuntimeSectorMapDocument LatestSectorMap()",
|
||||
"public AetheriaRuntimeZoneContactsDocument LatestZoneContacts()",
|
||||
"public CultMeshDocumentHandle<TDocument> Document<TDocument>()",
|
||||
"public TDocument Latest<TDocument>()",
|
||||
"public TDocument Latest<TDocument>()",
|
||||
"public CultMeshReactiveDocument<TDocument> Reactive<TDocument>(",
|
||||
"public CultMeshDocumentHandle<TDocument> Document<TDocument>(AetheriaRuntimeRtsViewportBounds viewport)",
|
||||
|
|
@ -8109,23 +8106,14 @@ static void RequireAetheriaManagedStateAccessorsCoverDomainDocuments(string root
|
|||
StringSplitOptions.None)[0];
|
||||
var requiredClientSymbols = new[]
|
||||
{
|
||||
"public AetheriaRuntimeDaemonFrameDocument LatestDaemonFrame()",
|
||||
"public AetheriaRuntimeDaemonSoaViewDocument LatestDaemonSoaView()",
|
||||
"public Task<TDocument> LatestAsync<TDocument>()",
|
||||
"public TDocument Latest<TDocument>()",
|
||||
"public CultMeshReactiveDocument<TDocument> Reactive<TDocument>(",
|
||||
"public AetheriaRuntimeObservedDaemonState? LatestObservedDaemon()",
|
||||
"public AetheriaRuntimeObservedDockingState? CurrentDocking(",
|
||||
"public CultMeshReactiveDocument<TDocument> Reactive<TDocument>(",
|
||||
"public CultMeshReactiveDocument<TDocument> Reactive<TDocument>(",
|
||||
"public CultMeshReactiveDocument<TDocument> Reactive<TDocument>(",
|
||||
"public AetheriaRuntimeLoadoutTemplatesDocument LatestLoadoutTemplates()",
|
||||
"public AetheriaRuntimeStationRefitDocument LatestStationRefit()",
|
||||
"public AetheriaRuntimeZoneRenderDocument LatestZoneRender()",
|
||||
"public AetheriaRuntimeDaemonProviderAdvertisementDocument LatestProviderAdvertisement()",
|
||||
"public AetheriaRuntimeDaemonHealthDocument LatestHealth()",
|
||||
"public AetheriaRuntimeDaemonCommandBoundaryDocument LatestCommandBoundary()",
|
||||
"public AetheriaRuntimeVerseAuthorityPolicyDocument LatestAuthorityPolicy()",
|
||||
"public AetheriaRuntimeDaemonFrameDocument LatestFrameDocument()",
|
||||
"public AetheriaRuntimeDaemonSoaViewDocument LatestSoaViewDocument()",
|
||||
"public global::Aetheria.State.Documents.EveSurfaceState LatestGameSurface()",
|
||||
"public global::Aetheria.State.Documents.EveSurfaceState LatestGameTuiSurface()",
|
||||
"public global::Aetheria.State.Documents.EveSurfaceState LatestEditorSurface()",
|
||||
|
|
@ -8157,26 +8145,58 @@ static void RequireAetheriaManagedStateAccessorsCoverDomainDocuments(string root
|
|||
|
||||
var forbiddenFixedReactiveWrappers = new[]
|
||||
{
|
||||
"LatestCatalog(",
|
||||
"LatestCatalogAsync(",
|
||||
"ReactiveCatalog(",
|
||||
"ReactiveCatalogAsync(",
|
||||
"LatestLoadoutTemplates(",
|
||||
"LatestLoadoutTemplatesAsync(",
|
||||
"ReactiveLoadoutTemplates(",
|
||||
"ReactiveLoadoutTemplatesAsync(",
|
||||
"LatestSectorMap(",
|
||||
"LatestSectorMapAsync(",
|
||||
"ReactiveSectorMap(",
|
||||
"ReactiveSectorMapAsync(",
|
||||
"LatestZoneContacts(",
|
||||
"LatestZoneContactsAsync(",
|
||||
"ReactiveZoneContacts(",
|
||||
"ReactiveZoneContactsAsync(",
|
||||
"LatestStationRefit(",
|
||||
"LatestStationRefitAsync(",
|
||||
"ReactiveStationRefit(",
|
||||
"ReactiveStationRefitAsync(",
|
||||
"LatestDaemonFrame(",
|
||||
"LatestDaemonFrameAsync(",
|
||||
"ReactiveDaemonFrame(",
|
||||
"ReactiveDaemonFrameAsync(",
|
||||
"LatestDaemonSoaView(",
|
||||
"LatestDaemonSoaViewAsync(",
|
||||
"ReactiveDaemonSoaView(",
|
||||
"ReactiveDaemonSoaViewAsync(",
|
||||
"LatestZoneRender(",
|
||||
"LatestZoneRenderAsync(",
|
||||
"ReactiveZoneRender(",
|
||||
"ReactiveZoneRenderAsync(",
|
||||
"LatestPlayer(",
|
||||
"LatestPlayerAsync(",
|
||||
"ReactivePlayer(",
|
||||
"ReactivePlayerAsync(",
|
||||
"LatestVerseHost(",
|
||||
"LatestVerseHostAsync(",
|
||||
"ReactiveVerseHost(",
|
||||
"ReactiveVerseHostAsync(",
|
||||
"LatestProviderAdvertisement(",
|
||||
"LatestProviderAdvertisementAsync(",
|
||||
"LatestHealth(",
|
||||
"LatestHealthAsync(",
|
||||
"LatestCommandBoundary(",
|
||||
"LatestCommandBoundaryAsync(",
|
||||
"LatestAuthorityPolicy(",
|
||||
"LatestAuthorityPolicyAsync(",
|
||||
"LatestFrameDocument(",
|
||||
"LatestFrameDocumentAsync(",
|
||||
"LatestSoaViewDocument(",
|
||||
"LatestSoaViewDocumentAsync(",
|
||||
"LatestScenario(",
|
||||
"LatestScenarioAsync(",
|
||||
"ReactiveScenario(",
|
||||
|
|
@ -8332,7 +8352,7 @@ static void RequireAetheriaManagedStateAccessorsCoverDomainDocuments(string root
|
|||
"Observed daemon state must not hide typed document access behind aggregate reactive compatibility wrappers.");
|
||||
}
|
||||
|
||||
if (observedDaemonState.Contains("state.LatestDaemonFrameAsync()", StringComparison.Ordinal) ||
|
||||
if (observedDaemonState.Contains("state.LatestAsync<AetheriaRuntimeDaemonFrameDocument>()", StringComparison.Ordinal) ||
|
||||
observedDaemonState.Contains("state.LatestDaemonSoaViewAsync()", StringComparison.Ordinal) ||
|
||||
observedDaemonState.Contains("state.ReactiveObservedDaemonAsync()", StringComparison.Ordinal) ||
|
||||
observedDaemonState.Contains("TryReadLatestSoaViewAsync", StringComparison.Ordinal))
|
||||
|
|
@ -8366,12 +8386,10 @@ static void RequireAetheriaManagedStateAccessorsCoverDomainDocuments(string root
|
|||
".State.Daemon.GameTuiSurface.LatestAsync()",
|
||||
".State.Daemon.EditorSurface.LatestAsync()",
|
||||
".State.Daemon.EditorTuiSurface.LatestAsync()",
|
||||
"client.State.Daemon.LatestFrameDocument()",
|
||||
"client.State.Daemon.LatestGameSurface()",
|
||||
"client.State.Daemon.LatestGameTuiSurface()",
|
||||
"client.State.Daemon.LatestEditorSurface()",
|
||||
"client.State.Daemon.LatestEditorTuiSurface()",
|
||||
"client.State.Daemon.LatestAuthorityPolicy()",
|
||||
"client.State.ObserveCatalog()",
|
||||
"client.State.ObserveDaemonFrame()",
|
||||
"client.State.ObserveLoadoutTemplates()",
|
||||
|
|
@ -11671,10 +11689,10 @@ static void RequireAetheriaRuntimeVerseClientContract(string root)
|
|||
"public Func<string, string> CreateEveSurfaceStateRefResolver()",
|
||||
"public CultMeshStateRefResolver CreateEveSurfaceCultMeshStateRefResolver()",
|
||||
"public async Task<CultMeshStateRefResolver> CreateEveSurfaceCultMeshStateRefResolverAsync()",
|
||||
"LatestDaemonFrameAsync()",
|
||||
"LatestHealthAsync()",
|
||||
"LatestCommandBoundaryAsync()",
|
||||
"LatestCatalog",
|
||||
"LatestAsync<AetheriaRuntimeDaemonFrameDocument>()",
|
||||
"LatestAsync<AetheriaRuntimeDaemonHealthDocument>()",
|
||||
"LatestAsync<AetheriaRuntimeDaemonCommandBoundaryDocument>()",
|
||||
"() => Latest<AetheriaRuntimeCatalogSnapshot>()",
|
||||
"AetheriaRuntimeStateRefResolver.CreateEveSurfaceCultMeshStateRefResolver("
|
||||
};
|
||||
var missingClientStateSymbols = requiredClientStateSymbols
|
||||
|
|
@ -11689,7 +11707,8 @@ static void RequireAetheriaRuntimeVerseClientContract(string root)
|
|||
|
||||
if (clientState.Contains("var frameTask = Daemon.LatestFrameDocumentAsync()", StringComparison.Ordinal) ||
|
||||
clientState.Contains("var healthTask = Daemon.LatestHealthAsync()", StringComparison.Ordinal) ||
|
||||
clientState.Contains("var commandBoundaryTask = Daemon.LatestCommandBoundaryAsync()", StringComparison.Ordinal))
|
||||
clientState.Contains("var commandBoundaryTask = Daemon.LatestCommandBoundaryAsync()", StringComparison.Ordinal) ||
|
||||
clientState.Contains("LatestCatalog)", StringComparison.Ordinal))
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"AetheriaClientState Eve state-ref resolver must use top-level managed accessors instead of walking through the nested daemon state.");
|
||||
|
|
@ -12938,7 +12957,7 @@ static void RequireMainMenuContinueRunState(string root)
|
|||
"var state = _resolveClient()?.State;",
|
||||
"state.Latest<AetheriaRuntimeCurrentEntityDocument>()",
|
||||
"state.Latest<AetheriaRuntimeCurrentDockingDocument>()",
|
||||
"state.LatestStationRefit()",
|
||||
"state.Latest<AetheriaRuntimeStationRefitDocument>()",
|
||||
"public bool IsEntityUndocked(Entity entity)",
|
||||
"public bool TryResolveDockingBay(",
|
||||
"out AetheriaRuntimeCurrentDockingDocument docking",
|
||||
|
|
@ -15709,7 +15728,7 @@ static void RequireRuntimeStateReaderOwnsUnityStateAcquisition(string root)
|
|||
!observedDaemonState.Contains("CultMeshReactiveDocument<AetheriaRuntimeZoneRenderDocument> zoneRender", StringComparison.Ordinal) ||
|
||||
!observedDaemonState.Contains("var currentZoneRender = zoneRender?.Current;", StringComparison.Ordinal) ||
|
||||
!observedDaemonState.Contains("new AetheriaRuntimeObservedDaemonState(currentFrame, currentSoaView, currentZoneRender)", StringComparison.Ordinal) ||
|
||||
!aetheriaClientState.Contains("var zoneRender = await LatestZoneRenderAsync().ConfigureAwait(false);", StringComparison.Ordinal) ||
|
||||
!aetheriaClientState.Contains("var zoneRender = await LatestAsync<AetheriaRuntimeZoneRenderDocument>().ConfigureAwait(false);", StringComparison.Ordinal) ||
|
||||
!aetheriaClientState.Contains("return new AetheriaRuntimeObservedDaemonState(frame, soaView, zoneRender);", StringComparison.Ordinal))
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
|
|
|
|||
|
|
@ -173,7 +173,7 @@ public sealed class AetheriaUnityObservedDockingIndex : IDisposable
|
|||
|
||||
var currentEntity = state.Latest<AetheriaRuntimeCurrentEntityDocument>();
|
||||
var currentDocking = state.Latest<AetheriaRuntimeCurrentDockingDocument>();
|
||||
var stationRefit = state.LatestStationRefit();
|
||||
var stationRefit = state.Latest<AetheriaRuntimeStationRefitDocument>();
|
||||
if (currentDocking == null || stationRefit == null)
|
||||
return false;
|
||||
|
||||
|
|
|
|||
|
|
@ -165,10 +165,10 @@ public class DaemonRuntimeDocumentTests
|
|||
.GetResult();
|
||||
|
||||
var currentEntity = client.State.Latest<AetheriaRuntimeCurrentEntityDocument>();
|
||||
var latestFrame = client.State.LatestDaemonFrame();
|
||||
var catalog = client.State.LatestCatalog();
|
||||
var playerSettings = client.State.Settings.LatestPlayer();
|
||||
var verseHostSettings = client.State.Settings.LatestVerseHost();
|
||||
var latestFrame = client.State.Latest<AetheriaRuntimeDaemonFrameDocument>();
|
||||
var catalog = client.State.Latest<AetheriaRuntimeCatalogSnapshot>();
|
||||
var playerSettings = client.State.Latest<AetheriaRuntimePlayerSettingsDocument>();
|
||||
var verseHostSettings = client.State.Latest<AetheriaRuntimeVerseHostSettingsDocument>();
|
||||
var currentEntityByType = client.State
|
||||
.LatestAsync<AetheriaRuntimeCurrentEntityDocument>()
|
||||
.GetAwaiter()
|
||||
|
|
@ -204,7 +204,7 @@ public class DaemonRuntimeDocumentTests
|
|||
using var zoneRenderReactive = client.State
|
||||
.Reactive<AetheriaRuntimeZoneRenderDocument>();
|
||||
var observed = client.State.LatestObservedDaemon();
|
||||
var observedAuthoritativeFrame = client.State.LatestDaemonFrame();
|
||||
var observedAuthoritativeFrame = client.State.Latest<AetheriaRuntimeDaemonFrameDocument>();
|
||||
using var catalogReactive = client.State.Reactive<AetheriaRuntimeCatalogSnapshot>();
|
||||
using var daemonFrameReactive = client.State.Reactive<AetheriaRuntimeDaemonFrameDocument>();
|
||||
using var daemonSoaViewReactive = client.State.Reactive<AetheriaRuntimeDaemonSoaViewDocument>();
|
||||
|
|
@ -231,12 +231,12 @@ public class DaemonRuntimeDocumentTests
|
|||
var gameTuiSurface = client.State.LatestGameTuiSurface();
|
||||
var editorSurface = client.State.LatestEditorSurface();
|
||||
var editorTuiSurface = client.State.LatestEditorTuiSurface();
|
||||
var authorityStatus = client.State.LatestAuthorityPolicy();
|
||||
var authorityStatus = client.State.Latest<AetheriaRuntimeVerseAuthorityPolicyDocument>();
|
||||
var currentDocking = client.State.Current.Docking
|
||||
.LatestAsync()
|
||||
.GetAwaiter()
|
||||
.GetResult();
|
||||
var stationRefit = client.State.LatestStationRefit();
|
||||
var stationRefit = client.State.Latest<AetheriaRuntimeStationRefitDocument>();
|
||||
var observedDocking = client.State.CurrentDocking();
|
||||
using var reactiveGameSurface = client.State.ReactiveGameSurface();
|
||||
using var reactiveGameTuiSurface = client.State.ReactiveGameTuiSurface();
|
||||
|
|
@ -255,9 +255,9 @@ public class DaemonRuntimeDocumentTests
|
|||
client.State.DocumentBySchema(AetheriaRuntimeDaemonSchemas.StarbridgeSessionSummary));
|
||||
Assert.AreSame(client.State.LatestFrame, client.State.Document<AetheriaRuntimeDaemonFrameDocument>());
|
||||
Assert.AreSame(client.State.LatestSoaView, client.State.Document<AetheriaRuntimeDaemonSoaViewDocument>());
|
||||
Assert.IsNotNull(client.State.LatestProviderAdvertisement());
|
||||
Assert.IsNotNull(client.State.LatestHealth());
|
||||
Assert.IsNotNull(client.State.LatestCommandBoundary());
|
||||
Assert.IsNotNull(client.State.Latest<AetheriaRuntimeDaemonProviderAdvertisementDocument>());
|
||||
Assert.IsNotNull(client.State.Latest<AetheriaRuntimeDaemonHealthDocument>());
|
||||
Assert.IsNotNull(client.State.Latest<AetheriaRuntimeDaemonCommandBoundaryDocument>());
|
||||
Assert.AreSame(
|
||||
client.State.Document<AetheriaRuntimeVerseAuthorityPolicyDocument>(),
|
||||
client.State.DocumentBySchema(AetheriaRuntimeVerseAuthoritySchemas.Policy));
|
||||
|
|
@ -367,9 +367,9 @@ public class DaemonRuntimeDocumentTests
|
|||
.GetAwaiter()
|
||||
.GetResult();
|
||||
|
||||
var player = client.State.Settings.LatestPlayer();
|
||||
var verseHost = client.State.Settings.LatestVerseHost();
|
||||
var catalog = client.State.LatestCatalog();
|
||||
var player = client.State.Latest<AetheriaRuntimePlayerSettingsDocument>();
|
||||
var verseHost = client.State.Latest<AetheriaRuntimeVerseHostSettingsDocument>();
|
||||
var catalog = client.State.Latest<AetheriaRuntimeCatalogSnapshot>();
|
||||
|
||||
Assert.AreEqual(AetheriaRuntimeCatalogSnapshot.SchemaId, client.State.Catalog.Sources.Last().SchemaId);
|
||||
Assert.IsNotNull(catalog);
|
||||
|
|
|
|||
|
|
@ -523,7 +523,7 @@ public class TradeMenu : MonoBehaviour
|
|||
{
|
||||
try
|
||||
{
|
||||
return ResolveClient().State.LatestStationRefit();
|
||||
return ResolveClient().State.Latest<AetheriaRuntimeStationRefitDocument>();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -182,36 +182,11 @@ namespace GameCult.Aetheria.State.Verse
|
|||
return Document<TDocument>().LatestAsync().ConfigureAwait(false).GetAwaiter().GetResult();
|
||||
}
|
||||
|
||||
public AetheriaRuntimeCatalogSnapshot LatestCatalog()
|
||||
{
|
||||
return Latest<AetheriaRuntimeCatalogSnapshot>();
|
||||
}
|
||||
|
||||
public Task<AetheriaRuntimeDaemonFrameDocument> LatestDaemonFrameAsync()
|
||||
{
|
||||
return LatestFrame.LatestAsync();
|
||||
}
|
||||
|
||||
public AetheriaRuntimeDaemonFrameDocument LatestDaemonFrame()
|
||||
{
|
||||
return LatestDaemonFrameAsync().ConfigureAwait(false).GetAwaiter().GetResult();
|
||||
}
|
||||
|
||||
public Task<AetheriaRuntimeDaemonSoaViewDocument> LatestDaemonSoaViewAsync()
|
||||
{
|
||||
return LatestSoaView.LatestAsync();
|
||||
}
|
||||
|
||||
public AetheriaRuntimeDaemonSoaViewDocument LatestDaemonSoaView()
|
||||
{
|
||||
return LatestDaemonSoaViewAsync().ConfigureAwait(false).GetAwaiter().GetResult();
|
||||
}
|
||||
|
||||
public async Task<AetheriaRuntimeObservedDaemonState?> LatestObservedDaemonAsync()
|
||||
{
|
||||
var frame = await LatestDaemonFrameAsync().ConfigureAwait(false);
|
||||
var soaView = await TryLatestDaemonSoaViewAsync().ConfigureAwait(false);
|
||||
var zoneRender = await LatestZoneRenderAsync().ConfigureAwait(false);
|
||||
var frame = await LatestAsync<AetheriaRuntimeDaemonFrameDocument>().ConfigureAwait(false);
|
||||
var soaView = await TryReadDaemonSoaViewAsync().ConfigureAwait(false);
|
||||
var zoneRender = await LatestAsync<AetheriaRuntimeZoneRenderDocument>().ConfigureAwait(false);
|
||||
return new AetheriaRuntimeObservedDaemonState(frame, soaView, zoneRender);
|
||||
}
|
||||
|
||||
|
|
@ -256,11 +231,11 @@ namespace GameCult.Aetheria.State.Verse
|
|||
}
|
||||
}
|
||||
|
||||
private async Task<AetheriaRuntimeDaemonSoaViewDocument?> TryLatestDaemonSoaViewAsync()
|
||||
private async Task<AetheriaRuntimeDaemonSoaViewDocument?> TryReadDaemonSoaViewAsync()
|
||||
{
|
||||
try
|
||||
{
|
||||
var soaView = await LatestDaemonSoaViewAsync().ConfigureAwait(false);
|
||||
var soaView = await LatestAsync<AetheriaRuntimeDaemonSoaViewDocument>().ConfigureAwait(false);
|
||||
return string.Equals(soaView.Schema, AetheriaRuntimeDaemonSchemas.SoaView, StringComparison.Ordinal)
|
||||
? soaView
|
||||
: null;
|
||||
|
|
@ -271,46 +246,6 @@ namespace GameCult.Aetheria.State.Verse
|
|||
}
|
||||
}
|
||||
|
||||
public Task<AetheriaRuntimeDaemonProviderAdvertisementDocument> LatestProviderAdvertisementAsync()
|
||||
{
|
||||
return Daemon.LatestProviderAdvertisementAsync();
|
||||
}
|
||||
|
||||
public AetheriaRuntimeDaemonProviderAdvertisementDocument LatestProviderAdvertisement()
|
||||
{
|
||||
return LatestProviderAdvertisementAsync().ConfigureAwait(false).GetAwaiter().GetResult();
|
||||
}
|
||||
|
||||
public Task<AetheriaRuntimeDaemonHealthDocument> LatestHealthAsync()
|
||||
{
|
||||
return Daemon.LatestHealthAsync();
|
||||
}
|
||||
|
||||
public AetheriaRuntimeDaemonHealthDocument LatestHealth()
|
||||
{
|
||||
return LatestHealthAsync().ConfigureAwait(false).GetAwaiter().GetResult();
|
||||
}
|
||||
|
||||
public Task<AetheriaRuntimeDaemonCommandBoundaryDocument> LatestCommandBoundaryAsync()
|
||||
{
|
||||
return Daemon.LatestCommandBoundaryAsync();
|
||||
}
|
||||
|
||||
public AetheriaRuntimeDaemonCommandBoundaryDocument LatestCommandBoundary()
|
||||
{
|
||||
return LatestCommandBoundaryAsync().ConfigureAwait(false).GetAwaiter().GetResult();
|
||||
}
|
||||
|
||||
public Task<AetheriaRuntimeVerseAuthorityPolicyDocument> LatestAuthorityPolicyAsync()
|
||||
{
|
||||
return Daemon.LatestAuthorityPolicyAsync();
|
||||
}
|
||||
|
||||
public AetheriaRuntimeVerseAuthorityPolicyDocument LatestAuthorityPolicy()
|
||||
{
|
||||
return LatestAuthorityPolicyAsync().ConfigureAwait(false).GetAwaiter().GetResult();
|
||||
}
|
||||
|
||||
public Task<global::Aetheria.State.Documents.EveSurfaceState> LatestGameSurfaceAsync()
|
||||
{
|
||||
return Daemon.LatestGameSurfaceAsync();
|
||||
|
|
@ -399,56 +334,6 @@ namespace GameCult.Aetheria.State.Verse
|
|||
return Daemon.ReactiveEditorTuiSurface(options);
|
||||
}
|
||||
|
||||
public Task<AetheriaRuntimeLoadoutTemplatesDocument> LatestLoadoutTemplatesAsync()
|
||||
{
|
||||
return LoadoutTemplates.LatestAsync();
|
||||
}
|
||||
|
||||
public AetheriaRuntimeLoadoutTemplatesDocument LatestLoadoutTemplates()
|
||||
{
|
||||
return LatestLoadoutTemplatesAsync().ConfigureAwait(false).GetAwaiter().GetResult();
|
||||
}
|
||||
|
||||
public Task<AetheriaRuntimeSectorMapDocument> LatestSectorMapAsync()
|
||||
{
|
||||
return SectorMap.LatestAsync();
|
||||
}
|
||||
|
||||
public AetheriaRuntimeSectorMapDocument LatestSectorMap()
|
||||
{
|
||||
return LatestSectorMapAsync().ConfigureAwait(false).GetAwaiter().GetResult();
|
||||
}
|
||||
|
||||
public Task<AetheriaRuntimeZoneContactsDocument> LatestZoneContactsAsync()
|
||||
{
|
||||
return ZoneContacts.LatestAsync();
|
||||
}
|
||||
|
||||
public AetheriaRuntimeZoneContactsDocument LatestZoneContacts()
|
||||
{
|
||||
return LatestZoneContactsAsync().ConfigureAwait(false).GetAwaiter().GetResult();
|
||||
}
|
||||
|
||||
public Task<AetheriaRuntimeStationRefitDocument> LatestStationRefitAsync()
|
||||
{
|
||||
return StationRefit.LatestAsync();
|
||||
}
|
||||
|
||||
public AetheriaRuntimeStationRefitDocument LatestStationRefit()
|
||||
{
|
||||
return LatestStationRefitAsync().ConfigureAwait(false).GetAwaiter().GetResult();
|
||||
}
|
||||
|
||||
public Task<AetheriaRuntimeZoneRenderDocument> LatestZoneRenderAsync()
|
||||
{
|
||||
return ZoneRender.LatestAsync();
|
||||
}
|
||||
|
||||
public AetheriaRuntimeZoneRenderDocument LatestZoneRender()
|
||||
{
|
||||
return LatestZoneRenderAsync().ConfigureAwait(false).GetAwaiter().GetResult();
|
||||
}
|
||||
|
||||
public Observable<TDocument> Watch<TDocument>()
|
||||
where TDocument : class
|
||||
{
|
||||
|
|
@ -488,9 +373,9 @@ namespace GameCult.Aetheria.State.Verse
|
|||
|
||||
public async Task<CultMeshStateRefResolver> CreateEveSurfaceCultMeshStateRefResolverAsync()
|
||||
{
|
||||
var frameTask = LatestDaemonFrameAsync();
|
||||
var healthTask = LatestHealthAsync();
|
||||
var commandBoundaryTask = LatestCommandBoundaryAsync();
|
||||
var frameTask = LatestAsync<AetheriaRuntimeDaemonFrameDocument>();
|
||||
var healthTask = LatestAsync<AetheriaRuntimeDaemonHealthDocument>();
|
||||
var commandBoundaryTask = LatestAsync<AetheriaRuntimeDaemonCommandBoundaryDocument>();
|
||||
|
||||
await Task.WhenAll(frameTask, healthTask, commandBoundaryTask).ConfigureAwait(false);
|
||||
|
||||
|
|
@ -498,7 +383,7 @@ namespace GameCult.Aetheria.State.Verse
|
|||
frameTask.Result,
|
||||
healthTask.Result,
|
||||
commandBoundaryTask.Result,
|
||||
LatestCatalog);
|
||||
() => Latest<AetheriaRuntimeCatalogSnapshot>());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -548,66 +433,6 @@ namespace GameCult.Aetheria.State.Verse
|
|||
|
||||
public CultMeshDocumentHandle<global::Aetheria.State.Documents.EveSurfaceState> EditorTuiSurface { get; }
|
||||
|
||||
public Task<AetheriaRuntimeDaemonProviderAdvertisementDocument> LatestProviderAdvertisementAsync()
|
||||
{
|
||||
return ProviderAdvertisement.LatestAsync();
|
||||
}
|
||||
|
||||
public AetheriaRuntimeDaemonProviderAdvertisementDocument LatestProviderAdvertisement()
|
||||
{
|
||||
return LatestProviderAdvertisementAsync().ConfigureAwait(false).GetAwaiter().GetResult();
|
||||
}
|
||||
|
||||
public Task<AetheriaRuntimeDaemonHealthDocument> LatestHealthAsync()
|
||||
{
|
||||
return Health.LatestAsync();
|
||||
}
|
||||
|
||||
public AetheriaRuntimeDaemonHealthDocument LatestHealth()
|
||||
{
|
||||
return LatestHealthAsync().ConfigureAwait(false).GetAwaiter().GetResult();
|
||||
}
|
||||
|
||||
public Task<AetheriaRuntimeDaemonCommandBoundaryDocument> LatestCommandBoundaryAsync()
|
||||
{
|
||||
return CommandBoundary.LatestAsync();
|
||||
}
|
||||
|
||||
public AetheriaRuntimeDaemonCommandBoundaryDocument LatestCommandBoundary()
|
||||
{
|
||||
return LatestCommandBoundaryAsync().ConfigureAwait(false).GetAwaiter().GetResult();
|
||||
}
|
||||
|
||||
public Task<AetheriaRuntimeVerseAuthorityPolicyDocument> LatestAuthorityPolicyAsync()
|
||||
{
|
||||
return AuthorityPolicy.LatestAsync();
|
||||
}
|
||||
|
||||
public AetheriaRuntimeVerseAuthorityPolicyDocument LatestAuthorityPolicy()
|
||||
{
|
||||
return LatestAuthorityPolicyAsync().ConfigureAwait(false).GetAwaiter().GetResult();
|
||||
}
|
||||
|
||||
public Task<AetheriaRuntimeDaemonFrameDocument> LatestFrameDocumentAsync()
|
||||
{
|
||||
return LatestFrame.LatestAsync();
|
||||
}
|
||||
|
||||
public AetheriaRuntimeDaemonFrameDocument LatestFrameDocument()
|
||||
{
|
||||
return LatestFrameDocumentAsync().ConfigureAwait(false).GetAwaiter().GetResult();
|
||||
}
|
||||
|
||||
public Task<AetheriaRuntimeDaemonSoaViewDocument> LatestSoaViewDocumentAsync()
|
||||
{
|
||||
return LatestSoaView.LatestAsync();
|
||||
}
|
||||
|
||||
public AetheriaRuntimeDaemonSoaViewDocument LatestSoaViewDocument()
|
||||
{
|
||||
return LatestSoaViewDocumentAsync().ConfigureAwait(false).GetAwaiter().GetResult();
|
||||
}
|
||||
|
||||
public Task<global::Aetheria.State.Documents.EveSurfaceState> LatestGameSurfaceAsync()
|
||||
{
|
||||
return GameSurface.LatestAsync();
|
||||
|
|
@ -731,26 +556,6 @@ namespace GameCult.Aetheria.State.Verse
|
|||
|
||||
public CultMeshDocumentHandle<AetheriaRuntimeVerseHostSettingsDocument> VerseHost { get; }
|
||||
|
||||
public Task<AetheriaRuntimePlayerSettingsDocument> LatestPlayerAsync()
|
||||
{
|
||||
return Player.LatestAsync();
|
||||
}
|
||||
|
||||
public AetheriaRuntimePlayerSettingsDocument LatestPlayer()
|
||||
{
|
||||
return LatestPlayerAsync().ConfigureAwait(false).GetAwaiter().GetResult();
|
||||
}
|
||||
|
||||
public Task<AetheriaRuntimeVerseHostSettingsDocument> LatestVerseHostAsync()
|
||||
{
|
||||
return VerseHost.LatestAsync();
|
||||
}
|
||||
|
||||
public AetheriaRuntimeVerseHostSettingsDocument LatestVerseHost()
|
||||
{
|
||||
return LatestVerseHostAsync().ConfigureAwait(false).GetAwaiter().GetResult();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public sealed class AetheriaClientViewportState
|
||||
|
|
|
|||
Loading…
Reference in a new issue