Expand managed Aetheria state accessors
This commit is contained in:
parent
e1052eba30
commit
d79ba34018
5 changed files with 400 additions and 51 deletions
|
|
@ -94,6 +94,7 @@ RequireInventoryValidationUsesManagedTypedDocuments(root);
|
|||
RequireMenuDockingUsesManagedTypedSnapshot(root);
|
||||
RequireUnitySharedDocumentAccessorErgonomics(root);
|
||||
RequireUnityViewportAndMapReadsUseManagedAccessors(root);
|
||||
RequireAetheriaManagedStateAccessorsCoverDomainDocuments(root);
|
||||
RequireInventoryLoadoutSaveRequestAuthority(root);
|
||||
RequireInventoryLoadoutRestoreRequestAuthority(root);
|
||||
RequireDockedCurrentShipRequestAuthority(root);
|
||||
|
|
@ -7118,6 +7119,145 @@ static void RequireUnityViewportAndMapReadsUseManagedAccessors(string root)
|
|||
Console.WriteLine("Viewport and map document accessors: Unity reads map, contact, viewport, and current-entity state through named managed accessors");
|
||||
}
|
||||
|
||||
static void RequireAetheriaManagedStateAccessorsCoverDomainDocuments(string root)
|
||||
{
|
||||
var clientStatePath = Path.Combine(
|
||||
root,
|
||||
"Packages",
|
||||
"org.gamecult.aetheria.state",
|
||||
"Runtime",
|
||||
"AetheriaClientState.cs");
|
||||
var observedDaemonStatePath = Path.Combine(
|
||||
root,
|
||||
"Packages",
|
||||
"org.gamecult.aetheria.state",
|
||||
"Runtime",
|
||||
"AetheriaRuntimeObservedDaemonState.cs");
|
||||
var daemonRuntimeDocumentTestsPath = Path.Combine(
|
||||
root,
|
||||
"Assets",
|
||||
"Scripts",
|
||||
"Tests",
|
||||
"DaemonRuntimeDocumentTests.cs");
|
||||
var starbridgePlayerSeatTestsPath = Path.Combine(
|
||||
root,
|
||||
"Assets",
|
||||
"Scripts",
|
||||
"Tests",
|
||||
"StarbridgePlayerSeatDocumentTests.cs");
|
||||
|
||||
var requiredPaths = new[]
|
||||
{
|
||||
clientStatePath,
|
||||
observedDaemonStatePath,
|
||||
daemonRuntimeDocumentTestsPath,
|
||||
starbridgePlayerSeatTestsPath
|
||||
};
|
||||
var missingPaths = requiredPaths.Where(path => !File.Exists(path)).ToArray();
|
||||
if (missingPaths.Length > 0)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"Cannot verify Aetheria managed state accessor coverage; missing sources: " +
|
||||
string.Join(", ", missingPaths.Select(path => Path.GetRelativePath(root, path))));
|
||||
}
|
||||
|
||||
var clientState = File.ReadAllText(clientStatePath);
|
||||
var requiredClientSymbols = new[]
|
||||
{
|
||||
"public AetheriaRuntimeDaemonFrameDocument LatestDaemonFrame()",
|
||||
"public AetheriaRuntimeDaemonSoaViewDocument LatestDaemonSoaView()",
|
||||
"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()",
|
||||
"public global::Aetheria.State.Documents.EveSurfaceState LatestEditorTuiSurface()",
|
||||
"public AetheriaRuntimeRtsViewportDocument LatestMap(AetheriaRuntimeRtsViewportBounds viewport)",
|
||||
"public AetheriaRuntimeGravityViewportDocument LatestGravity(AetheriaRuntimeRtsViewportBounds viewport)",
|
||||
"public AetheriaRuntimeSelectedObjectDocument LatestSelectedObject(int entityIndex)",
|
||||
"public AetheriaRuntimeStarbridgeScenarioDocument LatestScenario()",
|
||||
"public AetheriaRuntimeStarbridgeSessionDocument LatestSession()",
|
||||
"public AetheriaRuntimeStarbridgeSessionSummaryDocument LatestSummary()",
|
||||
"public AetheriaRuntimeStarbridgePlayerSeatDocument LatestPlayerSeat(string seatId)"
|
||||
};
|
||||
var missingClientSymbols = requiredClientSymbols
|
||||
.Where(symbol => !clientState.Contains(symbol, StringComparison.Ordinal))
|
||||
.ToArray();
|
||||
if (missingClientSymbols.Length > 0)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"AetheriaClientState must expose named managed latest accessors for the remaining domain documents: " +
|
||||
string.Join(", ", missingClientSymbols));
|
||||
}
|
||||
|
||||
var observedDaemonState = File.ReadAllText(observedDaemonStatePath);
|
||||
var requiredObservedSymbols = new[]
|
||||
{
|
||||
"state.LatestDaemonFrameAsync()",
|
||||
"state.LatestDaemonSoaViewAsync()"
|
||||
};
|
||||
var missingObservedSymbols = requiredObservedSymbols
|
||||
.Where(symbol => !observedDaemonState.Contains(symbol, StringComparison.Ordinal))
|
||||
.ToArray();
|
||||
if (missingObservedSymbols.Length > 0)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"Observed daemon state must read managed typed daemon documents through named AetheriaClientState accessors: " +
|
||||
string.Join(", ", missingObservedSymbols));
|
||||
}
|
||||
|
||||
var checkedSources = new Dictionary<string, string>
|
||||
{
|
||||
["DaemonRuntimeDocumentTests.cs"] = File.ReadAllText(daemonRuntimeDocumentTestsPath),
|
||||
["StarbridgePlayerSeatDocumentTests.cs"] = File.ReadAllText(starbridgePlayerSeatTestsPath)
|
||||
};
|
||||
var forbiddenCompactedSymbols = new[]
|
||||
{
|
||||
".Aetheria().Catalog.LatestAsync()",
|
||||
".Aetheria().Settings.Player.LatestAsync()",
|
||||
".Aetheria().Settings.VerseHost.LatestAsync()",
|
||||
".Aetheria().Current.Entity.LatestAsync()",
|
||||
".Aetheria().Viewports.Objects(",
|
||||
".Aetheria().Details.Zone(",
|
||||
".Aetheria().Details.Inventory(",
|
||||
".Aetheria().Starbridge.PlayerSeat(",
|
||||
".State.Daemon.LatestFrame.LatestAsync()",
|
||||
".State.Daemon.LatestSoaView.LatestAsync()",
|
||||
".State.Daemon.AuthorityPolicy.LatestAsync()",
|
||||
".State.Daemon.GameSurface.LatestAsync()",
|
||||
".State.Daemon.GameTuiSurface.LatestAsync()",
|
||||
".State.Daemon.EditorSurface.LatestAsync()",
|
||||
".State.Daemon.EditorTuiSurface.LatestAsync()"
|
||||
}
|
||||
.Select(CompactSource)
|
||||
.ToArray();
|
||||
var offenders = checkedSources
|
||||
.Select(entry => new
|
||||
{
|
||||
entry.Key,
|
||||
Compact = CompactSource(entry.Value)
|
||||
})
|
||||
.Where(entry => forbiddenCompactedSymbols.Any(symbol => entry.Compact.Contains(symbol, StringComparison.Ordinal)))
|
||||
.Select(entry => entry.Key)
|
||||
.ToArray();
|
||||
|
||||
if (offenders.Length > 0)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"Managed state examples still teach raw CultMesh handle walks for ordinary latest reads: " +
|
||||
string.Join(", ", offenders));
|
||||
}
|
||||
|
||||
Console.WriteLine("Domain document accessors: managed Aetheria state exposes named latest reads for daemon, viewport, detail, and Starbridge documents");
|
||||
}
|
||||
|
||||
static void RequireVerseHostSettingsAuthority(string root)
|
||||
{
|
||||
var settingsPath = Path.Combine(root, "Aetheria.State", "Documents", "AetheriaVerseHostSettings.cs");
|
||||
|
|
@ -10173,9 +10313,9 @@ static void RequireAetheriaRuntimeVerseClientContract(string root)
|
|||
"public Func<string, string> CreateEveSurfaceStateRefResolver()",
|
||||
"public CultMeshStateRefResolver CreateEveSurfaceCultMeshStateRefResolver()",
|
||||
"public async Task<CultMeshStateRefResolver> CreateEveSurfaceCultMeshStateRefResolverAsync()",
|
||||
"Daemon.LatestFrame.LatestAsync()",
|
||||
"Daemon.Health.LatestAsync()",
|
||||
"Daemon.CommandBoundary.LatestAsync()",
|
||||
"Daemon.LatestFrameDocumentAsync()",
|
||||
"Daemon.LatestHealthAsync()",
|
||||
"Daemon.LatestCommandBoundaryAsync()",
|
||||
"LatestCatalog",
|
||||
"AetheriaRuntimeStateRefResolver.CreateEveSurfaceCultMeshStateRefResolver("
|
||||
};
|
||||
|
|
@ -14136,8 +14276,8 @@ static void RequireRuntimeStateReaderOwnsUnityStateAcquisition(string root)
|
|||
{
|
||||
"public static async Task<AetheriaRuntimeObservedDaemonState?> ReadAsync(",
|
||||
"AetheriaClientState state",
|
||||
"state.Daemon.LatestFrame.LatestAsync()",
|
||||
"state.Daemon.LatestSoaView.LatestAsync()",
|
||||
"state.LatestDaemonFrameAsync()",
|
||||
"state.LatestDaemonSoaViewAsync()",
|
||||
"AetheriaRuntimeDaemonSoaViewIndex.Build(soaView)"
|
||||
};
|
||||
var missingObservedDaemonStateSymbols = requiredObservedDaemonStateSymbols
|
||||
|
|
|
|||
|
|
@ -164,11 +164,11 @@ public class DaemonRuntimeDocumentTests
|
|||
.GetAwaiter()
|
||||
.GetResult();
|
||||
|
||||
var currentEntity = client.Aetheria().Current.Entity.LatestAsync().GetAwaiter().GetResult();
|
||||
var latestFrame = client.Aetheria().LatestFrame.LatestAsync().GetAwaiter().GetResult();
|
||||
var catalog = client.Aetheria().Catalog.LatestAsync().GetAwaiter().GetResult();
|
||||
var playerSettings = client.Aetheria().Settings.Player.LatestAsync().GetAwaiter().GetResult();
|
||||
var verseHostSettings = client.Aetheria().Settings.VerseHost.LatestAsync().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()
|
||||
.LatestAsync<AetheriaRuntimeCurrentEntityDocument>()
|
||||
.GetAwaiter()
|
||||
|
|
@ -186,22 +186,13 @@ public class DaemonRuntimeDocumentTests
|
|||
};
|
||||
var objectsViewport = client.Aetheria()
|
||||
.Viewports
|
||||
.Objects(viewport)
|
||||
.LatestAsync()
|
||||
.GetAwaiter()
|
||||
.GetResult();
|
||||
.LatestObjects(viewport);
|
||||
var zoneDetails = client.Aetheria()
|
||||
.Details
|
||||
.Zone(0)
|
||||
.LatestAsync()
|
||||
.GetAwaiter()
|
||||
.GetResult();
|
||||
.LatestZone(0);
|
||||
var inventory = client.Aetheria()
|
||||
.Details
|
||||
.Inventory(0)
|
||||
.LatestAsync()
|
||||
.GetAwaiter()
|
||||
.GetResult();
|
||||
.LatestInventory(0);
|
||||
var currentEntityFromClientType = client.State
|
||||
.LatestAsync<AetheriaRuntimeCurrentEntityDocument>()
|
||||
.GetAwaiter()
|
||||
|
|
@ -216,17 +207,15 @@ public class DaemonRuntimeDocumentTests
|
|||
.ReadAsync(client.State)
|
||||
.GetAwaiter()
|
||||
.GetResult();
|
||||
var observedAuthoritativeFrame = client.State.Daemon.LatestFrame.LatestAsync().GetAwaiter().GetResult();
|
||||
var gameSurface = client.State.Daemon.GameSurface.LatestAsync().GetAwaiter().GetResult();
|
||||
var gameTuiSurface = client.State.Daemon.GameTuiSurface.LatestAsync().GetAwaiter().GetResult();
|
||||
var editorSurface = client.State.Daemon.EditorSurface.LatestAsync().GetAwaiter().GetResult();
|
||||
var editorTuiSurface = client.State.Daemon.EditorTuiSurface.LatestAsync().GetAwaiter().GetResult();
|
||||
var authorityStatus = client.State.Daemon.AuthorityPolicy.LatestAsync().GetAwaiter().GetResult();
|
||||
var observedAuthoritativeFrame = client.State.Daemon.LatestFrameDocument();
|
||||
var gameSurface = client.State.Daemon.LatestGameSurface();
|
||||
var gameTuiSurface = client.State.Daemon.LatestGameTuiSurface();
|
||||
var editorSurface = client.State.Daemon.LatestEditorSurface();
|
||||
var editorTuiSurface = client.State.Daemon.LatestEditorTuiSurface();
|
||||
var authorityStatus = client.State.Daemon.LatestAuthorityPolicy();
|
||||
var dockingState = client.Aetheria()
|
||||
.DockingState
|
||||
.LatestAsync()
|
||||
.GetAwaiter()
|
||||
.GetResult();
|
||||
.Latest();
|
||||
|
||||
Assert.AreEqual("aetheria.current.entity", client.State.Current.Entity.DocumentId);
|
||||
Assert.AreSame(client.State.Current.Entity, client.State.Document<AetheriaRuntimeCurrentEntityDocument>());
|
||||
|
|
@ -323,9 +312,9 @@ public class DaemonRuntimeDocumentTests
|
|||
.GetAwaiter()
|
||||
.GetResult();
|
||||
|
||||
var player = client.Aetheria().Settings.Player.LatestAsync().GetAwaiter().GetResult();
|
||||
var verseHost = client.Aetheria().Settings.VerseHost.LatestAsync().GetAwaiter().GetResult();
|
||||
var catalog = client.Aetheria().Catalog.LatestAsync().GetAwaiter().GetResult();
|
||||
var player = client.Aetheria().Settings.LatestPlayer();
|
||||
var verseHost = client.Aetheria().Settings.LatestVerseHost();
|
||||
var catalog = client.Aetheria().LatestCatalog();
|
||||
|
||||
Assert.AreEqual(AetheriaRuntimeCatalogSnapshot.SchemaId, client.State.Catalog.Sources.Last().SchemaId);
|
||||
Assert.IsNotNull(catalog);
|
||||
|
|
@ -360,7 +349,7 @@ public class DaemonRuntimeDocumentTests
|
|||
.GetResult();
|
||||
|
||||
var aetheria = verse.Aetheria();
|
||||
var currentEntity = aetheria.Current.Entity.LatestAsync().GetAwaiter().GetResult();
|
||||
var currentEntity = aetheria.Current.LatestEntity();
|
||||
var latestFrameDocument = verse.Document<AetheriaRuntimeDaemonFrameDocument>(
|
||||
AetheriaRuntimeVerseRecordKeys.DaemonFrameLatest);
|
||||
using var latestFrameReactive = latestFrameDocument.Reactive();
|
||||
|
|
@ -559,10 +548,10 @@ public class DaemonRuntimeDocumentTests
|
|||
.OpenAsync(statePath, "unity-surface-test", pullOnOpen: true)
|
||||
.GetAwaiter()
|
||||
.GetResult();
|
||||
var unityGameSurfaceState = client.State.Daemon.GameSurface.LatestAsync().GetAwaiter().GetResult();
|
||||
var unityGameTuiSurfaceState = client.State.Daemon.GameTuiSurface.LatestAsync().GetAwaiter().GetResult();
|
||||
var unityEditorSurfaceState = client.State.Daemon.EditorSurface.LatestAsync().GetAwaiter().GetResult();
|
||||
var unityEditorTuiSurfaceState = client.State.Daemon.EditorTuiSurface.LatestAsync().GetAwaiter().GetResult();
|
||||
var unityGameSurfaceState = client.State.Daemon.LatestGameSurface();
|
||||
var unityGameTuiSurfaceState = client.State.Daemon.LatestGameTuiSurface();
|
||||
var unityEditorSurfaceState = client.State.Daemon.LatestEditorSurface();
|
||||
var unityEditorTuiSurfaceState = client.State.Daemon.LatestEditorTuiSurface();
|
||||
var surfaceResolver = client.State.CreateEveSurfaceStateRefResolver();
|
||||
var unityGameSurface = AetheriaRuntimeEveSurfaceAdapter.ToEveSurfaceDocument(
|
||||
unityGameSurfaceState,
|
||||
|
|
@ -594,7 +583,7 @@ public class DaemonRuntimeDocumentTests
|
|||
Assert.AreEqual(AetheriaRuntimeDaemonEditorSurfaceBuilder.TuiSurfaceId, unityEditorTuiSurface.Surface.Id);
|
||||
Assert.AreEqual("editor.daemon", unityEditorTuiSurface.ProviderKind);
|
||||
var genericGameSurface = AetheriaRuntimeEveSurfaceAdapter.ToEveSurfaceDocument(
|
||||
client.State.Daemon.GameSurface.LatestAsync().GetAwaiter().GetResult(),
|
||||
client.State.Daemon.LatestGameSurface(),
|
||||
surfaceResolver);
|
||||
Assert.AreEqual(AetheriaRuntimeDaemonGameSurfaceBuilder.SurfaceId, genericGameSurface.Surface.Id);
|
||||
Assert.AreEqual(unityGameSurface.ProviderId, genericGameSurface.ProviderId);
|
||||
|
|
@ -617,11 +606,11 @@ public class DaemonRuntimeDocumentTests
|
|||
AetheriaRuntimeDaemonStateRefs.CurrentTargetName,
|
||||
AetheriaRuntimeDaemonSchemas.Frame));
|
||||
var genericGameTuiSurface = AetheriaRuntimeEveSurfaceAdapter.ToEveSurfaceDocument(
|
||||
client.State.Daemon.GameTuiSurface.LatestAsync().GetAwaiter().GetResult(),
|
||||
client.State.Daemon.LatestGameTuiSurface(),
|
||||
surfaceResolver);
|
||||
Assert.AreEqual(AetheriaRuntimeDaemonGameSurfaceBuilder.TuiSurfaceId, genericGameTuiSurface.Surface.Id);
|
||||
var genericEditorTuiSurface = AetheriaRuntimeEveSurfaceAdapter.ToEveSurfaceDocument(
|
||||
client.State.Daemon.EditorTuiSurface.LatestAsync().GetAwaiter().GetResult(),
|
||||
client.State.Daemon.LatestEditorTuiSurface(),
|
||||
surfaceResolver);
|
||||
Assert.AreEqual(AetheriaRuntimeDaemonEditorSurfaceBuilder.TuiSurfaceId, genericEditorTuiSurface.Surface.Id);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -78,15 +78,15 @@ public class StarbridgePlayerSeatDocumentTests
|
|||
.GetResult();
|
||||
var handle = client.Document<AetheriaRuntimeStarbridgePlayerSeatDocument>(
|
||||
AetheriaRuntimeVerseRecordKeys.StarbridgePlayerSeat(seat.SeatId));
|
||||
var aetheriaSeat = client
|
||||
var aetheriaStarbridge = client
|
||||
.Aetheria()
|
||||
.Starbridge
|
||||
.PlayerSeat(seat.SeatId);
|
||||
.Starbridge;
|
||||
var aetheriaSeat = aetheriaStarbridge.PlayerSeat(seat.SeatId);
|
||||
using var reactive = handle.Reactive();
|
||||
using var aetheriaReactive = aetheriaSeat.Reactive();
|
||||
|
||||
Assert.AreEqual("seat-support", handle.Latest().SeatId);
|
||||
Assert.AreEqual("seat-support", aetheriaSeat.Latest().SeatId);
|
||||
Assert.AreEqual("seat-support", client.Aetheria().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);
|
||||
|
|
|
|||
|
|
@ -188,6 +188,36 @@ namespace GameCult.Aetheria.State.Verse
|
|||
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 Task<AetheriaRuntimeLoadoutTemplatesDocument> LatestLoadoutTemplatesAsync()
|
||||
{
|
||||
return LoadoutTemplates.LatestAsync();
|
||||
}
|
||||
|
||||
public AetheriaRuntimeLoadoutTemplatesDocument LatestLoadoutTemplates()
|
||||
{
|
||||
return LatestLoadoutTemplatesAsync().ConfigureAwait(false).GetAwaiter().GetResult();
|
||||
}
|
||||
|
||||
public Task<AetheriaRuntimeSectorMapDocument> LatestSectorMapAsync()
|
||||
{
|
||||
return SectorMap.LatestAsync();
|
||||
|
|
@ -208,6 +238,26 @@ namespace GameCult.Aetheria.State.Verse
|
|||
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
|
||||
{
|
||||
|
|
@ -247,9 +297,9 @@ namespace GameCult.Aetheria.State.Verse
|
|||
|
||||
public async Task<CultMeshStateRefResolver> CreateEveSurfaceCultMeshStateRefResolverAsync()
|
||||
{
|
||||
var frameTask = Daemon.LatestFrame.LatestAsync();
|
||||
var healthTask = Daemon.Health.LatestAsync();
|
||||
var commandBoundaryTask = Daemon.CommandBoundary.LatestAsync();
|
||||
var frameTask = Daemon.LatestFrameDocumentAsync();
|
||||
var healthTask = Daemon.LatestHealthAsync();
|
||||
var commandBoundaryTask = Daemon.LatestCommandBoundaryAsync();
|
||||
|
||||
await Task.WhenAll(frameTask, healthTask, commandBoundaryTask).ConfigureAwait(false);
|
||||
|
||||
|
|
@ -306,6 +356,106 @@ namespace GameCult.Aetheria.State.Verse
|
|||
public CultMeshDocumentHandle<global::Aetheria.State.Documents.EveSurfaceState> EditorSurface { get; }
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
public global::Aetheria.State.Documents.EveSurfaceState LatestGameSurface()
|
||||
{
|
||||
return LatestGameSurfaceAsync().ConfigureAwait(false).GetAwaiter().GetResult();
|
||||
}
|
||||
|
||||
public Task<global::Aetheria.State.Documents.EveSurfaceState> LatestGameTuiSurfaceAsync()
|
||||
{
|
||||
return GameTuiSurface.LatestAsync();
|
||||
}
|
||||
|
||||
public global::Aetheria.State.Documents.EveSurfaceState LatestGameTuiSurface()
|
||||
{
|
||||
return LatestGameTuiSurfaceAsync().ConfigureAwait(false).GetAwaiter().GetResult();
|
||||
}
|
||||
|
||||
public Task<global::Aetheria.State.Documents.EveSurfaceState> LatestEditorSurfaceAsync()
|
||||
{
|
||||
return EditorSurface.LatestAsync();
|
||||
}
|
||||
|
||||
public global::Aetheria.State.Documents.EveSurfaceState LatestEditorSurface()
|
||||
{
|
||||
return LatestEditorSurfaceAsync().ConfigureAwait(false).GetAwaiter().GetResult();
|
||||
}
|
||||
|
||||
public Task<global::Aetheria.State.Documents.EveSurfaceState> LatestEditorTuiSurfaceAsync()
|
||||
{
|
||||
return EditorTuiSurface.LatestAsync();
|
||||
}
|
||||
|
||||
public global::Aetheria.State.Documents.EveSurfaceState LatestEditorTuiSurface()
|
||||
{
|
||||
return LatestEditorTuiSurfaceAsync().ConfigureAwait(false).GetAwaiter().GetResult();
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class AetheriaClientCurrentState
|
||||
|
|
@ -494,6 +644,16 @@ namespace GameCult.Aetheria.State.Verse
|
|||
return _map(viewport ?? new AetheriaRuntimeRtsViewportBounds());
|
||||
}
|
||||
|
||||
public Task<AetheriaRuntimeRtsViewportDocument> LatestMapAsync(AetheriaRuntimeRtsViewportBounds viewport)
|
||||
{
|
||||
return Map(viewport).LatestAsync();
|
||||
}
|
||||
|
||||
public AetheriaRuntimeRtsViewportDocument LatestMap(AetheriaRuntimeRtsViewportBounds viewport)
|
||||
{
|
||||
return LatestMapAsync(viewport).ConfigureAwait(false).GetAwaiter().GetResult();
|
||||
}
|
||||
|
||||
public CultMeshDocumentHandle<AetheriaRuntimeObjectsViewportDocument> Objects(AetheriaRuntimeRtsViewportBounds viewport)
|
||||
{
|
||||
return _objects(viewport ?? new AetheriaRuntimeRtsViewportBounds());
|
||||
|
|
@ -514,6 +674,16 @@ namespace GameCult.Aetheria.State.Verse
|
|||
return _gravity(viewport ?? new AetheriaRuntimeRtsViewportBounds());
|
||||
}
|
||||
|
||||
public Task<AetheriaRuntimeGravityViewportDocument> LatestGravityAsync(AetheriaRuntimeRtsViewportBounds viewport)
|
||||
{
|
||||
return Gravity(viewport).LatestAsync();
|
||||
}
|
||||
|
||||
public AetheriaRuntimeGravityViewportDocument LatestGravity(AetheriaRuntimeRtsViewportBounds viewport)
|
||||
{
|
||||
return LatestGravityAsync(viewport).ConfigureAwait(false).GetAwaiter().GetResult();
|
||||
}
|
||||
|
||||
public CultMeshDocumentHandle<AetheriaRuntimeRenderSplatsViewportDocument> RenderSplats(AetheriaRuntimeRtsViewportBounds viewport)
|
||||
{
|
||||
return _renderSplats(viewport ?? new AetheriaRuntimeRtsViewportBounds());
|
||||
|
|
@ -566,6 +736,16 @@ namespace GameCult.Aetheria.State.Verse
|
|||
return _selectedObject(entityIndex);
|
||||
}
|
||||
|
||||
public Task<AetheriaRuntimeSelectedObjectDocument> LatestSelectedObjectAsync(int entityIndex)
|
||||
{
|
||||
return SelectedObject(entityIndex).LatestAsync();
|
||||
}
|
||||
|
||||
public AetheriaRuntimeSelectedObjectDocument LatestSelectedObject(int entityIndex)
|
||||
{
|
||||
return LatestSelectedObjectAsync(entityIndex).ConfigureAwait(false).GetAwaiter().GetResult();
|
||||
}
|
||||
|
||||
public CultMeshDocumentHandle<AetheriaRuntimeInventoryDocument> Inventory(int entityIndex)
|
||||
{
|
||||
return _inventory(entityIndex);
|
||||
|
|
@ -610,5 +790,45 @@ namespace GameCult.Aetheria.State.Verse
|
|||
throw new ArgumentException("Seat id must be non-empty.", nameof(seatId));
|
||||
return _playerSeat(seatId);
|
||||
}
|
||||
|
||||
public Task<AetheriaRuntimeStarbridgeScenarioDocument> LatestScenarioAsync()
|
||||
{
|
||||
return Scenario.LatestAsync();
|
||||
}
|
||||
|
||||
public AetheriaRuntimeStarbridgeScenarioDocument LatestScenario()
|
||||
{
|
||||
return LatestScenarioAsync().ConfigureAwait(false).GetAwaiter().GetResult();
|
||||
}
|
||||
|
||||
public Task<AetheriaRuntimeStarbridgeSessionDocument> LatestSessionAsync()
|
||||
{
|
||||
return Session.LatestAsync();
|
||||
}
|
||||
|
||||
public AetheriaRuntimeStarbridgeSessionDocument LatestSession()
|
||||
{
|
||||
return LatestSessionAsync().ConfigureAwait(false).GetAwaiter().GetResult();
|
||||
}
|
||||
|
||||
public Task<AetheriaRuntimeStarbridgeSessionSummaryDocument> LatestSummaryAsync()
|
||||
{
|
||||
return Summary.LatestAsync();
|
||||
}
|
||||
|
||||
public AetheriaRuntimeStarbridgeSessionSummaryDocument LatestSummary()
|
||||
{
|
||||
return LatestSummaryAsync().ConfigureAwait(false).GetAwaiter().GetResult();
|
||||
}
|
||||
|
||||
public Task<AetheriaRuntimeStarbridgePlayerSeatDocument> LatestPlayerSeatAsync(string seatId)
|
||||
{
|
||||
return PlayerSeat(seatId).LatestAsync();
|
||||
}
|
||||
|
||||
public AetheriaRuntimeStarbridgePlayerSeatDocument LatestPlayerSeat(string seatId)
|
||||
{
|
||||
return LatestPlayerSeatAsync(seatId).ConfigureAwait(false).GetAwaiter().GetResult();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ namespace GameCult.Aetheria.State.Verse
|
|||
{
|
||||
if (state == null) throw new ArgumentNullException(nameof(state));
|
||||
|
||||
var frame = await state.Daemon.LatestFrame.LatestAsync().ConfigureAwait(false);
|
||||
var frame = await state.LatestDaemonFrameAsync().ConfigureAwait(false);
|
||||
if (frame == null)
|
||||
return null;
|
||||
|
||||
|
|
@ -53,7 +53,7 @@ namespace GameCult.Aetheria.State.Verse
|
|||
{
|
||||
try
|
||||
{
|
||||
return await state.Daemon.LatestSoaView.LatestAsync().ConfigureAwait(false);
|
||||
return await state.LatestDaemonSoaViewAsync().ConfigureAwait(false);
|
||||
}
|
||||
catch (KeyNotFoundException)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue