From 911bb72f69de77700d2b287533c13a9c7237dadd Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sun, 5 Jul 2026 19:56:18 +0100 Subject: [PATCH] Make game viewport authority runtime-neutral --- .../Electron/aetheria-cultmesh.ts | 10 +- .../Electron/aetheria-rts-bindings.ts | 4 +- .../aetheria-rts-generated-bindings.ts | 28 +-- .../Electron/aetheria-rts-local-documents.ts | 2 +- .../scripts/generate-rts-bindings.mjs | 38 ++-- Aetheria.State.AuthoritySmoke/Program.cs | 18 +- .../AetheriaDaemonZoneGenerator.cs | 4 +- Aetheria.State.Daemon/Program.cs | 52 +++--- Aetheria.State.Freeze/Program.cs | 20 +- Aetheria.State.Verify/Program.cs | 175 ++++++++++++------ Aetheria.State/AetheriaDocumentRegistry.cs | 2 +- .../docs/stage-7-client-surface-inventory.md | 12 +- ...-thin-client-staged-implementation-plan.md | 2 +- .../verse-authority-implementation-plan.md | 2 +- Assets/Editor/AetheriaRenderProbe.cs | 2 +- .../Gameplay/AetheriaRenderSplatRasterizer.cs | 4 +- .../AetheriaSceneRenderSplatSource.cs | 8 +- ... => AetheriaUnityGameViewportDocuments.cs} | 32 ++-- ...etheriaUnityGameViewportDocuments.cs.meta} | 0 .../AetheriaUnityRenderSplatViewportSource.cs | 10 +- .../AetheriaUnityRuntimeClientProvider.cs | 18 +- .../Tests/DaemonRuntimeDocumentTests.cs | 14 +- Assets/Scripts/UI/Menu/MapRenderer.cs | 12 +- Assets/Scripts/UI/Menu/SectorMap.cs | 2 +- Assets/Scripts/Zone Display/VolumeSampling.cs | 6 +- Assets/Scripts/Zone Display/ZoneRenderer.cs | 8 +- GameCult.Aetheria.State.Unity.csproj | 4 +- .../Runtime/AetheriaClientState.cs | 34 ++-- .../Runtime/AetheriaRuntimeAssets.cs | 4 +- .../Runtime/AetheriaRuntimeDaemonDocuments.cs | 2 +- ...AetheriaRuntimeDaemonGameSurfaceBuilder.cs | 8 +- .../AetheriaRuntimeDaemonSimulation.cs | 4 +- ...nts.cs => AetheriaRuntimeGameDocuments.cs} | 74 ++++---- ...a => AetheriaRuntimeGameDocuments.cs.meta} | 0 ...> AetheriaRuntimeGameViewportDocuments.cs} | 88 ++++----- ...heriaRuntimeGameViewportDocuments.cs.meta} | 0 ...eriaRuntimeInventoryPanelSurfaceBuilder.cs | 18 +- .../AetheriaRuntimeMainMenuSurfaceBuilder.cs | 10 +- .../AetheriaRuntimeRenderSplatDocuments.cs | 2 +- .../AetheriaRuntimeRtsSimulation.cs.meta | 2 - ...iaRuntimeTradeValuePolicySurfaceBuilder.cs | 2 +- .../AetheriaRuntimeVerseAuthorityPolicy.cs | 2 +- .../Runtime/AetheriaRuntimeVerseClient.cs | 46 ++--- docs/aetheria-perfect-machine-map.md | 4 +- docs/developer-navigation.md | 4 +- 45 files changed, 424 insertions(+), 369 deletions(-) rename Assets/Scripts/Gameplay/{AetheriaUnityRtsViewportDocuments.cs => AetheriaUnityGameViewportDocuments.cs} (74%) rename Assets/Scripts/Gameplay/{AetheriaUnityRtsViewportDocuments.cs.meta => AetheriaUnityGameViewportDocuments.cs.meta} (100%) rename Packages/org.gamecult.aetheria.state/Runtime/{AetheriaRuntimeRtsDocuments.cs => AetheriaRuntimeGameDocuments.cs} (97%) rename Packages/org.gamecult.aetheria.state/Runtime/{AetheriaRuntimeRtsDocuments.cs.meta => AetheriaRuntimeGameDocuments.cs.meta} (100%) rename Packages/org.gamecult.aetheria.state/Runtime/{AetheriaRuntimeRtsViewportDocuments.cs => AetheriaRuntimeGameViewportDocuments.cs} (92%) rename Packages/org.gamecult.aetheria.state/Runtime/{AetheriaRuntimeRtsViewportDocuments.cs.meta => AetheriaRuntimeGameViewportDocuments.cs.meta} (100%) delete mode 100644 Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeRtsSimulation.cs.meta diff --git a/Aetheria.Rts.Web/Electron/aetheria-cultmesh.ts b/Aetheria.Rts.Web/Electron/aetheria-cultmesh.ts index 7091c2b39..3fdb48fd7 100644 --- a/Aetheria.Rts.Web/Electron/aetheria-cultmesh.ts +++ b/Aetheria.Rts.Web/Electron/aetheria-cultmesh.ts @@ -17,7 +17,7 @@ import type { import { AetheriaRtsSchemas, aetheriaRuntimeEveCommandDocumentSlots, - createAetheriaRuntimeRtsDocuments, + createAetheriaRuntimeGameDocuments, createAetheriaRuntimeRtsOperationHandles, createAetheriaRuntimeRtsVerseHandles, createAetheriaRuntimeRtsQueryHandles, @@ -37,7 +37,7 @@ import { type AetheriaRuntimeRtsSurfaceCatalogDiagnostic, type AetheriaRuntimeRtsOperationHandles, type AetheriaRuntimeRtsVerseHandles, - type AetheriaRuntimeRtsDocuments, + type AetheriaRuntimeGameDocuments, type AetheriaRuntimeViewportFeedRequest, type AetheriaRuntimeViewportFeedSnapshot, type RtsSetMoveVectorRequest, @@ -234,7 +234,7 @@ export class AetheriaCultMeshClient { assetManifest: CultMesh.pollingQueryWatcher(executors.assetManifest, { intervalMs: 1000 }), }, ); - this.documents = createAetheriaRuntimeRtsDocuments( + this.documents = createAetheriaRuntimeGameDocuments( this.queryVerse.context.routeHint, { daemonFrame: async () => this.fetchLatestFrameDocument(), @@ -261,7 +261,7 @@ export class AetheriaCultMeshClient { private readonly publications: CultMeshDocumentCatalog; private readonly queryExecutors: AetheriaRuntimeRtsQueryExecutors; private readonly queries: ReturnType; - private readonly documents: AetheriaRuntimeRtsDocuments; + private readonly documents: AetheriaRuntimeGameDocuments; private readonly operations: AetheriaRuntimeRtsOperationHandles; private readonly aetheria: AetheriaRuntimeRtsVerseHandles; @@ -694,7 +694,7 @@ function composeViewport( gravity: GravityViewportResponse, ): ViewportResponse { return { - schema: "gamecult.aetheria.rts_viewport.v1", + schema: "gamecult.aetheria.game_viewport.v1", frameId: objects.frameId, publishedAtUtc: objects.publishedAtUtc, simulationTimeSeconds: objects.simulationTimeSeconds, diff --git a/Aetheria.Rts.Web/Electron/aetheria-rts-bindings.ts b/Aetheria.Rts.Web/Electron/aetheria-rts-bindings.ts index 64710a590..57a940c7d 100644 --- a/Aetheria.Rts.Web/Electron/aetheria-rts-bindings.ts +++ b/Aetheria.Rts.Web/Electron/aetheria-rts-bindings.ts @@ -5,7 +5,7 @@ export { AetheriaRtsSchemas, AetheriaRuntimeDaemonCommandKinds, aetheriaRuntimeEveCommandDocumentSlots, - createAetheriaRuntimeRtsDocuments, + createAetheriaRuntimeGameDocuments, createAetheriaRuntimeRtsOperationHandles, createAetheriaRuntimeRtsQueryHandles, createAetheriaRuntimeRtsStatePointers, @@ -19,7 +19,7 @@ export type { AetheriaRuntimeDaemonCommandReceipt, AetheriaRuntimeRtsLiveFeedDiagnostic, AetheriaRuntimeRtsDocumentResolvers, - AetheriaRuntimeRtsDocuments, + AetheriaRuntimeGameDocuments, AetheriaRuntimeRtsOperationHandles, AetheriaRuntimeRtsQueryDiagnostic, AetheriaRuntimeRtsStatePointerResolvers, diff --git a/Aetheria.Rts.Web/Electron/aetheria-rts-generated-bindings.ts b/Aetheria.Rts.Web/Electron/aetheria-rts-generated-bindings.ts index 190de6ad0..0d0035ee3 100644 --- a/Aetheria.Rts.Web/Electron/aetheria-rts-generated-bindings.ts +++ b/Aetheria.Rts.Web/Electron/aetheria-rts-generated-bindings.ts @@ -11,7 +11,7 @@ export const AetheriaRtsSchemas = { daemonFrame: "gamecult.aetheria.daemon_frame.v1", daemonHealth: "gamecult.aetheria.daemon_health.v1", assetManifest: "gamecult.aetheria.asset_manifest.v1", - rtsViewport: "gamecult.aetheria.rts_viewport.v1", + gameViewport: "gamecult.aetheria.game_viewport.v1", objectsViewport: "gamecult.aetheria.objects_viewport.v1", gravityViewport: "gamecult.aetheria.gravity_viewport.v1", renderSplatsViewport: "gamecult.aetheria.render_splats_viewport.v1", @@ -373,7 +373,7 @@ export const aetheriaRuntimeAssetManifestEntrySlots: Record = { +export const aetheriaRuntimeGameViewportDocumentSlots: Record = { schema: 0, frameId: 1, publishedAtUtc: 2, @@ -1253,20 +1253,20 @@ export const aetheriaRuntimeLoadoutItemCommitSlots: Record = { +export const aetheriaRuntimeGameViewportBoundsSlots: Record = { minX: 0, minY: 1, maxX: 2, maxY: 3, }; -export type AetheriaRuntimeRtsViewportObjectSlot = +export type AetheriaRuntimeGameViewportObjectSlot = | "entityIndex" | "entityKey" | "displayName" @@ -1287,7 +1287,7 @@ export type AetheriaRuntimeRtsViewportObjectSlot = | "inventory" | "iconAsset"; -export const aetheriaRuntimeRtsViewportObjectSlots: Record = { +export const aetheriaRuntimeGameViewportObjectSlots: Record = { entityIndex: 0, entityKey: 1, displayName: 2, @@ -2148,9 +2148,9 @@ export type AetheriaRuntimeRtsSurfaceCatalogDiagnostic = CultMeshSurfaceCatalogD export type AetheriaRuntimeRtsOperationHandles = ReturnType; -export type AetheriaRuntimeRtsDocuments = ReturnType; +export type AetheriaRuntimeGameDocuments = ReturnType; -export type AetheriaRuntimeRtsStatePointers = AetheriaRuntimeRtsDocuments; +export type AetheriaRuntimeRtsStatePointers = AetheriaRuntimeGameDocuments; export type AetheriaRuntimeRtsDocumentResolvers = Partial<{ daemonFrame: (context: CultMeshQueryContext) => Promise; @@ -2185,7 +2185,7 @@ export const AetheriaRuntimeRtsDocumentSources = { }) } as const; -export function createAetheriaRuntimeRtsDocuments( +export function createAetheriaRuntimeGameDocuments( routeHint: CultMeshRouteHint = CultMesh.routeHint(), resolvers: AetheriaRuntimeRtsDocumentResolvers = {}, ) { @@ -2238,7 +2238,7 @@ export function createAetheriaRuntimeRtsDocuments( } as const; } -export const createAetheriaRuntimeRtsStatePointers = createAetheriaRuntimeRtsDocuments; +export const createAetheriaRuntimeRtsStatePointers = createAetheriaRuntimeGameDocuments; export function createAetheriaRuntimeRtsQueryHandles( executors: AetheriaRuntimeRtsQueryExecutors, @@ -2247,7 +2247,7 @@ export function createAetheriaRuntimeRtsQueryHandles( ) { return { mapViewport: CultMesh.query( - AetheriaRtsSchemas.rtsViewport, + AetheriaRtsSchemas.gameViewport, executors.mapViewport, { routeHint, sources: [AetheriaRuntimeRtsDocumentSources.daemonFrame], watchQuery: watchers.mapViewport }, ), @@ -2319,7 +2319,7 @@ export function describeAetheriaRuntimeRtsQueryHandles( export function describeAetheriaRuntimeRtsSurfaceCatalog( handles: ReturnType, operations?: AetheriaRuntimeRtsOperationHandles, - documents: AetheriaRuntimeRtsDocuments = createAetheriaRuntimeRtsDocuments(), + documents: AetheriaRuntimeGameDocuments = createAetheriaRuntimeGameDocuments(), ): AetheriaRuntimeRtsSurfaceCatalogDiagnostic { return CultMesh.describeSurfaceCatalog( "gamecult.aetheria.rts.surfaces.v1", @@ -2414,7 +2414,7 @@ export function createAetheriaRuntimeRtsVerseHandles( commandVerse: CultMeshVerseContext, queries: ReturnType, operations: AetheriaRuntimeRtsOperationHandles, - documents: AetheriaRuntimeRtsDocuments = createAetheriaRuntimeRtsDocuments(), + documents: AetheriaRuntimeGameDocuments = createAetheriaRuntimeGameDocuments(), ) { const mapViewport = CultMesh.bindQuery(queryVerse, queries.mapViewport); const objectsViewport = CultMesh.bindQuery(queryVerse, queries.objectsViewport); diff --git a/Aetheria.Rts.Web/Electron/aetheria-rts-local-documents.ts b/Aetheria.Rts.Web/Electron/aetheria-rts-local-documents.ts index d675d78e7..027f0060a 100644 --- a/Aetheria.Rts.Web/Electron/aetheria-rts-local-documents.ts +++ b/Aetheria.Rts.Web/Electron/aetheria-rts-local-documents.ts @@ -48,7 +48,7 @@ export function buildViewportDocumentFromFrame(frameDocument: unknown, request: const objects = buildObjectsViewportDocumentFromFrame(frameDocument, request); const gravity = buildGravityViewportDocumentFromFrame(frameDocument, request); return { - schema: AetheriaRtsSchemas.rtsViewport, + schema: AetheriaRtsSchemas.gameViewport, frameId: objects.frameId, publishedAtUtc: objects.publishedAtUtc, simulationTimeSeconds: objects.simulationTimeSeconds, diff --git a/Aetheria.Rts.Web/scripts/generate-rts-bindings.mjs b/Aetheria.Rts.Web/scripts/generate-rts-bindings.mjs index 0869b2d2c..ac22fcbcf 100644 --- a/Aetheria.Rts.Web/scripts/generate-rts-bindings.mjs +++ b/Aetheria.Rts.Web/scripts/generate-rts-bindings.mjs @@ -13,7 +13,7 @@ const sources = [ resolve(repoRoot, "Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeDaemonRenderQueries.cs"), resolve(repoRoot, "Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeDaemonTradeItemQueries.cs"), resolve(repoRoot, "Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeSnapshotDocuments.cs"), - resolve(repoRoot, "Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeRtsViewportDocuments.cs"), + resolve(repoRoot, "Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeGameViewportDocuments.cs"), resolve(repoRoot, "Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeRenderSplatDocuments.cs"), resolve(repoRoot, "Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeStarbridgeDocuments.cs"), resolve(repoRoot, "Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeVerseAuthorityPolicy.cs"), @@ -98,9 +98,9 @@ const documents = [ className: "AetheriaRuntimeAssetManifestEntry", }, { - exportName: "aetheriaRuntimeRtsViewportDocument", - className: "AetheriaRuntimeRtsViewportDocument", - schemaName: "rtsViewport", + exportName: "aetheriaRuntimeGameViewportDocument", + className: "AetheriaRuntimeGameViewportDocument", + schemaName: "gameViewport", }, { exportName: "aetheriaRuntimeObjectsViewportDocument", @@ -230,28 +230,28 @@ const documents = [ className: "AetheriaRuntimeLoadoutItemCommit", }, { - exportName: "aetheriaRuntimeRtsViewportBounds", - className: "AetheriaRuntimeRtsViewportBounds", + exportName: "aetheriaRuntimeGameViewportBounds", + className: "AetheriaRuntimeViewportBounds", }, { - exportName: "aetheriaRuntimeRtsViewportObject", - className: "AetheriaRuntimeRtsViewportObject", + exportName: "aetheriaRuntimeGameViewportObject", + className: "AetheriaRuntimeViewportObject", }, { exportName: "aetheriaRuntimeRtsEntityStatus", - className: "AetheriaRuntimeRtsEntityStatus", + className: "AetheriaRuntimeEntityStatus", }, { exportName: "aetheriaRuntimeRtsInventoryItem", - className: "AetheriaRuntimeRtsInventoryItem", + className: "AetheriaRuntimeInventoryItem", }, { exportName: "aetheriaRuntimeRtsGravityInfluence", - className: "AetheriaRuntimeRtsGravityInfluence", + className: "AetheriaRuntimeGravityInfluence", }, { exportName: "aetheriaRuntimeRtsBodyView", - className: "AetheriaRuntimeRtsBodyView", + className: "AetheriaRuntimeBodyView", }, { exportName: "aetheriaRuntimeStarbridgeScenarioDocument", @@ -664,9 +664,9 @@ export type AetheriaRuntimeRtsSurfaceCatalogDiagnostic = CultMeshSurfaceCatalogD export type AetheriaRuntimeRtsOperationHandles = ReturnType; -export type AetheriaRuntimeRtsDocuments = ReturnType; +export type AetheriaRuntimeGameDocuments = ReturnType; -export type AetheriaRuntimeRtsStatePointers = AetheriaRuntimeRtsDocuments; +export type AetheriaRuntimeRtsStatePointers = AetheriaRuntimeGameDocuments; export type AetheriaRuntimeRtsDocumentResolvers = Partial<{ daemonFrame: (context: CultMeshQueryContext) => Promise; @@ -701,7 +701,7 @@ export const AetheriaRuntimeRtsDocumentSources = { }) } as const; -export function createAetheriaRuntimeRtsDocuments( +export function createAetheriaRuntimeGameDocuments( routeHint: CultMeshRouteHint = CultMesh.routeHint(), resolvers: AetheriaRuntimeRtsDocumentResolvers = {}, ) { @@ -754,7 +754,7 @@ export function createAetheriaRuntimeRtsDocuments( } as const; } -export const createAetheriaRuntimeRtsStatePointers = createAetheriaRuntimeRtsDocuments; +export const createAetheriaRuntimeRtsStatePointers = createAetheriaRuntimeGameDocuments; export function createAetheriaRuntimeRtsQueryHandles( executors: AetheriaRuntimeRtsQueryExecutors, @@ -763,7 +763,7 @@ export function createAetheriaRuntimeRtsQueryHandles( ) { return { mapViewport: CultMesh.query( - AetheriaRtsSchemas.rtsViewport, + AetheriaRtsSchemas.gameViewport, executors.mapViewport, { routeHint, sources: [AetheriaRuntimeRtsDocumentSources.daemonFrame], watchQuery: watchers.mapViewport }, ), @@ -835,7 +835,7 @@ export function describeAetheriaRuntimeRtsQueryHandles( export function describeAetheriaRuntimeRtsSurfaceCatalog( handles: ReturnType, operations?: AetheriaRuntimeRtsOperationHandles, - documents: AetheriaRuntimeRtsDocuments = createAetheriaRuntimeRtsDocuments(), + documents: AetheriaRuntimeGameDocuments = createAetheriaRuntimeGameDocuments(), ): AetheriaRuntimeRtsSurfaceCatalogDiagnostic { return CultMesh.describeSurfaceCatalog( "gamecult.aetheria.rts.surfaces.v1", @@ -930,7 +930,7 @@ export function createAetheriaRuntimeRtsVerseHandles( commandVerse: CultMeshVerseContext, queries: ReturnType, operations: AetheriaRuntimeRtsOperationHandles, - documents: AetheriaRuntimeRtsDocuments = createAetheriaRuntimeRtsDocuments(), + documents: AetheriaRuntimeGameDocuments = createAetheriaRuntimeGameDocuments(), ) { const mapViewport = CultMesh.bindQuery(queryVerse, queries.mapViewport); const objectsViewport = CultMesh.bindQuery(queryVerse, queries.objectsViewport); diff --git a/Aetheria.State.AuthoritySmoke/Program.cs b/Aetheria.State.AuthoritySmoke/Program.cs index cb0942c1b..d4a8e3db7 100644 --- a/Aetheria.State.AuthoritySmoke/Program.cs +++ b/Aetheria.State.AuthoritySmoke/Program.cs @@ -389,25 +389,25 @@ internal sealed class AuthoritySmokeChecks 0.24, 0.02); - var viewportDocument = AetheriaRuntimeRtsDocuments.Viewport( + var viewportDocument = AetheriaRuntimeGameDocuments.Viewport( frame, - new AetheriaRuntimeRtsViewportBounds + new AetheriaRuntimeViewportBounds { MinX = 500, MinY = -100, MaxX = -50, MaxY = 100 }); - var objectsViewport = AetheriaRuntimeRtsDocuments.ObjectsViewport( + var objectsViewport = AetheriaRuntimeGameDocuments.ObjectsViewport( frame, viewportDocument.Viewport); - var gravityViewport = AetheriaRuntimeRtsDocuments.GravityViewport( + var gravityViewport = AetheriaRuntimeGameDocuments.GravityViewport( frame, viewportDocument.Viewport); - var currentZone = AetheriaRuntimeRtsDocuments.CurrentZone(frame); - var sectorMap = AetheriaRuntimeRtsDocuments.SectorMap(frame); + var currentZone = AetheriaRuntimeGameDocuments.CurrentZone(frame); + var sectorMap = AetheriaRuntimeGameDocuments.SectorMap(frame); - RequireEqual(AetheriaRuntimeDaemonSchemas.RtsViewport, viewportDocument.Schema, "viewport document schema"); + RequireEqual(AetheriaRuntimeDaemonSchemas.GameViewport, viewportDocument.Schema, "viewport document schema"); RequireEqual(AetheriaRuntimeDaemonSchemas.ObjectsViewport, objectsViewport.Schema, "objects viewport document schema"); RequireEqual(AetheriaRuntimeDaemonSchemas.GravityViewport, gravityViewport.Schema, "gravity viewport document schema"); RequireEqual(AetheriaRuntimeDaemonSchemas.CurrentZone, currentZone.Schema, "current-zone document schema"); @@ -661,9 +661,9 @@ internal sealed class AuthoritySmokeChecks .OpenAsync(statePath, "raven-unity", sessionId: "state-documents-session", pullOnOpen: true) .ConfigureAwait(false); var state = client.State; - var viewportBounds = new AetheriaRuntimeRtsViewportBounds { MinX = -20, MinY = -20, MaxX = 150, MaxY = 20 }; + var viewportBounds = new AetheriaRuntimeViewportBounds { MinX = -20, MinY = -20, MaxX = 150, MaxY = 20 }; var viewport = await state - .RtsViewport(viewportBounds) + .GameViewport(viewportBounds) .LatestAsync() .ConfigureAwait(false); Require(viewport.Objects.Any(item => item.DisplayName == "Document Raven"), "managed map document should include controlled object"); diff --git a/Aetheria.State.Daemon/AetheriaDaemonZoneGenerator.cs b/Aetheria.State.Daemon/AetheriaDaemonZoneGenerator.cs index e7781a5fc..b643429fd 100644 --- a/Aetheria.State.Daemon/AetheriaDaemonZoneGenerator.cs +++ b/Aetheria.State.Daemon/AetheriaDaemonZoneGenerator.cs @@ -5,7 +5,7 @@ using GameCult.Caching; internal static class AetheriaDaemonZoneGenerator { - public const string RunId = "local-rts"; + public const string RunId = "local-starbridge"; public const uint GenerationSeed = 0xA37E_2026u; public static async Task WritePlayableRunAsync( @@ -25,7 +25,7 @@ internal static class AetheriaDaemonZoneGenerator .ReadAsync() .ConfigureAwait(false) ?? new AetheriaPlayerSettings(); settings.ActiveRunKey = runKey.ToString(); - settings.PlayerName = string.IsNullOrWhiteSpace(settings.PlayerName) ? "Codex RTS" : settings.PlayerName; + settings.PlayerName = string.IsNullOrWhiteSpace(settings.PlayerName) ? "Starbridge Commander" : settings.PlayerName; settings.TutorialPassed = true; settings.LastUpdatedAtUtc = now; await node.MutableDocument(AetheriaStateNode.PlayerSettingsKey) diff --git a/Aetheria.State.Daemon/Program.cs b/Aetheria.State.Daemon/Program.cs index a6ce7564d..7dcd1c371 100644 --- a/Aetheria.State.Daemon/Program.cs +++ b/Aetheria.State.Daemon/Program.cs @@ -127,7 +127,7 @@ static async Task TickAsync( var sessionId = string.IsNullOrWhiteSpace(currentFrame?.SessionId) ? options.SessionId : currentFrame.SessionId; - var run = HasPlayableRun(currentFrame?.Run) && HasRtsScenario(currentFrame?.Run) + var run = HasPlayableRun(currentFrame?.Run) && HasStarbridgeScenario(currentFrame?.Run) ? currentFrame!.Run : await ReadRuntimeRunCheckpointAsync(node, options.RenderSettings).ConfigureAwait(false) ?? new AetheriaRuntimeRunCheckpointCommit(); ApplyDaemonRenderSettings(run, options.RenderSettings); @@ -543,7 +543,7 @@ static RudpCultNetSchemaServer StartClientCultMeshHost( .ToArray(); } - if (hasFrame && frame != null && TryGetRtsViewportRequest(request, out var viewportRecordKey, out var viewportSchemaId, out var viewport)) + if (hasFrame && frame != null && TryGetGameViewportRequest(request, out var viewportRecordKey, out var viewportSchemaId, out var viewport)) { if (string.Equals(viewportSchemaId, AetheriaRuntimeDaemonSchemas.ObjectsViewport, StringComparison.Ordinal)) { @@ -551,7 +551,7 @@ static RudpCultNetSchemaServer StartClientCultMeshHost( response.MessageId, new CultRecordHandle( new CultRecordKey(viewportRecordKey)), - AetheriaRuntimeRtsDocuments.ObjectsViewport(frame, viewport), + AetheriaRuntimeGameDocuments.ObjectsViewport(frame, viewport), new CultNetDocumentMessageOptions { SourceRuntimeId = options.DaemonId, @@ -569,7 +569,7 @@ static RudpCultNetSchemaServer StartClientCultMeshHost( response.MessageId, new CultRecordHandle( new CultRecordKey(viewportRecordKey)), - AetheriaRuntimeRtsDocuments.GravityViewport(frame, viewport), + AetheriaRuntimeGameDocuments.GravityViewport(frame, viewport), new CultNetDocumentMessageOptions { SourceRuntimeId = options.DaemonId, @@ -587,7 +587,7 @@ static RudpCultNetSchemaServer StartClientCultMeshHost( response.MessageId, new CultRecordHandle( new CultRecordKey(viewportRecordKey)), - AetheriaRuntimeRtsDocuments.RenderSplatsViewport(frame, viewport), + AetheriaRuntimeGameDocuments.RenderSplatsViewport(frame, viewport), new CultNetDocumentMessageOptions { SourceRuntimeId = options.DaemonId, @@ -603,9 +603,9 @@ static RudpCultNetSchemaServer StartClientCultMeshHost( { var viewportPut = node.Database.Documents.CreateRawDocumentPutMessage( response.MessageId, - new CultRecordHandle( + new CultRecordHandle( new CultRecordKey(viewportRecordKey)), - AetheriaRuntimeRtsDocuments.Viewport(frame, viewport), + AetheriaRuntimeGameDocuments.Viewport(frame, viewport), new CultNetDocumentMessageOptions { SourceRuntimeId = options.DaemonId, @@ -924,21 +924,21 @@ static bool SnapshotWants( return schemaMatches && recordMatches; } -static bool TryGetRtsViewportRequest( +static bool TryGetGameViewportRequest( CultNetSnapshotRequestMessage request, out string recordKey, out string schemaId, - out AetheriaRuntimeRtsViewportBounds viewport) + out AetheriaRuntimeViewportBounds viewport) { - const string prefix = "daemon:aetheria.rts.viewport.v1;"; + const string prefix = "daemon:aetheria.game.viewport.v1;"; recordKey = ""; schemaId = ""; - viewport = new AetheriaRuntimeRtsViewportBounds(); + viewport = new AetheriaRuntimeViewportBounds(); var schemaIds = request.SchemaIds ?? Array.Empty(); var allowedSchemas = new[] { - AetheriaRuntimeDaemonSchemas.RtsViewport, + AetheriaRuntimeDaemonSchemas.GameViewport, AetheriaRuntimeDaemonSchemas.ObjectsViewport, AetheriaRuntimeDaemonSchemas.GravityViewport, AetheriaRuntimeDaemonSchemas.RenderSplatsViewport @@ -966,8 +966,8 @@ static bool TryGetRtsViewportRequest( recordKey = candidate; schemaId = schemaIds.FirstOrDefault(known => allowedSchemas.Contains(known, StringComparer.Ordinal)) - ?? AetheriaRuntimeDaemonSchemas.RtsViewport; - viewport = new AetheriaRuntimeRtsViewportBounds + ?? AetheriaRuntimeDaemonSchemas.GameViewport; + viewport = new AetheriaRuntimeViewportBounds { MinX = Math.Min(minX, maxX), MinY = Math.Min(minY, maxY), @@ -994,10 +994,10 @@ static bool TryGetRtsViewportRequest( static bool TryGetManagedViewportRequest( string recordKey, out string schemaId, - out AetheriaRuntimeRtsViewportBounds viewport) + out AetheriaRuntimeViewportBounds viewport) { schemaId = ""; - viewport = new AetheriaRuntimeRtsViewportBounds(); + viewport = new AetheriaRuntimeViewportBounds(); var prefix = ""; if (recordKey.StartsWith("aetheria.viewport.objects.", StringComparison.Ordinal)) { @@ -1029,7 +1029,7 @@ static bool TryGetManagedViewportRequest( return false; } - viewport = new AetheriaRuntimeRtsViewportBounds + viewport = new AetheriaRuntimeViewportBounds { MinX = Math.Min(minX, maxX), MinY = Math.Min(minY, maxY), @@ -1142,8 +1142,8 @@ static async Task PublishDaemonMenuSurfacesAsync( "cultmesh://aetheria/assets"); var loadoutTemplates = AetheriaRuntimeCatalogStore.ReadLoadoutTemplates(node.StatePath); var playerSettings = await ReadRuntimePlayerSettingsAsync(node).ConfigureAwait(false); - var currentEntity = AetheriaRuntimeRtsDocuments.CurrentEntity(frame); - var stationRefit = AetheriaRuntimeRtsDocuments.StationRefit(frame, loadoutTemplates, catalog); + var currentEntity = AetheriaRuntimeGameDocuments.CurrentEntity(frame); + var stationRefit = AetheriaRuntimeGameDocuments.StationRefit(frame, loadoutTemplates, catalog); var dropdownRequest = new AetheriaRuntimeInventoryDropdownSurfaceRequest { CurrentView = "Current Entity", @@ -1165,7 +1165,7 @@ static async Task PublishDaemonMenuSurfacesAsync( }; var inventory = currentEntity.EntityIndex < 0 ? new AetheriaRuntimeInventoryDocument() - : AetheriaRuntimeRtsDocuments.Inventory(frame, currentEntity.EntityIndex); + : AetheriaRuntimeGameDocuments.Inventory(frame, currentEntity.EntityIndex); var verseHost = await EnsureVerseHostSettingsAsync(node, options, updatedAtUtc) .ConfigureAwait(false); @@ -1227,8 +1227,8 @@ static async Task PublishDaemonMenuSurfacesAsync( dropdownRequest, updatedAtUtc); var mapMenu = AetheriaRuntimeZoneDetailsSurfaceBuilder.BuildFromDocuments( - AetheriaRuntimeRtsDocuments.ZoneDetails(frame, currentEntity.ZoneIndex), - AetheriaRuntimeRtsDocuments.SectorMap(frame), + AetheriaRuntimeGameDocuments.ZoneDetails(frame, currentEntity.ZoneIndex), + AetheriaRuntimeGameDocuments.SectorMap(frame), catalog, playerSettings, updatedAtUtc); @@ -1784,7 +1784,7 @@ static async Task EnsurePlayableRunDocumentsAsync( if (!string.IsNullOrWhiteSpace(settings?.ActiveRunKey)) { var existingRun = await ReadRuntimeRunCheckpointAsync(node, options.RenderSettings).ConfigureAwait(false); - if (HasPlayableRun(existingRun) && HasRtsScenario(existingRun)) + if (HasPlayableRun(existingRun) && HasStarbridgeScenario(existingRun)) return; } @@ -1809,7 +1809,7 @@ static async Task EnsureStarbridgeSessionDocumentsAsync( return; } - const string runId = "local-rts"; + const string runId = "local-starbridge"; var baseEntityKey = EntityKey(runId, 0, 0); var pilotOneKey = EntityKey(runId, 0, 1); var pilotTwoKey = EntityKey(runId, 0, 2); @@ -1893,7 +1893,7 @@ static async Task EnsureStarbridgeSessionDocumentsAsync( [ new AetheriaRuntimeStarbridgeRuntimeRole { - RuntimeId = "starfire-rts", + RuntimeId = "starbridge-daemon", Role = "commander" }, new AetheriaRuntimeStarbridgeRuntimeRole @@ -2241,7 +2241,7 @@ static bool HasPlayableRun(AetheriaRuntimeRunCheckpointCommit? run) .Any(zone => (zone.Entities ?? Array.Empty()).Count > 0); } -static bool HasRtsScenario(AetheriaRuntimeRunCheckpointCommit? run) +static bool HasStarbridgeScenario(AetheriaRuntimeRunCheckpointCommit? run) { var zones = run?.Zones ?? Array.Empty(); var entities = zones.SelectMany(zone => zone.Entities ?? Array.Empty()).ToArray(); diff --git a/Aetheria.State.Freeze/Program.cs b/Aetheria.State.Freeze/Program.cs index 1ae4b11fc..55af43f4d 100644 --- a/Aetheria.State.Freeze/Program.cs +++ b/Aetheria.State.Freeze/Program.cs @@ -110,24 +110,24 @@ static async Task ExportFixtureSetAsync( if (await TryReadAsync(() => node.LatestSoaView().ReadAsync()).ConfigureAwait(false) is { } soaView) WriteArtifact(outputDirectory, manifest, "daemon-soa-view.latest", AetheriaRuntimeDaemonSchemas.SoaView, soaView); - var viewport = new AetheriaRuntimeRtsViewportBounds + var viewport = new AetheriaRuntimeViewportBounds { MinX = options.ViewportMinX, MinY = options.ViewportMinY, MaxX = options.ViewportMaxX, MaxY = options.ViewportMaxY }; - WriteArtifact(outputDirectory, manifest, "document.rts-viewport", AetheriaRuntimeDaemonSchemas.RtsViewport, AetheriaRuntimeRtsDocuments.Viewport(frame, viewport)); - WriteArtifact(outputDirectory, manifest, "document.objects-viewport", AetheriaRuntimeDaemonSchemas.ObjectsViewport, AetheriaRuntimeRtsDocuments.ObjectsViewport(frame, viewport)); - WriteArtifact(outputDirectory, manifest, "document.gravity-viewport", AetheriaRuntimeDaemonSchemas.GravityViewport, AetheriaRuntimeRtsDocuments.GravityViewport(frame, viewport)); - WriteArtifact(outputDirectory, manifest, "document.current-zone", AetheriaRuntimeDaemonSchemas.CurrentZone, AetheriaRuntimeRtsDocuments.CurrentZone(frame)); - WriteArtifact(outputDirectory, manifest, "document.current-entity", AetheriaRuntimeDaemonSchemas.CurrentEntity, AetheriaRuntimeRtsDocuments.CurrentEntity(frame)); - WriteArtifact(outputDirectory, manifest, "document.sector-map", AetheriaRuntimeDaemonSchemas.SectorMap, AetheriaRuntimeRtsDocuments.SectorMap(frame)); - WriteArtifact(outputDirectory, manifest, "document.zone-render", AetheriaRuntimeDaemonSchemas.ZoneRender, AetheriaRuntimeRtsDocuments.ZoneRender(frame)); + WriteArtifact(outputDirectory, manifest, "document.rts-viewport", AetheriaRuntimeDaemonSchemas.GameViewport, AetheriaRuntimeGameDocuments.Viewport(frame, viewport)); + WriteArtifact(outputDirectory, manifest, "document.objects-viewport", AetheriaRuntimeDaemonSchemas.ObjectsViewport, AetheriaRuntimeGameDocuments.ObjectsViewport(frame, viewport)); + WriteArtifact(outputDirectory, manifest, "document.gravity-viewport", AetheriaRuntimeDaemonSchemas.GravityViewport, AetheriaRuntimeGameDocuments.GravityViewport(frame, viewport)); + WriteArtifact(outputDirectory, manifest, "document.current-zone", AetheriaRuntimeDaemonSchemas.CurrentZone, AetheriaRuntimeGameDocuments.CurrentZone(frame)); + WriteArtifact(outputDirectory, manifest, "document.current-entity", AetheriaRuntimeDaemonSchemas.CurrentEntity, AetheriaRuntimeGameDocuments.CurrentEntity(frame)); + WriteArtifact(outputDirectory, manifest, "document.sector-map", AetheriaRuntimeDaemonSchemas.SectorMap, AetheriaRuntimeGameDocuments.SectorMap(frame)); + WriteArtifact(outputDirectory, manifest, "document.zone-render", AetheriaRuntimeDaemonSchemas.ZoneRender, AetheriaRuntimeGameDocuments.ZoneRender(frame)); var selectedEntityIndex = ResolveSelectedEntityIndex(frame); - WriteArtifact(outputDirectory, manifest, "document.selected-object", AetheriaRuntimeDaemonSchemas.SelectedObject, AetheriaRuntimeRtsDocuments.SelectedObject(frame, selectedEntityIndex)); - WriteArtifact(outputDirectory, manifest, "document.inventory", AetheriaRuntimeDaemonSchemas.Inventory, AetheriaRuntimeRtsDocuments.Inventory(frame, selectedEntityIndex)); + WriteArtifact(outputDirectory, manifest, "document.selected-object", AetheriaRuntimeDaemonSchemas.SelectedObject, AetheriaRuntimeGameDocuments.SelectedObject(frame, selectedEntityIndex)); + WriteArtifact(outputDirectory, manifest, "document.inventory", AetheriaRuntimeDaemonSchemas.Inventory, AetheriaRuntimeGameDocuments.Inventory(frame, selectedEntityIndex)); WriteJson(Path.Combine(outputDirectory, "manifest.json"), manifest); } diff --git a/Aetheria.State.Verify/Program.cs b/Aetheria.State.Verify/Program.cs index d0434abc0..9d877d891 100644 --- a/Aetheria.State.Verify/Program.cs +++ b/Aetheria.State.Verify/Program.cs @@ -1348,7 +1348,7 @@ static void RequireNoScopedReactiveFacadeWrappers(string root) "ReactiveCatalogSnapshot(", "ReactivePlayerSettingsDocument(", "ReactiveEveSurface(", - "ReactiveRtsViewport(", + "ReactiveGameViewport(", "ReactiveObjectsViewport(", "ReactiveGravityViewport(", "ReactiveRenderSplatsViewport(", @@ -2545,7 +2545,7 @@ static void RequireDaemonRenderQueryAuthority(string root) "foreach (var bodyPose in _zoneRenderBodyPoses ?? Array.Empty())", "ResolveDaemonRenderViewport()", "private AetheriaRuntimeXzRect ResolveDaemonRenderViewport()", - "private static AetheriaRuntimeRtsViewportBounds ToViewportBounds(AetheriaRuntimeXzRect viewport)", + "private static AetheriaRuntimeViewportBounds ToViewportBounds(AetheriaRuntimeXzRect viewport)", "private void UnloadBodyView(string bodyKey)", "foreach (var pose in _daemonBodyPoses)", "LoadPlanet(body)", @@ -2567,7 +2567,7 @@ static void RequireDaemonRenderQueryAuthority(string root) "private AetheriaRuntimeObjectsViewportDocument ResolveObjectsViewport(AetheriaRuntimeXzRect viewport)", ".ZonePresentationDocuments(viewportBounds, \"unity-zone-renderer\")", "_zonePresentationDocuments.CurrentObjectsViewport", - "foreach (var entity in objects?.Objects ?? Array.Empty())", + "foreach (var entity in objects?.Objects ?? Array.Empty())", "_observedEntitySnapshotsByDaemonIndex.TryGetValue(entityIndex, out var entity)", "Loading entity {entity.Name} from daemon presentation query", "UnloadEntity(pair.Value.Entity)", @@ -6887,13 +6887,13 @@ static void RequireStationRefitDockingBaysUseTypedDocuments(string root) "Packages", "org.gamecult.aetheria.state", "Runtime", - "AetheriaRuntimeRtsViewportDocuments.cs"); + "AetheriaRuntimeGameViewportDocuments.cs"); var runtimeDocumentsFactoryPath = Path.Combine( root, "Packages", "org.gamecult.aetheria.state", "Runtime", - "AetheriaRuntimeRtsDocuments.cs"); + "AetheriaRuntimeGameDocuments.cs"); var inventoryPanelPath = Path.Combine(root, "Assets", "Scripts", "UI", "Menu", "InventoryPanel.cs"); var inventoryMenuPath = Path.Combine(root, "Assets", "Scripts", "UI", "Menu", "InventoryMenu.cs"); @@ -7365,21 +7365,21 @@ static void RequireInventoryDocumentSlotIdentity(string root) "Packages", "org.gamecult.aetheria.state", "Runtime", - "AetheriaRuntimeRtsDocuments.cs"); + "AetheriaRuntimeGameDocuments.cs"); var viewportDocumentsPath = Path.Combine( root, "Packages", "org.gamecult.aetheria.state", "Runtime", - "AetheriaRuntimeRtsViewportDocuments.cs"); + "AetheriaRuntimeGameViewportDocuments.cs"); if (!File.Exists(documentsFactoryPath)) { - throw new InvalidOperationException("Cannot verify inventory document slot identity; AetheriaRuntimeRtsDocuments.cs is missing."); + throw new InvalidOperationException("Cannot verify inventory document slot identity; AetheriaRuntimeGameDocuments.cs is missing."); } if (!File.Exists(viewportDocumentsPath)) { - throw new InvalidOperationException("Cannot verify inventory document slot identity; AetheriaRuntimeRtsViewportDocuments.cs is missing."); + throw new InvalidOperationException("Cannot verify inventory document slot identity; AetheriaRuntimeGameViewportDocuments.cs is missing."); } var documentsFactory = File.ReadAllText(documentsFactoryPath); @@ -7406,7 +7406,7 @@ static void RequireInventoryDocumentSlotIdentity(string root) var requiredDocumentSymbols = new[] { - "public sealed class AetheriaRuntimeRtsInventoryItem", + "public sealed class AetheriaRuntimeInventoryItem", "[Key(6)]", "public int SourceIndex { get; set; } = -1;", "[Key(7)]", @@ -8013,7 +8013,7 @@ static void RequireUnitySharedDocumentAccessorErgonomics(string root) "MapRenderer.cs")); var requiredMapRendererSharedDocumentSymbols = new[] { - "AetheriaUnityRtsViewportDocuments _viewportDocuments", + "AetheriaUnityGameViewportDocuments _viewportDocuments", "ClearViewportCaches()", "_viewportDocuments?.Dispose()", "_viewportDocuments?.CurrentObjectsViewport", @@ -8435,7 +8435,7 @@ static void RequireUnitySharedDocumentAccessorErgonomics(string root) { "AetheriaUnityRuntimeClientProvider.RuntimeState(\"unity-zone-renderer\")", "_runtimeState.Catalog.Latest()", - "AetheriaUnityRtsViewportDocuments _zonePresentationDocuments", + "AetheriaUnityGameViewportDocuments _zonePresentationDocuments", ".ZonePresentationDocuments(", "_zonePresentationDocuments?.Dispose()", "_zonePresentationDocuments?.CurrentContacts", @@ -8579,7 +8579,7 @@ static void RequireUnityViewportAndMapReadsUseManagedAccessors(string root) "AetheriaUnityRenderSplatViewportSource.cs")); var requiredRenderSplatViewportSourceSymbols = new[] { - "AetheriaUnityRtsViewportDocuments _viewportDocuments", + "AetheriaUnityGameViewportDocuments _viewportDocuments", "_viewportDocuments?.CurrentRenderSplatsViewport", "ClearViewportDocument()" }; @@ -8619,7 +8619,7 @@ static void RequireUnityViewportAndMapReadsUseManagedAccessors(string root) "ZoneRenderer.cs")); var requiredZoneRendererViewportSymbols = new[] { - "AetheriaUnityRtsViewportDocuments _zonePresentationDocuments", + "AetheriaUnityGameViewportDocuments _zonePresentationDocuments", "_zonePresentationDocuments.CurrentObjectsViewport", "_zonePresentationDocuments?.Dispose()" }; @@ -8723,7 +8723,7 @@ static void RequireAetheriaManagedStateAccessorsCoverDomainDocuments(string root "public CultMeshDocumentHandle PlayerSettings { get; }", "public static bool TryResolveEveSurface(", "public CultMeshDocumentHandle? EveSurfaceDocument(", - "public CultMeshDocumentHandle RtsViewport(", + "public CultMeshDocumentHandle GameViewport(", "public CultMeshDocumentHandle ObjectsViewport(", "public CultMeshDocumentHandle GravityViewport(", "public CultMeshDocumentHandle RenderSplatsViewport(", @@ -8771,7 +8771,7 @@ static void RequireAetheriaManagedStateAccessorsCoverDomainDocuments(string root "public CultMeshReactiveDocument ReactiveStarbridgeSession()", "public CultMeshReactiveDocument ReactiveStarbridgeSummary()", "public CultMeshReactiveDocument? ReactiveEveSurface(", - "public CultMeshReactiveDocument ReactiveRtsViewport(", + "public CultMeshReactiveDocument ReactiveGameViewport(", "public CultMeshReactiveDocument ReactiveObjectsViewport(", "public CultMeshReactiveDocument ReactiveGravityViewport(", "public CultMeshReactiveDocument ReactiveRenderSplatsViewport(", @@ -8834,7 +8834,7 @@ static void RequireAetheriaManagedStateAccessorsCoverDomainDocuments(string root "public AetheriaRuntimeStationRefitDocument CurrentStationRefit()", "public AetheriaRuntimeSectorMapDocument CurrentSectorMap()", "public AetheriaRuntimeZoneRenderDocument CurrentZoneRender()", - "public AetheriaRuntimeRtsViewportDocument CurrentRtsViewport(", + "public AetheriaRuntimeGameViewportDocument CurrentGameViewport(", "public AetheriaRuntimeObjectsViewportDocument CurrentObjectsViewport(", "public AetheriaRuntimeGravityViewportDocument CurrentGravityViewport(", "public AetheriaRuntimeRenderSplatsViewportDocument CurrentRenderSplatsViewport(", @@ -13689,10 +13689,10 @@ static void RequireMainMenuContinueRunState(string root) "Unity still owns daemon entity snapshot projection; package runtime should lower typed daemon entity snapshots."); } - var zoneRenderDocumentsPath = Path.Combine(root, "Packages", "org.gamecult.aetheria.state", "Runtime", "AetheriaRuntimeRtsViewportDocuments.cs"); + var zoneRenderDocumentsPath = Path.Combine(root, "Packages", "org.gamecult.aetheria.state", "Runtime", "AetheriaRuntimeGameViewportDocuments.cs"); var zoneRenderDocuments = File.Exists(zoneRenderDocumentsPath) ? File.ReadAllText(zoneRenderDocumentsPath) - : throw new InvalidOperationException("Cannot verify Continue entity snapshot access; AetheriaRuntimeRtsViewportDocuments.cs is missing."); + : throw new InvalidOperationException("Cannot verify Continue entity snapshot access; AetheriaRuntimeGameViewportDocuments.cs is missing."); var daemonEntitySnapshotProjectorPath = Path.Combine(root, "Packages", "org.gamecult.aetheria.state", "Runtime", "AetheriaRuntimeEntitySnapshotProjector.cs"); if (File.Exists(daemonEntitySnapshotProjectorPath)) { @@ -14035,7 +14035,7 @@ static void RequireMainMenuContinueRunState(string root) "_lastAppliedAuthoritativeDaemonRunId", "_lastAppliedAuthoritativeDaemonZoneIndex", "private bool TryRestoreEntityGraphFromZoneRender(", - "AetheriaRuntimeRtsDocuments.ZoneRender(observed.Frame)", + "AetheriaRuntimeGameDocuments.ZoneRender(observed.Frame)", "AetheriaRuntimeEntitySnapshotProjector.CreateSnapshots(runId, daemonZone)", "ObservedEntityRestorer.TryApplyInPlace(", "ObservedEntityRestorer.Replace(entitySnapshots, currentEntityKey, Zone)", @@ -14617,7 +14617,7 @@ static void RequireUnityObserverDoesNotTickLocalSimulation(string root) var daemonOperationClientPath = Path.Combine(root, "Packages", "org.gamecult.aetheria.state", "Runtime", "AetheriaRuntimeDaemonOperationClient.cs"); var daemonRuntimeOperationsPath = Path.Combine(root, "Packages", "org.gamecult.aetheria.state", "Runtime", "AetheriaRuntimeDaemonOperations.cs"); var daemonIntentPath = Path.Combine(root, "Packages", "org.gamecult.aetheria.state", "Runtime", "AetheriaRuntimeDaemonIntentState.cs"); - var zoneRenderDocumentsPath = Path.Combine(root, "Packages", "org.gamecult.aetheria.state", "Runtime", "AetheriaRuntimeRtsViewportDocuments.cs"); + var zoneRenderDocumentsPath = Path.Combine(root, "Packages", "org.gamecult.aetheria.state", "Runtime", "AetheriaRuntimeGameViewportDocuments.cs"); var daemonObserverPath = Path.Combine(root, "Assets", "Scripts", "Gameplay", "AetheriaDaemonObserver.cs"); var pilotCommandSenderPath = Path.Combine(root, "Assets", "Scripts", "Gameplay", "AetheriaUnityPilotCommandSender.cs"); var pilotFrameControllerPath = Path.Combine(root, "Assets", "Scripts", "Gameplay", "AetheriaUnityPilotFrameController.cs"); @@ -14696,7 +14696,7 @@ static void RequireUnityObserverDoesNotTickLocalSimulation(string root) var zoneRenderDocuments = File.Exists(zoneRenderDocumentsPath) ? File.ReadAllText(zoneRenderDocumentsPath) - : throw new InvalidOperationException("Cannot verify Unity observer authority; AetheriaRuntimeRtsViewportDocuments.cs is missing."); + : throw new InvalidOperationException("Cannot verify Unity observer authority; AetheriaRuntimeGameViewportDocuments.cs is missing."); if (File.Exists(daemonEntitySnapshotProjectorPath)) { throw new InvalidOperationException( @@ -14980,7 +14980,7 @@ static void RequireUnityObserverDoesNotTickLocalSimulation(string root) "_lastAppliedAuthoritativeDaemonRunId", "_lastAppliedAuthoritativeDaemonZoneIndex", "private bool TryRestoreEntityGraphFromZoneRender(", - "AetheriaRuntimeRtsDocuments.ZoneRender(observed.Frame)", + "AetheriaRuntimeGameDocuments.ZoneRender(observed.Frame)", "AetheriaRuntimeEntitySnapshotProjector.CreateSnapshots(runId, daemonZone)", "ObservedEntityRestorer.Replace(entitySnapshots, currentEntityKey, Zone)", "ObservedEntityRestorer.TryApplyInPlace(", @@ -16051,16 +16051,42 @@ static void RequireUnityDoesNotCallSharedSimulationTicks(string root) "org.gamecult.aetheria.state", "Runtime", "AetheriaRuntimeSnapshotDocuments.cs"); - var oldRtsSimulationPath = Path.Combine( - root, - "Packages", - "org.gamecult.aetheria.state", - "Runtime", - "AetheriaRuntimeRtsSimulation.cs"); - if (File.Exists(oldRtsSimulationPath)) + var oldRuntimeSpecificAuthorityFiles = new[] + { + Path.Combine( + root, + "Packages", + "org.gamecult.aetheria.state", + "Runtime", + "AetheriaRuntimeRtsSimulation.cs"), + Path.Combine( + root, + "Packages", + "org.gamecult.aetheria.state", + "Runtime", + "AetheriaRuntimeRtsSimulation.cs.meta"), + Path.Combine( + root, + "Packages", + "org.gamecult.aetheria.state", + "Runtime", + "AetheriaRuntimeRtsDocuments.cs"), + Path.Combine( + root, + "Packages", + "org.gamecult.aetheria.state", + "Runtime", + "AetheriaRuntimeRtsViewportDocuments.cs") + }; + var survivingRuntimeSpecificAuthorityFiles = oldRuntimeSpecificAuthorityFiles + .Where(File.Exists) + .Select(path => Path.GetRelativePath(root, path)) + .ToArray(); + if (survivingRuntimeSpecificAuthorityFiles.Length > 0) { throw new InvalidOperationException( - "Aetheria simulation authority is still runtime-named. Delete AetheriaRuntimeRtsSimulation.cs and keep runtime-specific names at projection edges."); + "Aetheria daemon/shared simulation and viewport authority must not be runtime-named: " + + string.Join(", ", survivingRuntimeSpecificAuthorityFiles)); } var daemonSimulationPath = Path.Combine( @@ -16081,18 +16107,18 @@ static void RequireUnityDoesNotCallSharedSimulationTicks(string root) "org.gamecult.aetheria.state", "Runtime", "AetheriaRuntimeYmirProjectilePhysics.cs"); - var rtsDocumentsPath = Path.Combine( + var gameDocumentsPath = Path.Combine( root, "Packages", "org.gamecult.aetheria.state", "Runtime", - "AetheriaRuntimeRtsDocuments.cs"); - var rtsViewportDocumentsPath = Path.Combine( + "AetheriaRuntimeGameDocuments.cs"); + var gameViewportDocumentsPath = Path.Combine( root, "Packages", "org.gamecult.aetheria.state", "Runtime", - "AetheriaRuntimeRtsViewportDocuments.cs"); + "AetheriaRuntimeGameViewportDocuments.cs"); var rtsLocalDocumentsPath = Path.Combine(root, "Aetheria.Rts.Web", "Electron", "aetheria-rts-local-documents.ts"); var snapshotDocuments = File.Exists(snapshotDocumentsPath) ? File.ReadAllText(snapshotDocumentsPath) @@ -16106,11 +16132,11 @@ static void RequireUnityDoesNotCallSharedSimulationTicks(string root) var ymirProjectilePhysics = File.Exists(ymirProjectilePhysicsPath) ? File.ReadAllText(ymirProjectilePhysicsPath) : throw new InvalidOperationException("Cannot verify daemon projectile authority; Ymir projectile physics boundary is missing."); - var rtsDocuments = File.Exists(rtsDocumentsPath) - ? File.ReadAllText(rtsDocumentsPath) - : throw new InvalidOperationException("Cannot verify daemon projectile authority; RTS viewport documents are missing."); - var rtsViewportDocuments = File.Exists(rtsViewportDocumentsPath) - ? File.ReadAllText(rtsViewportDocumentsPath) + var gameDocuments = File.Exists(gameDocumentsPath) + ? File.ReadAllText(gameDocumentsPath) + : throw new InvalidOperationException("Cannot verify daemon projectile authority; game viewport documents are missing."); + var gameViewportDocuments = File.Exists(gameViewportDocumentsPath) + ? File.ReadAllText(gameViewportDocumentsPath) : throw new InvalidOperationException("Cannot verify daemon projectile authority; zone render documents are missing."); var rtsLocalDocuments = File.Exists(rtsLocalDocumentsPath) ? File.ReadAllText(rtsLocalDocumentsPath) @@ -16149,14 +16175,14 @@ static void RequireUnityDoesNotCallSharedSimulationTicks(string root) "TryResolveProjectileContact(", "public sealed class AetheriaRuntimeYmirProjectileHit" }, - [rtsDocumentsPath] = new[] + [gameDocumentsPath] = new[] { "var projectiles = zone.Projectiles", ".Concat(projectiles", - "private static AetheriaRuntimeRtsViewportObject ToViewportObject(", + "private static AetheriaRuntimeViewportObject ToViewportObject(", "AetheriaRuntimeProjectileCommit projectile)" }, - [rtsViewportDocumentsPath] = new[] + [gameViewportDocumentsPath] = new[] { "public IReadOnlyList Projectiles" }, @@ -16174,8 +16200,8 @@ static void RequireUnityDoesNotCallSharedSimulationTicks(string root) pair.Key == daemonSimulationPath ? daemonSimulation : pair.Key == daemonSimulationSettingsPath ? daemonSimulationSettings : pair.Key == ymirProjectilePhysicsPath ? ymirProjectilePhysics : - pair.Key == rtsDocumentsPath ? rtsDocuments : - pair.Key == rtsViewportDocumentsPath ? rtsViewportDocuments : + pair.Key == gameDocumentsPath ? gameDocuments : + pair.Key == gameViewportDocumentsPath ? gameViewportDocuments : rtsLocalDocuments; return pair.Value .Where(symbol => !text.Contains(symbol, StringComparison.Ordinal)) @@ -16185,11 +16211,13 @@ static void RequireUnityDoesNotCallSharedSimulationTicks(string root) if (missingProjectileAuthoritySymbols.Length > 0) { throw new InvalidOperationException( - "Daemon RTS combat must publish moving typed projectiles instead of invisible local/direct-damage shortcuts: " + + "Daemon combat must publish moving typed projectiles instead of invisible local/direct-damage shortcuts: " + string.Join("; ", missingProjectileAuthoritySymbols)); } if (daemonSimulation.Contains("AetheriaRuntimeRtsSimulation", StringComparison.Ordinal) || + daemonSimulation.Contains("daemon-rts", StringComparison.Ordinal) || + daemonSimulation.Contains("rts-commander", StringComparison.Ordinal) || daemonSimulation.Contains("Damage(target, damage)", StringComparison.Ordinal) || daemonSimulation.Contains("Damage(target, ResolveProjectileDamage(attacker)", StringComparison.Ordinal) || daemonSimulation.Contains("private static void StepProjectiles(", StringComparison.Ordinal) || @@ -16214,12 +16242,41 @@ static void RequireUnityDoesNotCallSharedSimulationTicks(string root) if (daemonProgram.Contains("RtsCultMesh", StringComparison.Ordinal) || daemonProgram.Contains("--rts-cultmesh", StringComparison.Ordinal) || daemonProgram.Contains("RTS CultMesh endpoint", StringComparison.Ordinal) || - daemonProgram.Contains("aetheria-rts-rudp", StringComparison.Ordinal)) + daemonProgram.Contains("aetheria-rts-rudp", StringComparison.Ordinal) || + daemonProgram.Contains("daemon:aetheria.rts.viewport", StringComparison.Ordinal) || + daemonProgram.Contains("local-rts", StringComparison.Ordinal) || + daemonProgram.Contains("starfire-rts", StringComparison.Ordinal)) { throw new InvalidOperationException( "Aetheria daemon transport must be client-neutral; runtime-branded CultMesh flags and transport ids belong outside daemon authority."); } + var sharedRuntimeText = string.Join( + "\n", + daemonSimulation, + gameDocuments, + gameViewportDocuments); + var forbiddenSharedRuntimeAuthoritySymbols = new[] + { + "AetheriaRuntimeRtsDocuments", + "AetheriaRuntimeRtsViewport", + "RtsViewport", + "gamecult.aetheria.rts_viewport", + "local-rts", + "daemon-rts", + "rts-commander", + "aetheria.asset.sprite.rts." + }; + var sharedRuntimeAuthorityHits = forbiddenSharedRuntimeAuthoritySymbols + .Where(symbol => sharedRuntimeText.Contains(symbol, StringComparison.Ordinal)) + .ToArray(); + if (sharedRuntimeAuthorityHits.Length > 0) + { + throw new InvalidOperationException( + "Aetheria shared runtime still exposes RTS-specific authority vocabulary: " + + string.Join(", ", sharedRuntimeAuthorityHits)); + } + if (daemonTickRunner.Contains("AetheriaRuntimeDaemonFrameStore.PublishFrame", StringComparison.Ordinal)) { throw new InvalidOperationException( @@ -17050,10 +17107,10 @@ static void RequireRuntimeStateReaderOwnsUnityStateAcquisition(string root) var unityDaemonRenderDocuments = File.Exists(unityDaemonRenderDocumentsPath) ? File.ReadAllText(unityDaemonRenderDocumentsPath) : throw new InvalidOperationException("Cannot verify daemon state acquisition; AetheriaUnityDaemonRenderDocuments.cs is missing."); - var unityRtsViewportDocumentsPath = Path.Combine(root, "Assets", "Scripts", "Gameplay", "AetheriaUnityRtsViewportDocuments.cs"); - var unityRtsViewportDocuments = File.Exists(unityRtsViewportDocumentsPath) - ? File.ReadAllText(unityRtsViewportDocumentsPath) - : throw new InvalidOperationException("Cannot verify daemon state acquisition; AetheriaUnityRtsViewportDocuments.cs is missing."); + var unityGameViewportDocumentsPath = Path.Combine(root, "Assets", "Scripts", "Gameplay", "AetheriaUnityGameViewportDocuments.cs"); + var unityGameViewportDocuments = File.Exists(unityGameViewportDocumentsPath) + ? File.ReadAllText(unityGameViewportDocumentsPath) + : throw new InvalidOperationException("Cannot verify daemon state acquisition; AetheriaUnityGameViewportDocuments.cs is missing."); var zoneRendererPath = Path.Combine(root, "Assets", "Scripts", "Zone Display", "ZoneRenderer.cs"); var zoneRenderer = File.Exists(zoneRendererPath) ? File.ReadAllText(zoneRendererPath) @@ -17196,9 +17253,9 @@ static void RequireRuntimeStateReaderOwnsUnityStateAcquisition(string root) "private static AetheriaClient ResolveClient(AetheriaRuntimeStateBootReport stateBoot, string runtimeId = \"\")", "private static AetheriaClient RuntimeClient(string runtimeId = \"\")", "public static AetheriaClientState RuntimeState(string runtimeId = \"\")", - "public static AetheriaUnityRtsViewportDocuments MapViewportDocuments(", - "public static AetheriaUnityRtsViewportDocuments ZonePresentationDocuments(", - "public static AetheriaUnityRtsViewportDocuments RenderSplatViewportDocuments(", + "public static AetheriaUnityGameViewportDocuments MapViewportDocuments(", + "public static AetheriaUnityGameViewportDocuments ZonePresentationDocuments(", + "public static AetheriaUnityGameViewportDocuments RenderSplatViewportDocuments(", "public static AetheriaUnityDaemonRenderDocuments DaemonRenderDocuments(", "public static AetheriaControl Control(string runtimeId = \"\")", "public static AetheriaUi Ui(string runtimeId = \"\")", @@ -17335,7 +17392,7 @@ static void RequireRuntimeStateReaderOwnsUnityStateAcquisition(string root) } if (unityDaemonRenderDocuments.Contains("public CultMeshReactiveDocument<", StringComparison.Ordinal) || - unityRtsViewportDocuments.Contains("public CultMeshReactiveDocument<", StringComparison.Ordinal)) + unityGameViewportDocuments.Contains("public CultMeshReactiveDocument<", StringComparison.Ordinal)) { throw new InvalidOperationException( "Unity managed document holders must not leak raw CultMesh reactive documents through their public surface."); @@ -17592,7 +17649,7 @@ static void RequireRuntimeStateReaderOwnsUnityStateAcquisition(string root) "ReactiveObservedDaemon(", "TryCurrent(out AetheriaRuntimeDaemonRenderView? observed)", "return new AetheriaRuntimeDaemonRenderView(frame, soaView);", - "AetheriaRuntimeRtsDocuments.ZoneRender(Frame)", + "AetheriaRuntimeGameDocuments.ZoneRender(Frame)", "zoneRender = null" }; var observedDaemonStateBypassHits = forbiddenObservedDaemonStateSymbols @@ -17628,7 +17685,7 @@ static void RequireRuntimeStateReaderOwnsUnityStateAcquisition(string root) "session ??= await _verse.GetStarbridgeSessionAsync()", "var frame = await _verse.GetLatestFrameAsync()", "public async Task LatestAuthoritativeRunFrameAsync()", - "public async Task MapViewportAsync(", + "public async Task MapViewportAsync(", "public async Task ObjectsViewportAsync(", "public async Task GravityViewportAsync(", "public async Task RenderSplatsViewportAsync(", @@ -19358,11 +19415,11 @@ static void RequireInventoryLoadoutRestoreRequestAuthority(string root) var tradeQueries = File.Exists(tradeQueriesPath) ? File.ReadAllText(tradeQueriesPath) : throw new InvalidOperationException("Cannot verify loadout restore authority; runtime trade item queries are missing."); - var rtsDocumentsPath = Path.Combine(root, "Packages", "org.gamecult.aetheria.state", "Runtime", "AetheriaRuntimeRtsViewportDocuments.cs"); + var rtsDocumentsPath = Path.Combine(root, "Packages", "org.gamecult.aetheria.state", "Runtime", "AetheriaRuntimeGameViewportDocuments.cs"); var rtsDocuments = File.Exists(rtsDocumentsPath) ? File.ReadAllText(rtsDocumentsPath) : throw new InvalidOperationException("Cannot verify loadout restore authority; RTS viewport documents are missing."); - var rtsDocumentFactoryPath = Path.Combine(root, "Packages", "org.gamecult.aetheria.state", "Runtime", "AetheriaRuntimeRtsDocuments.cs"); + var rtsDocumentFactoryPath = Path.Combine(root, "Packages", "org.gamecult.aetheria.state", "Runtime", "AetheriaRuntimeGameDocuments.cs"); var rtsDocumentFactory = File.Exists(rtsDocumentFactoryPath) ? File.ReadAllText(rtsDocumentFactoryPath) : throw new InvalidOperationException("Cannot verify loadout restore authority; RTS document factory source is missing."); diff --git a/Aetheria.State/AetheriaDocumentRegistry.cs b/Aetheria.State/AetheriaDocumentRegistry.cs index e3c4ac7c6..396e2b9fe 100644 --- a/Aetheria.State/AetheriaDocumentRegistry.cs +++ b/Aetheria.State/AetheriaDocumentRegistry.cs @@ -43,7 +43,7 @@ public static class AetheriaDocumentRegistry typeof(AetheriaRuntimeDaemonHealthDocument), typeof(AetheriaRuntimeDaemonCommandBoundaryDocument), typeof(AetheriaRuntimeDaemonFrameDocument), - typeof(AetheriaRuntimeRtsViewportDocument), + typeof(AetheriaRuntimeGameViewportDocument), typeof(AetheriaRuntimeObjectsViewportDocument), typeof(AetheriaRuntimeGravityViewportDocument), typeof(AetheriaRuntimeCurrentZoneDocument), diff --git a/Aetheria.State/docs/stage-7-client-surface-inventory.md b/Aetheria.State/docs/stage-7-client-surface-inventory.md index a68e8914c..d288088ca 100644 --- a/Aetheria.State/docs/stage-7-client-surface-inventory.md +++ b/Aetheria.State/docs/stage-7-client-surface-inventory.md @@ -178,12 +178,12 @@ carried into 7D.3 command reroute or 7D.4 projection reroute. | Target/contact presentation reads | `Assets/Scripts/Gameplay/AetheriaUnityObservedTargetQuery.cs`; `Assets/Scripts/Gameplay/AetheriaUnityTargetPresentation.cs`; projection in `Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeRtsProjection.cs` | Unity target presentation now reads `gamecult.aetheria.zone_contacts.v1` through `AetheriaClient.ZoneContactsAsync()`. The feed carries typed target/contact identity, visibility, hostility, target position, deltas, and distance for the current zone. Target HUD, target-distance renderer cache, minimap compass markers, and renderer visibility fades no longer call snapshot render-query helpers for those facts. | Done for current target HUD indicators, target-distance renderer cache, compass markers, and visibility fade state. Remaining target presentation objects are Unity affordances over typed contact rows. | | Docked current-entity binding | `Assets/Scripts/Gameplay/AetheriaUnityObservedDockingIndex.cs`; `Assets/Scripts/Gameplay/AetheriaUnityCurrentEntityBinder.cs`; `Assets/Scripts/Gameplay/AetheriaUnityCurrentEntityPresentation.cs` | Docking state now comes from `AetheriaClient.CurrentDockingAsync()` and resolves the Unity docking-bay facade by typed dock parent key plus bay index. Dock camera body focus uses `AetheriaClient.ZoneRenderAsync()` body poses rather than passing a raw current-zone snapshot into presentation. | Done for current docked binding path. The remaining Unity facade entity/docking-bay objects are presentation adapters, not portable gameplay state. | | Inventory/trade item detail reads | `Assets/Scripts/UI/Menu/InventoryMenu.cs`; `Assets/Scripts/UI/Menu/InventoryPanel.cs`; `Assets/Scripts/UI/Menu/TradeMenu.cs` | These panels already own explicit `AetheriaClient` instances for typed command submission. They now also read runtime catalog/manufacturer data and player formatting settings through those local clients for ship settings, cargo item details, equipped item details, trade table columns, trade behavior fields, trade item details, dropdown loadout pricing, inventory hull/item geometry, hardpoint typing, durability lookup, and temperature labels. | Done for current detail/dropdown/panel slice. Remaining HUD schematic, entity prefab presentation, and action-bar icon/name reads still use manager globals until migrated. | -| Current ship settings facts | `Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeRtsViewportDocuments.cs`; `Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeRtsProjection.cs`; `Assets/Scripts/UI/Menu/InventoryMenu.cs` | `CurrentEntityAsync` now publishes the current entity shutdown-performance threshold. `InventoryMenu` renders the ship-settings Eve surface from the typed current-entity document and submits shutdown changes by daemon entity key instead of storing a Unity `Entity` facade as the settings source. | Done for current ship-settings read slice. The daemon still validates range and applies authority; Unity only renders the typed row and submits intent. | -| Current cockpit HUD facts | `Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeRtsViewportDocuments.cs`; `Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeRtsProjection.cs`; `Assets/Scripts/UI/HUD/SchematicDisplay.cs` | `CurrentEntityAsync` now publishes a typed current-entity HUD status row for override shutdown, shield activity, heatsinks, heat/hypothermia exposure, visibility, hull ratio, radiator range, sensor cooldown, reactor draw, capacitor charge, and Aether-drive RPM. The player schematic HUD reads that row through its local `AetheriaClient` instead of pulling those facts from the Unity `Entity` facade. | Done for the current player HUD status slice. Target/enemy schematic rows still adapt Unity presentation objects until a target-entity projection replaces that display path. | -| Station refit docking-bay rows | `Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeRtsViewportDocuments.cs`; `Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeRtsProjection.cs`; `Assets/Scripts/UI/Menu/InventoryPanel.cs`; `Assets/Scripts/UI/Menu/InventoryMenu.cs` | `StationRefitAsync` now publishes typed docking-bay rows with slot identity, occupied entity identity, current-entity match, hull key, and cargo items. Inventory menu/panel docking-bay display validates the current row before adapting the Unity docking-bay facade. | Done for the current docking-bay display slice. Continue promoting station stock/refit eligibility and remaining cargo presentation facts into typed station/refit projections before Stage 8. | -| Loadout restore options | `Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeRtsViewportDocuments.cs`; `Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeRtsProjection.cs`; `Packages/org.gamecult.aetheria.state/Runtime/AetheriaClient.cs`; `Assets/Scripts/UI/Menu/InventoryPanel.cs` | `StationRefitAsync` now composes daemon frame state, Verse loadout templates, and runtime catalog policy into typed restore options. Each row carries template name, daemon target entity key, price, and `CanRestore`. InventoryPanel renders and submits those rows instead of reading `LoadoutTemplatesAsync` or pricing templates locally. | Done for current restore dropdown slice. The daemon still validates restore acceptance on command apply; clients only display the projected row and submit intent. | -| Trade cargo target rows | `Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeRtsViewportDocuments.cs`; `Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeRtsProjection.cs`; `Assets/Scripts/UI/Menu/TradeMenu.cs` | `StationRefitAsync` now publishes typed cargo target rows for the current docking bay and player ship bays. Each row carries target kind, label, entity key, bay index, hull key, and cargo items. TradeMenu builds the target selector and owned counts from those rows instead of reconstructing targets from available entities or treating station stock as docking-bay cargo. | Done for current target cargo/count slice. Remaining trade row filtering and purchase submission stay typed; Stage 8 can delete more Unity presentation adapters once row rendering is fully projection-native. | -| Station stock trade facts | `Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeRtsViewportDocuments.cs`; `Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeRtsProjection.cs`; `Assets/Scripts/UI/Menu/TradeMenu.cs` | `StationRefitAsync` enriches each station stock row with shared-policy price, affordability, and owned quantity. Hull ownership is counted from typed available entities; item ownership is counted from typed cargo target rows. TradeMenu renders the `OwnedQuantity` row fact instead of counting Unity ships or cargo dictionaries locally. | Done for current stock row fact slice. The daemon projection owns trade row display facts; command apply still revalidates purchase acceptance. | +| Current ship settings facts | `Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeGameViewportDocuments.cs`; `Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeRtsProjection.cs`; `Assets/Scripts/UI/Menu/InventoryMenu.cs` | `CurrentEntityAsync` now publishes the current entity shutdown-performance threshold. `InventoryMenu` renders the ship-settings Eve surface from the typed current-entity document and submits shutdown changes by daemon entity key instead of storing a Unity `Entity` facade as the settings source. | Done for current ship-settings read slice. The daemon still validates range and applies authority; Unity only renders the typed row and submits intent. | +| Current cockpit HUD facts | `Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeGameViewportDocuments.cs`; `Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeRtsProjection.cs`; `Assets/Scripts/UI/HUD/SchematicDisplay.cs` | `CurrentEntityAsync` now publishes a typed current-entity HUD status row for override shutdown, shield activity, heatsinks, heat/hypothermia exposure, visibility, hull ratio, radiator range, sensor cooldown, reactor draw, capacitor charge, and Aether-drive RPM. The player schematic HUD reads that row through its local `AetheriaClient` instead of pulling those facts from the Unity `Entity` facade. | Done for the current player HUD status slice. Target/enemy schematic rows still adapt Unity presentation objects until a target-entity projection replaces that display path. | +| Station refit docking-bay rows | `Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeGameViewportDocuments.cs`; `Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeRtsProjection.cs`; `Assets/Scripts/UI/Menu/InventoryPanel.cs`; `Assets/Scripts/UI/Menu/InventoryMenu.cs` | `StationRefitAsync` now publishes typed docking-bay rows with slot identity, occupied entity identity, current-entity match, hull key, and cargo items. Inventory menu/panel docking-bay display validates the current row before adapting the Unity docking-bay facade. | Done for the current docking-bay display slice. Continue promoting station stock/refit eligibility and remaining cargo presentation facts into typed station/refit projections before Stage 8. | +| Loadout restore options | `Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeGameViewportDocuments.cs`; `Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeRtsProjection.cs`; `Packages/org.gamecult.aetheria.state/Runtime/AetheriaClient.cs`; `Assets/Scripts/UI/Menu/InventoryPanel.cs` | `StationRefitAsync` now composes daemon frame state, Verse loadout templates, and runtime catalog policy into typed restore options. Each row carries template name, daemon target entity key, price, and `CanRestore`. InventoryPanel renders and submits those rows instead of reading `LoadoutTemplatesAsync` or pricing templates locally. | Done for current restore dropdown slice. The daemon still validates restore acceptance on command apply; clients only display the projected row and submit intent. | +| Trade cargo target rows | `Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeGameViewportDocuments.cs`; `Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeRtsProjection.cs`; `Assets/Scripts/UI/Menu/TradeMenu.cs` | `StationRefitAsync` now publishes typed cargo target rows for the current docking bay and player ship bays. Each row carries target kind, label, entity key, bay index, hull key, and cargo items. TradeMenu builds the target selector and owned counts from those rows instead of reconstructing targets from available entities or treating station stock as docking-bay cargo. | Done for current target cargo/count slice. Remaining trade row filtering and purchase submission stay typed; Stage 8 can delete more Unity presentation adapters once row rendering is fully projection-native. | +| Station stock trade facts | `Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeGameViewportDocuments.cs`; `Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeRtsProjection.cs`; `Assets/Scripts/UI/Menu/TradeMenu.cs` | `StationRefitAsync` enriches each station stock row with shared-policy price, affordability, and owned quantity. Hull ownership is counted from typed available entities; item ownership is counted from typed cargo target rows. TradeMenu renders the `OwnedQuantity` row fact instead of counting Unity ships or cargo dictionaries locally. | Done for current stock row fact slice. The daemon projection owns trade row display facts; command apply still revalidates purchase acceptance. | | Action-bar and renderer catalog reads | `Assets/Scripts/Gameplay/ActionBarSlot.cs`; `Assets/Scripts/Zone Display/ZoneRenderer.cs`; `Assets/Scripts/Gameplay/EntityInstance.cs`; `Assets/Scripts/Gameplay/ShipInstance.cs` | Action-bar bindings resolve gear icon catalog data through their explicit `AetheriaClient`. `ZoneRenderer` owns a local `AetheriaClient` catalog cache used for entity hull prefabs, pickup labels, pickup tier color, entity hull binding, and ship durability normalization. | Done for current presentation catalog slice. Remaining HUD schematic catalog/formatting and main-menu observed-galaxy boot still need separate treatment. | | Input and nebula settings reads | `Assets/Scripts/UI/InputScreen/InputDisplayLayout.cs`; `Assets/Scripts/Zone Display/VolumeCloudRenderer.cs` | The input screen reads action-bar input visibility from `AetheriaClient.PlayerSettingsAsync()`. The volume cloud renderer reads nebula quality from `AetheriaClient.PlayerSettingsAsync()` and falls back to its serialized quality if local state cannot be read. | Done for current settings slice. | | Main-menu and HUD catalog/settings reads | `Assets/Scripts/UI/MainMenu.cs`; `Assets/Scripts/UI/HUD/SchematicDisplay.cs` | Main menu reads the runtime catalog and typed sector-map boot state through its local `AetheriaClient`; the legacy observed-galaxy boot projection now lowers from `SectorMapAsync` rather than a whole authoritative daemon frame. Schematic HUD reads item catalog data and player formatting settings through its local `AetheriaClient`. | Done for direct manager-global read cleanup and whole-frame boot read removal. `SchematicDisplay.cs` was transcoded to UTF-8 before editing because it contained legacy non-UTF8 degree-symbol bytes. | diff --git a/Aetheria.State/docs/stage-7-thin-client-staged-implementation-plan.md b/Aetheria.State/docs/stage-7-thin-client-staged-implementation-plan.md index 35eb82fab..df6b94966 100644 --- a/Aetheria.State/docs/stage-7-thin-client-staged-implementation-plan.md +++ b/Aetheria.State/docs/stage-7-thin-client-staged-implementation-plan.md @@ -345,7 +345,7 @@ Outputs: Demolition target: -- Electron requesting `gamecult.aetheria.rts_viewport.v1` from the daemon. +- Electron requesting `gamecult.aetheria.game_viewport.v1` from the daemon. - Stale `decodeViewportDocument` and `viewportRecordKey` TS binding helpers. Verifier: diff --git a/Aetheria.State/docs/verse-authority-implementation-plan.md b/Aetheria.State/docs/verse-authority-implementation-plan.md index 64462c584..e681e5462 100644 --- a/Aetheria.State/docs/verse-authority-implementation-plan.md +++ b/Aetheria.State/docs/verse-authority-implementation-plan.md @@ -1370,7 +1370,7 @@ Current staged work order: | Order | Build now | Code surface | Verifier | Demolition rule | | --- | --- | --- | --- | --- | -| 1 | Finish S2 station/refit read parity. `current_entity`, `current_docking`, inventory rows, source slot identity, and loadout templates are already moving; split remaining station stock, docked ship, cargo, equipment, pricing, and refit eligibility reads into canonical typed documents or derived projections as appropriate. | `AetheriaRuntimeRtsProjection`, `AetheriaRuntimeRtsViewportDocuments`, `AetheriaClient`, Unity inventory/trade menus, generated TS bindings. | `verify-stage7d-unity-parity.ps1`, `Aetheria.State.Verify`, `AuthoritySmoke`, `npm run check:rts-bindings`, Unity compile. | Menu logic may adapt Unity controls, but station/refit truth may not come from manager-global observed cargo, docked ship, catalog, pricing, or loadout caches. | +| 1 | Finish S2 station/refit read parity. `current_entity`, `current_docking`, inventory rows, source slot identity, and loadout templates are already moving; split remaining station stock, docked ship, cargo, equipment, pricing, and refit eligibility reads into canonical typed documents or derived projections as appropriate. | `AetheriaRuntimeRtsProjection`, `AetheriaRuntimeGameViewportDocuments`, `AetheriaClient`, Unity inventory/trade menus, generated TS bindings. | `verify-stage7d-unity-parity.ps1`, `Aetheria.State.Verify`, `AuthoritySmoke`, `npm run check:rts-bindings`, Unity compile. | Menu logic may adapt Unity controls, but station/refit truth may not come from manager-global observed cargo, docked ship, catalog, pricing, or loadout caches. | | 2 | Add S2 typed refit operation parity. Dock, undock, select docked ship, equip, store, transfer, restore loadout, and purchase/refit become named operations with typed receipts. | `AetheriaRuntimeDaemonOperationClient`, `AetheriaRuntimeVerseClient`, generated TS operation bindings, Unity/Electron facade methods, daemon operation validation. | Cross-client operation smoke: one runtime issues an allowed refit operation, the other observes the committed result through local Verse state. | Delete or quarantine any public client path that mutates inventory/loadout through operation strings, raw item bags, UI-local rules, or Unity checkpoint rewrites. | | 3 | Contract Unity to a render/input shell for S2. Inventory/trade UI can remain Unity UI, but every gameplay read/write goes through typed state. | `InventoryMenu`, `InventoryPanel`, `TradeMenu`, `ActionGameManager`, `ZoneRenderer` shims. | Stage 7D verifier rejects direct manager-global refit reads, public manager gameplay reads, new command buses, and Unity-only command paths. | Remaining facade-object bridges must validate daemon keys against typed projections and name the Stage 8 projection/native slab that deletes them. | | 4 | Prove 7E.1 two-client local Verse parity. Raven Unity and Starfire Electron are peers with separate local Verse nodes, not one runtime viewing another runtime's projection. | launch harness, scoped peer sync, committed facts, session/refit/authority projections, diagnostics. | Raven/Starfire smoke: both clients see the same session, station/refit state, controlled entities, policy id, and fact receipts through local Verse state. | No test may prove co-op by reading a remote viewport or one daemon's debug projection as gameplay state. | diff --git a/Assets/Editor/AetheriaRenderProbe.cs b/Assets/Editor/AetheriaRenderProbe.cs index cf7269d3c..4f08025c1 100644 --- a/Assets/Editor/AetheriaRenderProbe.cs +++ b/Assets/Editor/AetheriaRenderProbe.cs @@ -204,7 +204,7 @@ public static class AetheriaRenderProbe ? new Vector2(centerTransform.position.x, centerTransform.position.z) : Vector2.zero; var half = size * 0.5f; - var document = sampler.SceneSplatSource.BuildDocument(new AetheriaRuntimeRtsViewportBounds + var document = sampler.SceneSplatSource.BuildDocument(new AetheriaRuntimeViewportBounds { MinX = center.x - half.x, MinY = center.y - half.y, diff --git a/Assets/Scripts/Gameplay/AetheriaRenderSplatRasterizer.cs b/Assets/Scripts/Gameplay/AetheriaRenderSplatRasterizer.cs index ff6aeef92..462a8300a 100644 --- a/Assets/Scripts/Gameplay/AetheriaRenderSplatRasterizer.cs +++ b/Assets/Scripts/Gameplay/AetheriaRenderSplatRasterizer.cs @@ -252,9 +252,9 @@ public sealed class AetheriaRenderSplatRasterizer : MonoBehaviour Graphics.ExecuteCommandBuffer(_commandBuffer); } - private static Matrix4x4 BuildViewportToClip(AetheriaRuntimeRtsViewportBounds viewport) + private static Matrix4x4 BuildViewportToClip(AetheriaRuntimeViewportBounds viewport) { - viewport ??= new AetheriaRuntimeRtsViewportBounds(); + viewport ??= new AetheriaRuntimeViewportBounds(); var minX = (float)math.min(viewport.MinX, viewport.MaxX); var minY = (float)math.min(viewport.MinY, viewport.MaxY); var maxX = (float)math.max(viewport.MinX, viewport.MaxX); diff --git a/Assets/Scripts/Gameplay/AetheriaSceneRenderSplatSource.cs b/Assets/Scripts/Gameplay/AetheriaSceneRenderSplatSource.cs index f4a849c0a..0013fa42e 100644 --- a/Assets/Scripts/Gameplay/AetheriaSceneRenderSplatSource.cs +++ b/Assets/Scripts/Gameplay/AetheriaSceneRenderSplatSource.cs @@ -43,9 +43,9 @@ public sealed class AetheriaSceneRenderSplatSource : MonoBehaviour [SerializeField] private AetheriaSceneRenderSplatFixture[] fixtures = Array.Empty(); - public AetheriaRuntimeRenderSplatsViewportDocument BuildDocument(AetheriaRuntimeRtsViewportBounds viewport) + public AetheriaRuntimeRenderSplatsViewportDocument BuildDocument(AetheriaRuntimeViewportBounds viewport) { - viewport ??= new AetheriaRuntimeRtsViewportBounds(); + viewport ??= new AetheriaRuntimeViewportBounds(); var normalizedViewport = Normalize(viewport); var layers = BuildLayers(); var layerIndices = new Dictionary(StringComparer.Ordinal); @@ -70,9 +70,9 @@ public sealed class AetheriaSceneRenderSplatSource : MonoBehaviour }; } - private static AetheriaRuntimeRtsViewportBounds Normalize(AetheriaRuntimeRtsViewportBounds viewport) + private static AetheriaRuntimeViewportBounds Normalize(AetheriaRuntimeViewportBounds viewport) { - return new AetheriaRuntimeRtsViewportBounds + return new AetheriaRuntimeViewportBounds { MinX = Math.Min(viewport.MinX, viewport.MaxX), MinY = Math.Min(viewport.MinY, viewport.MaxY), diff --git a/Assets/Scripts/Gameplay/AetheriaUnityRtsViewportDocuments.cs b/Assets/Scripts/Gameplay/AetheriaUnityGameViewportDocuments.cs similarity index 74% rename from Assets/Scripts/Gameplay/AetheriaUnityRtsViewportDocuments.cs rename to Assets/Scripts/Gameplay/AetheriaUnityGameViewportDocuments.cs index 2d70f1369..653e8d3d2 100644 --- a/Assets/Scripts/Gameplay/AetheriaUnityRtsViewportDocuments.cs +++ b/Assets/Scripts/Gameplay/AetheriaUnityGameViewportDocuments.cs @@ -2,15 +2,15 @@ using System; using GameCult.Aetheria.State.Verse; using GameCult.Mesh; -public sealed class AetheriaUnityRtsViewportDocuments : IDisposable +public sealed class AetheriaUnityGameViewportDocuments : IDisposable { private readonly CultMeshReactiveDocument _contacts; private readonly CultMeshReactiveDocument _objectsViewport; private readonly CultMeshReactiveDocument _renderSplatsViewport; - private AetheriaUnityRtsViewportDocuments( + private AetheriaUnityGameViewportDocuments( AetheriaClientState state, - AetheriaRuntimeRtsViewportBounds viewport, + AetheriaRuntimeViewportBounds viewport, bool bindContacts, bool bindObjects, bool bindRenderSplats) @@ -26,17 +26,17 @@ public sealed class AetheriaUnityRtsViewportDocuments : IDisposable _renderSplatsViewport = bindRenderSplats ? state.RenderSplatsViewport(viewport).Reactive() : null; } - public AetheriaRuntimeRtsViewportBounds Viewport { get; } + public AetheriaRuntimeViewportBounds Viewport { get; } public AetheriaRuntimeZoneContactsDocument CurrentContacts => _contacts?.Current; public AetheriaRuntimeObjectsViewportDocument CurrentObjectsViewport => _objectsViewport?.Current; public AetheriaRuntimeRenderSplatsViewportDocument CurrentRenderSplatsViewport => _renderSplatsViewport?.Current; - public static AetheriaUnityRtsViewportDocuments OpenMap( + public static AetheriaUnityGameViewportDocuments OpenMap( AetheriaClientState state, - AetheriaRuntimeRtsViewportBounds viewport) + AetheriaRuntimeViewportBounds viewport) { - return new AetheriaUnityRtsViewportDocuments( + return new AetheriaUnityGameViewportDocuments( state, viewport, bindContacts: false, @@ -44,11 +44,11 @@ public sealed class AetheriaUnityRtsViewportDocuments : IDisposable bindRenderSplats: true); } - public static AetheriaUnityRtsViewportDocuments OpenZonePresentation( + public static AetheriaUnityGameViewportDocuments OpenZonePresentation( AetheriaClientState state, - AetheriaRuntimeRtsViewportBounds viewport) + AetheriaRuntimeViewportBounds viewport) { - return new AetheriaUnityRtsViewportDocuments( + return new AetheriaUnityGameViewportDocuments( state, viewport, bindContacts: true, @@ -56,11 +56,11 @@ public sealed class AetheriaUnityRtsViewportDocuments : IDisposable bindRenderSplats: false); } - public static AetheriaUnityRtsViewportDocuments OpenRenderSplats( + public static AetheriaUnityGameViewportDocuments OpenRenderSplats( AetheriaClientState state, - AetheriaRuntimeRtsViewportBounds viewport) + AetheriaRuntimeViewportBounds viewport) { - return new AetheriaUnityRtsViewportDocuments( + return new AetheriaUnityGameViewportDocuments( state, viewport, bindContacts: false, @@ -68,7 +68,7 @@ public sealed class AetheriaUnityRtsViewportDocuments : IDisposable bindRenderSplats: true); } - public bool Matches(AetheriaRuntimeRtsViewportBounds viewport) + public bool Matches(AetheriaRuntimeViewportBounds viewport) { return SameViewport(Viewport, viewport); } @@ -81,8 +81,8 @@ public sealed class AetheriaUnityRtsViewportDocuments : IDisposable } public static bool SameViewport( - AetheriaRuntimeRtsViewportBounds left, - AetheriaRuntimeRtsViewportBounds right) + AetheriaRuntimeViewportBounds left, + AetheriaRuntimeViewportBounds right) { if (left == null || right == null) return false; diff --git a/Assets/Scripts/Gameplay/AetheriaUnityRtsViewportDocuments.cs.meta b/Assets/Scripts/Gameplay/AetheriaUnityGameViewportDocuments.cs.meta similarity index 100% rename from Assets/Scripts/Gameplay/AetheriaUnityRtsViewportDocuments.cs.meta rename to Assets/Scripts/Gameplay/AetheriaUnityGameViewportDocuments.cs.meta diff --git a/Assets/Scripts/Gameplay/AetheriaUnityRenderSplatViewportSource.cs b/Assets/Scripts/Gameplay/AetheriaUnityRenderSplatViewportSource.cs index 665c56e54..f23b035ac 100644 --- a/Assets/Scripts/Gameplay/AetheriaUnityRenderSplatViewportSource.cs +++ b/Assets/Scripts/Gameplay/AetheriaUnityRenderSplatViewportSource.cs @@ -26,7 +26,7 @@ public sealed class AetheriaUnityRenderSplatViewportSource : MonoBehaviour private bool renderInLateUpdate = true; private float _nextRefreshTime; - private AetheriaUnityRtsViewportDocuments _viewportDocuments; + private AetheriaUnityGameViewportDocuments _viewportDocuments; private AetheriaRuntimeRenderSplatsViewportDocument _fallbackRenderSplatsViewport; private string _lastWarningMessage = ""; @@ -150,19 +150,19 @@ public sealed class AetheriaUnityRenderSplatViewportSource : MonoBehaviour } private static AetheriaRuntimeRenderSplatsViewportDocument EmptyRenderSplatsViewport( - AetheriaRuntimeRtsViewportBounds viewport) + AetheriaRuntimeViewportBounds viewport) { return new AetheriaRuntimeRenderSplatsViewportDocument { PublishedAtUtc = DateTimeOffset.UtcNow.ToString("O"), - Viewport = viewport ?? new AetheriaRuntimeRtsViewportBounds() + Viewport = viewport ?? new AetheriaRuntimeViewportBounds() }; } - private AetheriaRuntimeRtsViewportBounds ResolveViewportBounds() + private AetheriaRuntimeViewportBounds ResolveViewportBounds() { var halfSize = size * 0.5f; - return new AetheriaRuntimeRtsViewportBounds + return new AetheriaRuntimeViewportBounds { MinX = position.x - halfSize.x, MinY = position.y - halfSize.y, diff --git a/Assets/Scripts/Gameplay/AetheriaUnityRuntimeClientProvider.cs b/Assets/Scripts/Gameplay/AetheriaUnityRuntimeClientProvider.cs index 176fb8be0..27eeb8287 100644 --- a/Assets/Scripts/Gameplay/AetheriaUnityRuntimeClientProvider.cs +++ b/Assets/Scripts/Gameplay/AetheriaUnityRuntimeClientProvider.cs @@ -77,25 +77,25 @@ public static class AetheriaUnityRuntimeClientProvider return RuntimeClient(stateBoot, runtimeId).State; } - public static AetheriaUnityRtsViewportDocuments MapViewportDocuments( - AetheriaRuntimeRtsViewportBounds viewport, + public static AetheriaUnityGameViewportDocuments MapViewportDocuments( + AetheriaRuntimeViewportBounds viewport, string runtimeId = "") { - return AetheriaUnityRtsViewportDocuments.OpenMap(RuntimeState(runtimeId), viewport); + return AetheriaUnityGameViewportDocuments.OpenMap(RuntimeState(runtimeId), viewport); } - public static AetheriaUnityRtsViewportDocuments ZonePresentationDocuments( - AetheriaRuntimeRtsViewportBounds viewport, + public static AetheriaUnityGameViewportDocuments ZonePresentationDocuments( + AetheriaRuntimeViewportBounds viewport, string runtimeId = "") { - return AetheriaUnityRtsViewportDocuments.OpenZonePresentation(RuntimeState(runtimeId), viewport); + return AetheriaUnityGameViewportDocuments.OpenZonePresentation(RuntimeState(runtimeId), viewport); } - public static AetheriaUnityRtsViewportDocuments RenderSplatViewportDocuments( - AetheriaRuntimeRtsViewportBounds viewport, + public static AetheriaUnityGameViewportDocuments RenderSplatViewportDocuments( + AetheriaRuntimeViewportBounds viewport, string runtimeId = "") { - return AetheriaUnityRtsViewportDocuments.OpenRenderSplats(RuntimeState(runtimeId), viewport); + return AetheriaUnityGameViewportDocuments.OpenRenderSplats(RuntimeState(runtimeId), viewport); } public static AetheriaUnityDaemonRenderDocuments DaemonRenderDocuments( diff --git a/Assets/Scripts/Tests/DaemonRuntimeDocumentTests.cs b/Assets/Scripts/Tests/DaemonRuntimeDocumentTests.cs index 6aa42136c..325e64881 100644 --- a/Assets/Scripts/Tests/DaemonRuntimeDocumentTests.cs +++ b/Assets/Scripts/Tests/DaemonRuntimeDocumentTests.cs @@ -181,7 +181,7 @@ public class DaemonRuntimeDocumentTests .LatestAsync() .GetAwaiter() .GetResult(); - var viewport = new AetheriaRuntimeRtsViewportBounds + var viewport = new AetheriaRuntimeViewportBounds { MinX = -100, MinY = -100, @@ -228,7 +228,7 @@ public class DaemonRuntimeDocumentTests using var zoneDetailsReactive = client.State.ZoneDetails(0).Reactive(); using var selectedObjectReactive = client.State.SelectedObject(0).Reactive(); using var inventoryReactive = client.State.Inventory(0).Reactive(); - using var mapViewportReactive = client.State.RtsViewport(viewport).Reactive(); + using var mapViewportReactive = client.State.GameViewport(viewport).Reactive(); using var objectsViewportReactive = client.State.ObjectsViewport(viewport).Reactive(); using var gravityViewportReactive = client.State.GravityViewport(viewport).Reactive(); using var renderSplatsViewportReactive = client.State.RenderSplatsViewport(viewport).Reactive(); @@ -307,7 +307,7 @@ public class DaemonRuntimeDocumentTests Assert.AreEqual(AetheriaRuntimeVerseHostSettingsDocument.SchemaId, verseHostSettings.Schema); Assert.AreEqual(AetheriaRuntimeVerseHostSettingsDocument.SchemaId, verseHostSettingsReactive.Current.Schema); Assert.AreEqual(AetheriaRuntimeDaemonSchemas.ObjectsViewport, objectsViewport.Schema); - Assert.AreEqual(AetheriaRuntimeDaemonSchemas.RtsViewport, mapViewportReactive.Current.Schema); + Assert.AreEqual(AetheriaRuntimeDaemonSchemas.GameViewport, mapViewportReactive.Current.Schema); Assert.AreEqual(AetheriaRuntimeDaemonSchemas.ObjectsViewport, objectsViewportReactive.Current.Schema); Assert.AreEqual(AetheriaRuntimeDaemonSchemas.GravityViewport, gravityViewportReactive.Current.Schema); Assert.AreEqual(AetheriaRuntimeDaemonSchemas.RenderSplatsViewport, renderSplatsViewportReactive.Current.Schema); @@ -1875,7 +1875,7 @@ public class DaemonRuntimeDocumentTests 0.02, renderSettings: renderSettings); - var zoneRender = AetheriaRuntimeRtsDocuments.ZoneRender(frame); + var zoneRender = AetheriaRuntimeGameDocuments.ZoneRender(frame); Assert.AreEqual(1, zoneRender.WormholeExits.Count); Assert.AreEqual(0.8 * 25, zoneRender.WormholeExits[0].PositionX, 0.0001); @@ -1946,15 +1946,15 @@ public class DaemonRuntimeDocumentTests 77, 12.1, 0.1); - var viewport = new AetheriaRuntimeRtsViewportBounds + var viewport = new AetheriaRuntimeViewportBounds { MinX = -100, MinY = -100, MaxX = 140, MaxY = 100 }; - var zoneRender = AetheriaRuntimeRtsDocuments.ZoneRender(frame); - var objectsViewport = AetheriaRuntimeRtsDocuments.ObjectsViewport(frame, viewport); + var zoneRender = AetheriaRuntimeGameDocuments.ZoneRender(frame); + var objectsViewport = AetheriaRuntimeGameDocuments.ObjectsViewport(frame, viewport); Assert.AreEqual(zone.Projectiles.Count, zoneRender.Projectiles.Count); Assert.IsTrue(objectsViewport.Objects.Any(obj => diff --git a/Assets/Scripts/UI/Menu/MapRenderer.cs b/Assets/Scripts/UI/Menu/MapRenderer.cs index 2d81b890c..c5cac4ad0 100644 --- a/Assets/Scripts/UI/Menu/MapRenderer.cs +++ b/Assets/Scripts/UI/Menu/MapRenderer.cs @@ -41,7 +41,7 @@ public class MapRenderer : MonoBehaviour private RenderTexture _mapTexture; private int2 _size; private bool _init; - private AetheriaUnityRtsViewportDocuments _viewportDocuments; + private AetheriaUnityGameViewportDocuments _viewportDocuments; private float _nextViewportRefreshTime; private readonly List _rtsIconPool = new List(); @@ -183,7 +183,7 @@ public class MapRenderer : MonoBehaviour if (RtsIconRoot == null) return; - var objects = _viewportDocuments?.CurrentObjectsViewport?.Objects ?? Array.Empty(); + var objects = _viewportDocuments?.CurrentObjectsViewport?.Objects ?? Array.Empty(); for (var i = 0; i < objects.Count; i++) { var icon = ResolveRtsIcon(i); @@ -219,7 +219,7 @@ public class MapRenderer : MonoBehaviour return _rtsIconPool[index]; } - private void ApplyRtsIcon(RawImage icon, AetheriaRuntimeRtsViewportObject obj) + private void ApplyRtsIcon(RawImage icon, AetheriaRuntimeViewportObject obj) { if (icon == null || obj == null) return; @@ -257,7 +257,7 @@ public class MapRenderer : MonoBehaviour (v - 0.5f) * rootRect.height); } - private static Color ResolveIconColor(AetheriaRuntimeRtsViewportObject obj) + private static Color ResolveIconColor(AetheriaRuntimeViewportObject obj) { var color = obj.Controlled ? new Color(0.3f, 0.9f, 1.0f, 1.0f) @@ -290,13 +290,13 @@ public class MapRenderer : MonoBehaviour RtsIconRoot.gameObject.SetActive(active); } - private AetheriaRuntimeRtsViewportBounds ResolveViewportBounds() + private AetheriaRuntimeViewportBounds ResolveViewportBounds() { var screenHeight = _size.y <= 0 ? Math.Max(1, Screen.height) : _size.y; var screenWidth = _size.x <= 0 ? Math.Max(1, Screen.width) : _size.x; var halfHeight = screenHeight * Scale * .5f; var halfWidth = screenWidth * Scale * .5f; - return new AetheriaRuntimeRtsViewportBounds + return new AetheriaRuntimeViewportBounds { MinX = Position.x - halfWidth, MinY = Position.y - halfHeight, diff --git a/Assets/Scripts/UI/Menu/SectorMap.cs b/Assets/Scripts/UI/Menu/SectorMap.cs index 68283999b..6658be9d5 100644 --- a/Assets/Scripts/UI/Menu/SectorMap.cs +++ b/Assets/Scripts/UI/Menu/SectorMap.cs @@ -423,7 +423,7 @@ public class SectorMap : MonoBehaviour return new AetheriaRuntimeRenderSplatsViewportDocument { Schema = AetheriaRuntimeDaemonSchemas.RenderSplatsViewport, - Viewport = new AetheriaRuntimeRtsViewportBounds + Viewport = new AetheriaRuntimeViewportBounds { MinX = minX - padding, MinY = minY - padding, diff --git a/Assets/Scripts/Zone Display/VolumeSampling.cs b/Assets/Scripts/Zone Display/VolumeSampling.cs index a0f8021e5..2bdd5cc91 100644 --- a/Assets/Scripts/Zone Display/VolumeSampling.cs +++ b/Assets/Scripts/Zone Display/VolumeSampling.cs @@ -1,4 +1,4 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public +/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ @@ -250,10 +250,10 @@ public class VolumeSampling : MonoBehaviour : Vector2.zero; } - private static AetheriaRuntimeRtsViewportBounds BuildViewportBounds(Vector2 center, Vector2 size) + private static AetheriaRuntimeViewportBounds BuildViewportBounds(Vector2 center, Vector2 size) { var halfSize = size * 0.5f; - return new AetheriaRuntimeRtsViewportBounds + return new AetheriaRuntimeViewportBounds { MinX = center.x - halfSize.x, MinY = center.y - halfSize.y, diff --git a/Assets/Scripts/Zone Display/ZoneRenderer.cs b/Assets/Scripts/Zone Display/ZoneRenderer.cs index be66b7a56..8fea85431 100644 --- a/Assets/Scripts/Zone Display/ZoneRenderer.cs +++ b/Assets/Scripts/Zone Display/ZoneRenderer.cs @@ -120,7 +120,7 @@ public class ZoneRenderer : MonoBehaviour Array.Empty(); private IReadOnlyList _zoneRenderBodies = Array.Empty(); - private AetheriaUnityRtsViewportDocuments _zonePresentationDocuments; + private AetheriaUnityGameViewportDocuments _zonePresentationDocuments; public Dictionary WormholeInstances = new Dictionary(); private List _loot = new List(); @@ -768,9 +768,9 @@ public class ZoneRenderer : MonoBehaviour center.y + range); } - private static AetheriaRuntimeRtsViewportBounds ToViewportBounds(AetheriaRuntimeXzRect viewport) + private static AetheriaRuntimeViewportBounds ToViewportBounds(AetheriaRuntimeXzRect viewport) { - return new AetheriaRuntimeRtsViewportBounds + return new AetheriaRuntimeViewportBounds { MinX = viewport.MinX, MinY = viewport.MinZ, @@ -892,7 +892,7 @@ public class ZoneRenderer : MonoBehaviour if (!TryCollectDaemonPresentationEntityIndicesFromSoa(viewport)) { var objects = ResolveObjectsViewport(viewport); - foreach (var entity in objects?.Objects ?? Array.Empty()) + foreach (var entity in objects?.Objects ?? Array.Empty()) { if (entity != null && entity.EntityIndex >= 0) _daemonPresentationEntityIndices.Add(entity.EntityIndex); diff --git a/GameCult.Aetheria.State.Unity.csproj b/GameCult.Aetheria.State.Unity.csproj index d87907257..2f1300ec7 100644 --- a/GameCult.Aetheria.State.Unity.csproj +++ b/GameCult.Aetheria.State.Unity.csproj @@ -91,7 +91,7 @@ - + @@ -100,7 +100,7 @@ - + diff --git a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaClientState.cs b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaClientState.cs index eeb9a6bd3..2810d4dc1 100644 --- a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaClientState.cs +++ b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaClientState.cs @@ -18,10 +18,10 @@ namespace GameCult.Aetheria.State.Verse public sealed class AetheriaClientState : IDisposable { - private readonly Func> _mapViewport; - private readonly Func> _objectsViewport; - private readonly Func> _gravityViewport; - private readonly Func> _renderSplatsViewport; + private readonly Func> _mapViewport; + private readonly Func> _objectsViewport; + private readonly Func> _gravityViewport; + private readonly Func> _renderSplatsViewport; private readonly Func> _zoneDetails; private readonly Func> _zoneDetailsSurface; private readonly Func> _inventoryPanelSurface; @@ -57,10 +57,10 @@ namespace GameCult.Aetheria.State.Verse CultMeshDocumentHandle stationRefit, CultMeshDocumentHandle sectorMap, CultMeshDocumentHandle zoneRender, - Func> mapViewport, - Func> objectsViewport, - Func> gravityViewport, - Func> renderSplatsViewport, + Func> mapViewport, + Func> objectsViewport, + Func> gravityViewport, + Func> renderSplatsViewport, Func> zoneDetails, Func> zoneDetailsSurface, Func> inventoryPanelSurface, @@ -207,28 +207,28 @@ namespace GameCult.Aetheria.State.Verse }; } - public CultMeshDocumentHandle RtsViewport( - AetheriaRuntimeRtsViewportBounds viewport) + public CultMeshDocumentHandle GameViewport( + AetheriaRuntimeViewportBounds viewport) { - return _mapViewport(viewport ?? new AetheriaRuntimeRtsViewportBounds()); + return _mapViewport(viewport ?? new AetheriaRuntimeViewportBounds()); } public CultMeshDocumentHandle ObjectsViewport( - AetheriaRuntimeRtsViewportBounds viewport) + AetheriaRuntimeViewportBounds viewport) { - return _objectsViewport(viewport ?? new AetheriaRuntimeRtsViewportBounds()); + return _objectsViewport(viewport ?? new AetheriaRuntimeViewportBounds()); } public CultMeshDocumentHandle GravityViewport( - AetheriaRuntimeRtsViewportBounds viewport) + AetheriaRuntimeViewportBounds viewport) { - return _gravityViewport(viewport ?? new AetheriaRuntimeRtsViewportBounds()); + return _gravityViewport(viewport ?? new AetheriaRuntimeViewportBounds()); } public CultMeshDocumentHandle RenderSplatsViewport( - AetheriaRuntimeRtsViewportBounds viewport) + AetheriaRuntimeViewportBounds viewport) { - return _renderSplatsViewport(viewport ?? new AetheriaRuntimeRtsViewportBounds()); + return _renderSplatsViewport(viewport ?? new AetheriaRuntimeViewportBounds()); } public CultMeshDocumentHandle ZoneDetails(int zoneIndex) diff --git a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeAssets.cs b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeAssets.cs index fe37d8cd4..5b21c8501 100644 --- a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeAssets.cs +++ b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeAssets.cs @@ -53,7 +53,7 @@ namespace GameCult.Aetheria.State.Verse }; } - public static AetheriaRuntimeAssetRef ResolveEntityIcon(AetheriaRuntimeRtsViewportObject? obj) + public static AetheriaRuntimeAssetRef ResolveEntityIcon(AetheriaRuntimeViewportObject? obj) { if (obj?.Controlled == true) return Sprite("map.entity.player", "Sprites/Icons/Stroked/Ship"); @@ -67,7 +67,7 @@ namespace GameCult.Aetheria.State.Verse return Sprite("map.entity.ship", "Sprites/Icons/Stroked/Ship"); } - public static AetheriaRuntimeAssetRef ResolveBodyIcon(AetheriaRuntimeRtsBodyView? body) + public static AetheriaRuntimeAssetRef ResolveBodyIcon(AetheriaRuntimeBodyView? body) { var kind = (body?.Kind ?? "").Trim().ToLowerInvariant(); if (kind.IndexOf("sun", StringComparison.Ordinal) >= 0 || diff --git a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeDaemonDocuments.cs b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeDaemonDocuments.cs index 9bdc41dfe..e1020b663 100644 --- a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeDaemonDocuments.cs +++ b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeDaemonDocuments.cs @@ -62,7 +62,7 @@ namespace GameCult.Aetheria.State.Verse public const string Frame = "gamecult.aetheria.daemon_frame.v1"; public const string Command = "gamecult.aetheria.daemon_command.v1"; public const string CommittedCommandFact = "gamecult.aetheria.committed_command_fact.v1"; - public const string RtsViewport = "gamecult.aetheria.rts_viewport.v1"; + public const string GameViewport = "gamecult.aetheria.game_viewport.v1"; public const string ObjectsViewport = "gamecult.aetheria.objects_viewport.v1"; public const string GravityViewport = "gamecult.aetheria.gravity_viewport.v1"; public const string RenderSplatsViewport = "gamecult.aetheria.render_splats_viewport.v1"; diff --git a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeDaemonGameSurfaceBuilder.cs b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeDaemonGameSurfaceBuilder.cs index d9899519a..1da92b12e 100644 --- a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeDaemonGameSurfaceBuilder.cs +++ b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeDaemonGameSurfaceBuilder.cs @@ -420,9 +420,9 @@ namespace GameCult.Aetheria.State.Verse } } - private static AetheriaRuntimeRtsViewportBounds DefaultViewport() + private static AetheriaRuntimeViewportBounds DefaultViewport() { - return new AetheriaRuntimeRtsViewportBounds + return new AetheriaRuntimeViewportBounds { MinX = -1500, MinY = -1000, @@ -431,9 +431,9 @@ namespace GameCult.Aetheria.State.Verse }; } - private static string ViewportDocumentId(string prefix, AetheriaRuntimeRtsViewportBounds viewport) + private static string ViewportDocumentId(string prefix, AetheriaRuntimeViewportBounds viewport) { - var normalized = AetheriaRuntimeRtsDocuments.Normalize(viewport); + var normalized = AetheriaRuntimeGameDocuments.Normalize(viewport); return string.Join( ".", prefix, diff --git a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeDaemonSimulation.cs b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeDaemonSimulation.cs index 426e3a021..4c2b4ae52 100644 --- a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeDaemonSimulation.cs +++ b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeDaemonSimulation.cs @@ -208,14 +208,14 @@ namespace GameCult.Aetheria.State.Verse var states = (entity.WeaponStates ?? Array.Empty()).ToList(); var state = states.FirstOrDefault(candidate => candidate != null && - string.Equals(candidate.OwnerKind, "daemon-rts", StringComparison.Ordinal) && + string.Equals(candidate.OwnerKind, "daemon-simulation", StringComparison.Ordinal) && candidate.OwnerIndex == entity.EntityIndex); if (state != null) return state; state = new AetheriaRuntimeWeaponStateCommit { - OwnerKind = "daemon-rts", + OwnerKind = "daemon-simulation", OwnerIndex = entity.EntityIndex, BehaviorIndex = 0, BehaviorKind = "ProjectileWeapon", diff --git a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeRtsDocuments.cs b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeGameDocuments.cs similarity index 97% rename from Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeRtsDocuments.cs rename to Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeGameDocuments.cs index 1e96bceeb..9ea62b37e 100644 --- a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeRtsDocuments.cs +++ b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeGameDocuments.cs @@ -6,16 +6,16 @@ using System.Linq; namespace GameCult.Aetheria.State.Verse { - public static class AetheriaRuntimeRtsDocuments + public static class AetheriaRuntimeGameDocuments { - public static AetheriaRuntimeRtsViewportDocument Viewport( + public static AetheriaRuntimeGameViewportDocument Viewport( AetheriaRuntimeDaemonFrameDocument frame, - AetheriaRuntimeRtsViewportBounds viewport) + AetheriaRuntimeViewportBounds viewport) { var objects = ObjectsViewport(frame, viewport); var gravity = GravityViewport(frame, viewport); - return new AetheriaRuntimeRtsViewportDocument + return new AetheriaRuntimeGameViewportDocument { FrameId = objects.FrameId, PublishedAtUtc = objects.PublishedAtUtc, @@ -34,10 +34,10 @@ namespace GameCult.Aetheria.State.Verse public static AetheriaRuntimeObjectsViewportDocument ObjectsViewport( AetheriaRuntimeDaemonFrameDocument frame, - AetheriaRuntimeRtsViewportBounds viewport) + AetheriaRuntimeViewportBounds viewport) { frame ??= new AetheriaRuntimeDaemonFrameDocument(); - viewport ??= new AetheriaRuntimeRtsViewportBounds(); + viewport ??= new AetheriaRuntimeViewportBounds(); var normalizedViewport = Normalize(viewport); var context = Context(frame); @@ -80,10 +80,10 @@ namespace GameCult.Aetheria.State.Verse public static AetheriaRuntimeGravityViewportDocument GravityViewport( AetheriaRuntimeDaemonFrameDocument frame, - AetheriaRuntimeRtsViewportBounds viewport) + AetheriaRuntimeViewportBounds viewport) { frame ??= new AetheriaRuntimeDaemonFrameDocument(); - viewport ??= new AetheriaRuntimeRtsViewportBounds(); + viewport ??= new AetheriaRuntimeViewportBounds(); var normalizedViewport = Normalize(viewport); var context = Context(frame); @@ -112,10 +112,10 @@ namespace GameCult.Aetheria.State.Verse public static AetheriaRuntimeRenderSplatsViewportDocument RenderSplatsViewport( AetheriaRuntimeDaemonFrameDocument frame, - AetheriaRuntimeRtsViewportBounds viewport) + AetheriaRuntimeViewportBounds viewport) { frame ??= new AetheriaRuntimeDaemonFrameDocument(); - viewport ??= new AetheriaRuntimeRtsViewportBounds(); + viewport ??= new AetheriaRuntimeViewportBounds(); var normalizedViewport = Normalize(viewport); var context = Context(frame); @@ -412,7 +412,7 @@ namespace GameCult.Aetheria.State.Verse ? context.Run.CurrentEntityKey ?? "" : AetheriaRuntimeRunCheckpointCommit.EntityRecordKey(context.RunId, context.Zone.ZoneIndex, entity.EntityIndex); var inventory = entity == null - ? Array.Empty() + ? Array.Empty() : Inventory(entity).ToArray(); return new AetheriaRuntimeCurrentEntityDocument @@ -426,8 +426,8 @@ namespace GameCult.Aetheria.State.Verse EntityIndex = entity?.EntityIndex ?? currentEntityIndex, Entity = entity == null ? null : ToViewportObject(entity, context.RunId, context.Zone.ZoneIndex), Status = entity == null - ? new AetheriaRuntimeRtsEntityStatus() - : new AetheriaRuntimeRtsEntityStatus + ? new AetheriaRuntimeEntityStatus() + : new AetheriaRuntimeEntityStatus { Hull = Stat(entity, "hull"), Shield = Stat(entity, "shield"), @@ -765,7 +765,7 @@ namespace GameCult.Aetheria.State.Verse var entity = (context.Zone.Entities ?? Array.Empty()) .FirstOrDefault(candidate => candidate.EntityIndex == entityIndex); var items = entity == null - ? Array.Empty() + ? Array.Empty() : Inventory(entity).ToArray(); return new AetheriaRuntimeInventoryDocument @@ -781,10 +781,10 @@ namespace GameCult.Aetheria.State.Verse }; } - public static AetheriaRuntimeRtsViewportBounds Normalize(AetheriaRuntimeRtsViewportBounds viewport) + public static AetheriaRuntimeViewportBounds Normalize(AetheriaRuntimeViewportBounds viewport) { - viewport ??= new AetheriaRuntimeRtsViewportBounds(); - return new AetheriaRuntimeRtsViewportBounds + viewport ??= new AetheriaRuntimeViewportBounds(); + return new AetheriaRuntimeViewportBounds { MinX = Math.Min(viewport.MinX, viewport.MaxX), MinY = Math.Min(viewport.MinY, viewport.MaxY), @@ -795,7 +795,7 @@ namespace GameCult.Aetheria.State.Verse public static bool IntersectsViewport( AetheriaRuntimeEntitySnapshotCommit entity, - AetheriaRuntimeRtsViewportBounds viewport) + AetheriaRuntimeViewportBounds viewport) { return entity.PositionX >= viewport.MinX && entity.PositionX <= viewport.MaxX && @@ -805,7 +805,7 @@ namespace GameCult.Aetheria.State.Verse public static bool IntersectsViewport( AetheriaRuntimeProjectileCommit projectile, - AetheriaRuntimeRtsViewportBounds viewport) + AetheriaRuntimeViewportBounds viewport) { return projectile.PositionX >= viewport.MinX && projectile.PositionX <= viewport.MaxX && @@ -815,7 +815,7 @@ namespace GameCult.Aetheria.State.Verse public static bool GravityInfluenceIntersectsViewport( AetheriaRuntimeBodySnapshotCommit body, - AetheriaRuntimeRtsViewportBounds viewport) + AetheriaRuntimeViewportBounds viewport) { var radius = ResolveGravityRadius(body); return body.GravityInfluenceCenterX + radius >= viewport.MinX && @@ -831,12 +831,12 @@ namespace GameCult.Aetheria.State.Verse return Math.Max(32, body.BodyRadiusMultiplier * 70); } - private static AetheriaRuntimeRtsViewportObject ToViewportObject( + private static AetheriaRuntimeViewportObject ToViewportObject( AetheriaRuntimeEntitySnapshotCommit entity, string runId, int zoneIndex) { - var obj = new AetheriaRuntimeRtsViewportObject + var obj = new AetheriaRuntimeViewportObject { EntityIndex = entity.EntityIndex, EntityKey = AetheriaRuntimeRunCheckpointCommit.EntityRecordKey(runId, zoneIndex, entity.EntityIndex), @@ -854,7 +854,7 @@ namespace GameCult.Aetheria.State.Verse TargetEntityIndex = entity.TargetEntityIndex, IsActive = entity.IsActive, Visibility = entity.Visibility, - Status = new AetheriaRuntimeRtsEntityStatus + Status = new AetheriaRuntimeEntityStatus { Hull = Stat(entity, "hull"), Shield = Stat(entity, "shield"), @@ -866,10 +866,10 @@ namespace GameCult.Aetheria.State.Verse return obj; } - private static AetheriaRuntimeRtsViewportObject ToViewportObject( + private static AetheriaRuntimeViewportObject ToViewportObject( AetheriaRuntimeProjectileCommit projectile) { - return new AetheriaRuntimeRtsViewportObject + return new AetheriaRuntimeViewportObject { EntityIndex = -1, EntityKey = projectile.ProjectileId ?? "", @@ -887,25 +887,25 @@ namespace GameCult.Aetheria.State.Verse TargetEntityIndex = projectile.TargetEntityIndex, IsActive = projectile.Active, Visibility = projectile.Radius, - Status = new AetheriaRuntimeRtsEntityStatus + Status = new AetheriaRuntimeEntityStatus { Hull = projectile.Damage, Shield = 0, Heat = projectile.AgeSeconds }, - Inventory = Array.Empty(), + Inventory = Array.Empty(), IconAsset = AetheriaRuntimeAssetRef.FromKey( - "aetheria.asset.sprite.rts.projectile", + "aetheria.asset.sprite.game.projectile", AetheriaRuntimeAssetKinds.Sprite, "resources://Sprites/Icons/Lightning Bolt") }; } - private static AetheriaRuntimeRtsBodyView ToBodyView( + private static AetheriaRuntimeBodyView ToBodyView( AetheriaRuntimeBodySnapshotCommit body, AetheriaRuntimeDaemonRenderSettings renderSettings) { - var view = new AetheriaRuntimeRtsBodyView + var view = new AetheriaRuntimeBodyView { BodyKey = body.BodyKey ?? "", OrbitKey = body.OrbitKey ?? "", @@ -922,9 +922,9 @@ namespace GameCult.Aetheria.State.Verse return view; } - private static AetheriaRuntimeRtsGravityInfluence ToGravityInfluence(AetheriaRuntimeBodySnapshotCommit body) + private static AetheriaRuntimeGravityInfluence ToGravityInfluence(AetheriaRuntimeBodySnapshotCommit body) { - return new AetheriaRuntimeRtsGravityInfluence + return new AetheriaRuntimeGravityInfluence { BodyKey = body.BodyKey ?? "", OrbitKey = body.OrbitKey ?? "", @@ -1084,9 +1084,9 @@ namespace GameCult.Aetheria.State.Verse .ToArray(); } - private static IReadOnlyList Inventory(AetheriaRuntimeEntitySnapshotCommit entity) + private static IReadOnlyList Inventory(AetheriaRuntimeEntitySnapshotCommit entity) { - var items = new List(); + var items = new List(); var equipment = entity.Equipment ?? Array.Empty(); for (var equipmentIndex = 0; equipmentIndex < equipment.Count; equipmentIndex++) AddSlot(items, "equipment", equipmentIndex, equipment[equipmentIndex]); @@ -1411,13 +1411,13 @@ namespace GameCult.Aetheria.State.Verse } private static void AddSlot( - List items, + List items, string source, int sourceIndex, AetheriaRuntimeLoadoutItemSlotCommit slot) { var item = slot.Item ?? new AetheriaRuntimeLoadoutItemCommit(); - items.Add(new AetheriaRuntimeRtsInventoryItem + items.Add(new AetheriaRuntimeInventoryItem { Source = source, ItemKey = item.ItemKey ?? "", @@ -1565,7 +1565,7 @@ namespace GameCult.Aetheria.State.Verse var zone = zones.FirstOrDefault(candidate => candidate.ZoneIndex == run.CurrentZoneIndex) ?? zones.FirstOrDefault() ?? new AetheriaRuntimeZoneSnapshotCommit(); - var runId = string.IsNullOrWhiteSpace(run.RunId) ? "local-rts" : run.RunId; + var runId = string.IsNullOrWhiteSpace(run.RunId) ? "local-starbridge" : run.RunId; return new DocumentContext(run, zone, runId); } diff --git a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeRtsDocuments.cs.meta b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeGameDocuments.cs.meta similarity index 100% rename from Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeRtsDocuments.cs.meta rename to Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeGameDocuments.cs.meta diff --git a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeRtsViewportDocuments.cs b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeGameViewportDocuments.cs similarity index 92% rename from Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeRtsViewportDocuments.cs rename to Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeGameViewportDocuments.cs index 145559f99..6ba52975d 100644 --- a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeRtsViewportDocuments.cs +++ b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeGameViewportDocuments.cs @@ -8,12 +8,12 @@ using MessagePack; namespace GameCult.Aetheria.State.Verse { - [CultDocument("gamecult.aetheria.rts_viewport", "gamecult.aetheria.rts_viewport.v1")] + [CultDocument("gamecult.aetheria.game_viewport", "gamecult.aetheria.game_viewport.v1")] [MessagePackObject] - public sealed class AetheriaRuntimeRtsViewportDocument + public sealed class AetheriaRuntimeGameViewportDocument { [Key(0)] - public string Schema { get; set; } = AetheriaRuntimeDaemonSchemas.RtsViewport; + public string Schema { get; set; } = AetheriaRuntimeDaemonSchemas.GameViewport; [Key(1)] public long FrameId { get; set; } @@ -37,22 +37,22 @@ namespace GameCult.Aetheria.State.Verse public string CurrentEntityKey { get; set; } = ""; [Key(8)] - public AetheriaRuntimeRtsViewportBounds Viewport { get; set; } = new AetheriaRuntimeRtsViewportBounds(); + public AetheriaRuntimeViewportBounds Viewport { get; set; } = new AetheriaRuntimeViewportBounds(); [Key(9)] public IReadOnlyList ControlledEntityIndices { get; set; } = Array.Empty(); [Key(10)] - public IReadOnlyList Objects { get; set; } = - Array.Empty(); + public IReadOnlyList Objects { get; set; } = + Array.Empty(); [Key(11)] - public IReadOnlyList GravityInfluences { get; set; } = - Array.Empty(); + public IReadOnlyList GravityInfluences { get; set; } = + Array.Empty(); [Key(12)] - public IReadOnlyList Bodies { get; set; } = - Array.Empty(); + public IReadOnlyList Bodies { get; set; } = + Array.Empty(); } [CultDocument("gamecult.aetheria.objects_viewport", "gamecult.aetheria.objects_viewport.v1")] @@ -84,14 +84,14 @@ namespace GameCult.Aetheria.State.Verse public string CurrentEntityKey { get; set; } = ""; [Key(8)] - public AetheriaRuntimeRtsViewportBounds Viewport { get; set; } = new AetheriaRuntimeRtsViewportBounds(); + public AetheriaRuntimeViewportBounds Viewport { get; set; } = new AetheriaRuntimeViewportBounds(); [Key(9)] public IReadOnlyList ControlledEntityIndices { get; set; } = Array.Empty(); [Key(10)] - public IReadOnlyList Objects { get; set; } = - Array.Empty(); + public IReadOnlyList Objects { get; set; } = + Array.Empty(); } [CultDocument("gamecult.aetheria.gravity_viewport", "gamecult.aetheria.gravity_viewport.v1")] @@ -120,15 +120,15 @@ namespace GameCult.Aetheria.State.Verse public string ZoneName { get; set; } = ""; [Key(7)] - public AetheriaRuntimeRtsViewportBounds Viewport { get; set; } = new AetheriaRuntimeRtsViewportBounds(); + public AetheriaRuntimeViewportBounds Viewport { get; set; } = new AetheriaRuntimeViewportBounds(); [Key(8)] - public IReadOnlyList GravityInfluences { get; set; } = - Array.Empty(); + public IReadOnlyList GravityInfluences { get; set; } = + Array.Empty(); [Key(9)] - public IReadOnlyList Bodies { get; set; } = - Array.Empty(); + public IReadOnlyList Bodies { get; set; } = + Array.Empty(); [Key(10)] public double TerrainRadius { get; set; } @@ -210,22 +210,22 @@ namespace GameCult.Aetheria.State.Verse public int EntityIndex { get; set; } = -1; [Key(8)] - public AetheriaRuntimeRtsViewportObject? Entity { get; set; } + public AetheriaRuntimeViewportObject? Entity { get; set; } [Key(9)] - public AetheriaRuntimeRtsEntityStatus Status { get; set; } = new AetheriaRuntimeRtsEntityStatus(); + public AetheriaRuntimeEntityStatus Status { get; set; } = new AetheriaRuntimeEntityStatus(); [Key(10)] - public IReadOnlyList Inventory { get; set; } = - Array.Empty(); + public IReadOnlyList Inventory { get; set; } = + Array.Empty(); [Key(11)] - public IReadOnlyList Equipment { get; set; } = - Array.Empty(); + public IReadOnlyList Equipment { get; set; } = + Array.Empty(); [Key(12)] - public IReadOnlyList Cargo { get; set; } = - Array.Empty(); + public IReadOnlyList Cargo { get; set; } = + Array.Empty(); [Key(13)] public double ShutdownPerformance { get; set; } @@ -333,7 +333,7 @@ namespace GameCult.Aetheria.State.Verse public int DockingBayIndex { get; set; } = -1; [Key(12)] - public AetheriaRuntimeRtsViewportObject? DockParent { get; set; } + public AetheriaRuntimeViewportObject? DockParent { get; set; } [Key(13)] public string DockParentOrbitKey { get; set; } = ""; @@ -491,7 +491,7 @@ namespace GameCult.Aetheria.State.Verse public int DockingBayIndex { get; set; } = -1; [Key(12)] - public AetheriaRuntimeRtsViewportObject? DockParent { get; set; } + public AetheriaRuntimeViewportObject? DockParent { get; set; } [Key(13)] public IReadOnlyList AvailableEntities { get; set; } = @@ -1266,7 +1266,7 @@ namespace GameCult.Aetheria.State.Verse public int EntityIndex { get; set; } [Key(5)] - public AetheriaRuntimeRtsViewportObject? Selected { get; set; } + public AetheriaRuntimeViewportObject? Selected { get; set; } } [CultDocument("gamecult.aetheria.inventory", "gamecult.aetheria.inventory.v1")] @@ -1292,20 +1292,20 @@ namespace GameCult.Aetheria.State.Verse public string EntityKey { get; set; } = ""; [Key(6)] - public IReadOnlyList Items { get; set; } = - Array.Empty(); + public IReadOnlyList Items { get; set; } = + Array.Empty(); [Key(7)] - public IReadOnlyList Equipment { get; set; } = - Array.Empty(); + public IReadOnlyList Equipment { get; set; } = + Array.Empty(); [Key(8)] - public IReadOnlyList Cargo { get; set; } = - Array.Empty(); + public IReadOnlyList Cargo { get; set; } = + Array.Empty(); } [MessagePackObject] - public sealed class AetheriaRuntimeRtsViewportBounds + public sealed class AetheriaRuntimeViewportBounds { [Key(0)] public double MinX { get; set; } @@ -1321,7 +1321,7 @@ namespace GameCult.Aetheria.State.Verse } [MessagePackObject] - public sealed class AetheriaRuntimeRtsViewportObject + public sealed class AetheriaRuntimeViewportObject { [Key(0)] public int EntityIndex { get; set; } @@ -1372,11 +1372,11 @@ namespace GameCult.Aetheria.State.Verse public double Visibility { get; set; } [Key(16)] - public AetheriaRuntimeRtsEntityStatus Status { get; set; } = new AetheriaRuntimeRtsEntityStatus(); + public AetheriaRuntimeEntityStatus Status { get; set; } = new AetheriaRuntimeEntityStatus(); [Key(17)] - public IReadOnlyList Inventory { get; set; } = - Array.Empty(); + public IReadOnlyList Inventory { get; set; } = + Array.Empty(); [Key(18)] public AetheriaRuntimeAssetRef IconAsset { get; set; } = @@ -1384,7 +1384,7 @@ namespace GameCult.Aetheria.State.Verse } [MessagePackObject] - public sealed class AetheriaRuntimeRtsEntityStatus + public sealed class AetheriaRuntimeEntityStatus { [Key(0)] public double Hull { get; set; } @@ -1397,7 +1397,7 @@ namespace GameCult.Aetheria.State.Verse } [MessagePackObject] - public sealed class AetheriaRuntimeRtsInventoryItem + public sealed class AetheriaRuntimeInventoryItem { [Key(0)] public string Source { get; set; } = ""; @@ -1432,7 +1432,7 @@ namespace GameCult.Aetheria.State.Verse } [MessagePackObject] - public sealed class AetheriaRuntimeRtsGravityInfluence + public sealed class AetheriaRuntimeGravityInfluence { [Key(0)] public string BodyKey { get; set; } = ""; @@ -1469,7 +1469,7 @@ namespace GameCult.Aetheria.State.Verse } [MessagePackObject] - public sealed class AetheriaRuntimeRtsBodyView + public sealed class AetheriaRuntimeBodyView { [Key(0)] public string BodyKey { get; set; } = ""; diff --git a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeRtsViewportDocuments.cs.meta b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeGameViewportDocuments.cs.meta similarity index 100% rename from Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeRtsViewportDocuments.cs.meta rename to Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeGameViewportDocuments.cs.meta diff --git a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeInventoryPanelSurfaceBuilder.cs b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeInventoryPanelSurfaceBuilder.cs index 81aeb6ff4..6d1eb0476 100644 --- a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeInventoryPanelSurfaceBuilder.cs +++ b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeInventoryPanelSurfaceBuilder.cs @@ -127,31 +127,31 @@ namespace GameCult.Aetheria.State.Verse }); } - private static IReadOnlyList ResolveItems( + private static IReadOnlyList ResolveItems( AetheriaRuntimeInventoryDocument displayedInventory, AetheriaRuntimeInventoryPanelSurfaceRequest request, bool isEquipmentView, bool isCargoView) { if (displayedInventory == null) - return Array.Empty(); + return Array.Empty(); if (isEquipmentView) - return displayedInventory.Equipment ?? Array.Empty(); + return displayedInventory.Equipment ?? Array.Empty(); if (isCargoView) { - return (displayedInventory.Cargo ?? Array.Empty()) + return (displayedInventory.Cargo ?? Array.Empty()) .Where(item => item != null && item.SourceIndex == request.DisplayedCargoIndex) .ToArray(); } - return Array.Empty(); + return Array.Empty(); } private static AetheriaRuntimeSurfaceComponent Grid( string id, - IReadOnlyList items, + IReadOnlyList items, AetheriaRuntimeCatalogSnapshot catalog, AetheriaRuntimePlayerSettingsDocument playerSettings) { @@ -170,7 +170,7 @@ namespace GameCult.Aetheria.State.Verse AddAssetProps(props, "foregroundAtlas", AetheriaRuntimeAssets.InventoryCellForegroundAtlas()); AddAssetProps(props, "thermalLayer", AetheriaRuntimeAssets.InventoryThermalLayerAtlas()); - var cells = (items ?? Array.Empty()) + var cells = (items ?? Array.Empty()) .Where(item => item != null) .OrderBy(item => item.SourceIndex) .ThenBy(item => item.X) @@ -286,7 +286,7 @@ namespace GameCult.Aetheria.State.Verse private static AetheriaRuntimeSurfaceComponent ItemCell( string gridId, - AetheriaRuntimeRtsInventoryItem item, + AetheriaRuntimeInventoryItem item, AetheriaRuntimeCatalogSnapshot catalog, AetheriaRuntimePlayerSettingsDocument playerSettings) { @@ -355,7 +355,7 @@ namespace GameCult.Aetheria.State.Verse } private static AetheriaRuntimeAssetRef ResolveItemIconAsset( - AetheriaRuntimeRtsInventoryItem item, + AetheriaRuntimeInventoryItem item, AetheriaRuntimeCatalogItem typedItem) { if (!string.IsNullOrWhiteSpace(item?.IconAsset?.AssetKey)) diff --git a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeMainMenuSurfaceBuilder.cs b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeMainMenuSurfaceBuilder.cs index cd12f77f9..99f5aacbd 100644 --- a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeMainMenuSurfaceBuilder.cs +++ b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeMainMenuSurfaceBuilder.cs @@ -517,9 +517,9 @@ namespace GameCult.Aetheria.State.Verse null); } - private static AetheriaRuntimeRtsViewportBounds MainMenuViewport() + private static AetheriaRuntimeViewportBounds MainMenuViewport() { - return new AetheriaRuntimeRtsViewportBounds + return new AetheriaRuntimeViewportBounds { MinX = -1500, MinY = -1000, @@ -528,9 +528,9 @@ namespace GameCult.Aetheria.State.Verse }; } - private static string ViewportDocumentId(string prefix, AetheriaRuntimeRtsViewportBounds viewport) + private static string ViewportDocumentId(string prefix, AetheriaRuntimeViewportBounds viewport) { - var normalized = AetheriaRuntimeRtsDocuments.Normalize(viewport); + var normalized = AetheriaRuntimeGameDocuments.Normalize(viewport); return string.Join( ".", prefix, @@ -709,7 +709,7 @@ namespace GameCult.Aetheria.State.Verse .Where(entity => entity != null && entity.IsActive) .Select(entity => { - var entityKey = AetheriaRuntimeRunCheckpointCommit.EntityRecordKey(run?.RunId ?? "local-rts", currentZone.ZoneIndex, entity.EntityIndex); + var entityKey = AetheriaRuntimeRunCheckpointCommit.EntityRecordKey(run?.RunId ?? "local-starbridge", currentZone.ZoneIndex, entity.EntityIndex); return new AetheriaMainMenuGravityObject( entityKey, entity.Kind, diff --git a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeRenderSplatDocuments.cs b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeRenderSplatDocuments.cs index 9260df8a1..4e958ffe3 100644 --- a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeRenderSplatDocuments.cs +++ b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeRenderSplatDocuments.cs @@ -76,7 +76,7 @@ namespace GameCult.Aetheria.State.Verse public string ZoneName { get; set; } = ""; [Key(7)] - public AetheriaRuntimeRtsViewportBounds Viewport { get; set; } = new AetheriaRuntimeRtsViewportBounds(); + public AetheriaRuntimeViewportBounds Viewport { get; set; } = new AetheriaRuntimeViewportBounds(); [Key(8)] public IReadOnlyList Layers { get; set; } = diff --git a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeRtsSimulation.cs.meta b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeRtsSimulation.cs.meta deleted file mode 100644 index 15a241332..000000000 --- a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeRtsSimulation.cs.meta +++ /dev/null @@ -1,2 +0,0 @@ -fileFormatVersion: 2 -guid: d6c48952d8a711741ac2d30301ebfdd0 \ No newline at end of file diff --git a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeTradeValuePolicySurfaceBuilder.cs b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeTradeValuePolicySurfaceBuilder.cs index 18ca2f119..4184d9b0a 100644 --- a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeTradeValuePolicySurfaceBuilder.cs +++ b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeTradeValuePolicySurfaceBuilder.cs @@ -53,7 +53,7 @@ namespace GameCult.Aetheria.State.Verse $"{Format(settings?.QualityPriceModifier.Minimum ?? 0)} -> {Format(settings?.QualityPriceModifier.Maximum ?? 0)}"), Text( "aetheria.tradeValuePolicy.summary.note", - "Trade value is authored as typed policy state so inventory, trade, loadout pricing, and RTS station stock read the same curve.")); + "Trade value is authored as typed policy state so inventory, trade, loadout pricing, and Starbridge station stock read the same curve.")); } private static AetheriaRuntimeSurfaceComponent BuildQualityCurveCard( diff --git a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeVerseAuthorityPolicy.cs b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeVerseAuthorityPolicy.cs index 8250331b4..9cd3f959c 100644 --- a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeVerseAuthorityPolicy.cs +++ b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeVerseAuthorityPolicy.cs @@ -41,7 +41,7 @@ namespace GameCult.Aetheria.State.Verse { public const string SimulationHost = "simulation-host"; public const string UnityPlayer = "unity-player"; - public const string RtsCommander = "rts-commander"; + public const string StarbridgeCommander = "starbridge-commander"; public const string BrowserObserver = "browser-observer"; public const string BrowserSimulationHost = "browser-simulation-host"; public const string NativeSimulationKernel = "native-simulation-kernel"; diff --git a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeVerseClient.cs b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeVerseClient.cs index 3628a54ba..d739e412f 100644 --- a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeVerseClient.cs +++ b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeVerseClient.cs @@ -462,19 +462,19 @@ namespace GameCult.Aetheria.State.Verse verseHostSettingsDocument, ManagedFrameDocument( "aetheria.current.zone", - frame => Task.FromResult(AetheriaRuntimeRtsDocuments.CurrentZone(frame)), + frame => Task.FromResult(AetheriaRuntimeGameDocuments.CurrentZone(frame)), AetheriaRuntimeDaemonSchemas.CurrentZone), ManagedFrameDocument( "aetheria.current.entity", - frame => Task.FromResult(AetheriaRuntimeRtsDocuments.CurrentEntity(frame)), + frame => Task.FromResult(AetheriaRuntimeGameDocuments.CurrentEntity(frame)), AetheriaRuntimeDaemonSchemas.CurrentEntity), ManagedFrameDocument( "aetheria.current.docking", - frame => Task.FromResult(AetheriaRuntimeRtsDocuments.CurrentDocking(frame)), + frame => Task.FromResult(AetheriaRuntimeGameDocuments.CurrentDocking(frame)), AetheriaRuntimeDaemonSchemas.CurrentDocking), ManagedFrameDocument( "aetheria.zone.contacts", - frame => Task.FromResult(AetheriaRuntimeRtsDocuments.ZoneContacts(frame)), + frame => Task.FromResult(AetheriaRuntimeGameDocuments.ZoneContacts(frame)), AetheriaRuntimeDaemonSchemas.ZoneContacts), ManagedFrameDocument( "aetheria.station.refit", @@ -484,31 +484,31 @@ namespace GameCult.Aetheria.State.Verse CultMesh.ProjectionSource("loadout-templates:aetheria.runtime")), ManagedFrameDocument( "aetheria.sector.map", - frame => Task.FromResult(AetheriaRuntimeRtsDocuments.SectorMap(frame)), + frame => Task.FromResult(AetheriaRuntimeGameDocuments.SectorMap(frame)), AetheriaRuntimeDaemonSchemas.SectorMap), ManagedFrameDocument( "aetheria.zone.render", - frame => Task.FromResult(AetheriaRuntimeRtsDocuments.ZoneRender(frame)), + frame => Task.FromResult(AetheriaRuntimeGameDocuments.ZoneRender(frame)), AetheriaRuntimeDaemonSchemas.ZoneRender), viewport => ManagedFrameDocument( ViewportDocumentId("aetheria.viewport.map", viewport), - frame => Task.FromResult(AetheriaRuntimeRtsDocuments.Viewport(frame, viewport)), - AetheriaRuntimeDaemonSchemas.RtsViewport), + frame => Task.FromResult(AetheriaRuntimeGameDocuments.Viewport(frame, viewport)), + AetheriaRuntimeDaemonSchemas.GameViewport), viewport => ManagedFrameDocument( ViewportDocumentId("aetheria.viewport.objects", viewport), - frame => Task.FromResult(AetheriaRuntimeRtsDocuments.ObjectsViewport(frame, viewport)), + frame => Task.FromResult(AetheriaRuntimeGameDocuments.ObjectsViewport(frame, viewport)), AetheriaRuntimeDaemonSchemas.ObjectsViewport), viewport => ManagedFrameDocument( ViewportDocumentId("aetheria.viewport.gravity", viewport), - frame => Task.FromResult(AetheriaRuntimeRtsDocuments.GravityViewport(frame, viewport)), + frame => Task.FromResult(AetheriaRuntimeGameDocuments.GravityViewport(frame, viewport)), AetheriaRuntimeDaemonSchemas.GravityViewport), viewport => ManagedFrameDocument( ViewportDocumentId("aetheria.viewport.render_splats", viewport), - frame => Task.FromResult(AetheriaRuntimeRtsDocuments.RenderSplatsViewport(frame, viewport)), + frame => Task.FromResult(AetheriaRuntimeGameDocuments.RenderSplatsViewport(frame, viewport)), AetheriaRuntimeDaemonSchemas.RenderSplatsViewport), zoneIndex => ManagedFrameDocument( IndexedDocumentId("aetheria.zone.details", zoneIndex), - frame => Task.FromResult(AetheriaRuntimeRtsDocuments.ZoneDetails(frame, zoneIndex)), + frame => Task.FromResult(AetheriaRuntimeGameDocuments.ZoneDetails(frame, zoneIndex)), AetheriaRuntimeDaemonSchemas.ZoneDetails), zoneIndex => ManagedFrameDocument( IndexedDocumentId("aetheria.zone.details.surface", zoneIndex), @@ -535,11 +535,11 @@ namespace GameCult.Aetheria.State.Verse inGame), entityIndex => ManagedFrameDocument( IndexedDocumentId("aetheria.object.selected", entityIndex), - frame => Task.FromResult(AetheriaRuntimeRtsDocuments.SelectedObject(frame, entityIndex)), + frame => Task.FromResult(AetheriaRuntimeGameDocuments.SelectedObject(frame, entityIndex)), AetheriaRuntimeDaemonSchemas.SelectedObject), entityIndex => ManagedFrameDocument( IndexedDocumentId("aetheria.inventory", entityIndex), - frame => Task.FromResult(AetheriaRuntimeRtsDocuments.Inventory(frame, entityIndex)), + frame => Task.FromResult(AetheriaRuntimeGameDocuments.Inventory(frame, entityIndex)), AetheriaRuntimeDaemonSchemas.Inventory), starbridgeScenarioDocument, starbridgeSessionDocument, @@ -676,7 +676,7 @@ namespace GameCult.Aetheria.State.Verse Task StationRefitAsync( AetheriaRuntimeDaemonFrameDocument frame) { - return Task.FromResult(AetheriaRuntimeRtsDocuments.StationRefit( + return Task.FromResult(AetheriaRuntimeGameDocuments.StationRefit( frame, RequireManagedLoadoutTemplates().Templates, RequireManagedCatalog())); @@ -733,8 +733,8 @@ namespace GameCult.Aetheria.State.Verse int zoneIndex) { return Task.FromResult(AetheriaRuntimeZoneDetailsSurfaceBuilder.BuildFromDocuments( - AetheriaRuntimeRtsDocuments.ZoneDetails(frame, zoneIndex), - AetheriaRuntimeRtsDocuments.SectorMap(frame), + AetheriaRuntimeGameDocuments.ZoneDetails(frame, zoneIndex), + AetheriaRuntimeGameDocuments.SectorMap(frame), RequireManagedCatalog(), RequireManagedPlayerSettings(), DateTime.UtcNow.ToString("O", CultureInfo.InvariantCulture))); @@ -750,11 +750,11 @@ namespace GameCult.Aetheria.State.Verse : request.DisplayedCargoEntityIndex; var inventory = entityIndex < 0 ? new AetheriaRuntimeInventoryDocument() - : AetheriaRuntimeRtsDocuments.Inventory(frame, entityIndex); + : AetheriaRuntimeGameDocuments.Inventory(frame, entityIndex); return Task.FromResult(AetheriaRuntimeInventoryPanelSurfaceBuilder.BuildFromDocuments( - AetheriaRuntimeRtsDocuments.CurrentEntity(frame), - AetheriaRuntimeRtsDocuments.StationRefit( + AetheriaRuntimeGameDocuments.CurrentEntity(frame), + AetheriaRuntimeGameDocuments.StationRefit( frame, RequireManagedLoadoutTemplates().Templates, RequireManagedCatalog()), @@ -771,7 +771,7 @@ namespace GameCult.Aetheria.State.Verse AetheriaRuntimeInventoryDropdownSurfaceRequest request) { return Task.FromResult(AetheriaRuntimeInventoryDropdownSurfaceBuilder.BuildFromDocuments( - AetheriaRuntimeRtsDocuments.StationRefit( + AetheriaRuntimeGameDocuments.StationRefit( frame, RequireManagedLoadoutTemplates().Templates, RequireManagedCatalog()), @@ -876,9 +876,9 @@ namespace GameCult.Aetheria.State.Verse return $"{prefix}.{index.ToString(CultureInfo.InvariantCulture)}"; } - static string ViewportDocumentId(string prefix, AetheriaRuntimeRtsViewportBounds viewport) + static string ViewportDocumentId(string prefix, AetheriaRuntimeViewportBounds viewport) { - var normalized = AetheriaRuntimeRtsDocuments.Normalize(viewport); + var normalized = AetheriaRuntimeGameDocuments.Normalize(viewport); return string.Join( ".", prefix, diff --git a/docs/aetheria-perfect-machine-map.md b/docs/aetheria-perfect-machine-map.md index e2756cca3..5850e52da 100644 --- a/docs/aetheria-perfect-machine-map.md +++ b/docs/aetheria-perfect-machine-map.md @@ -161,8 +161,8 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. `Zone.GetHeight` behavior are parity evidence for the new Eve field renderer, not a permanent side path. Object and body icon selection is provider-owned too: - `AetheriaRuntimeRtsViewportObject.IconAsset` and - `AetheriaRuntimeRtsBodyView.IconAsset` carry the CultMesh CDN asset refs. A + `AetheriaRuntimeViewportObject.IconAsset` and + `AetheriaRuntimeBodyView.IconAsset` carry the CultMesh CDN asset refs. A lowering target may draw the advertised asset or expose the missing provider data, but it must not synthesize icons, glow, asset paths, gravity fields, or backdrop noise as renderer-local compensation. diff --git a/docs/developer-navigation.md b/docs/developer-navigation.md index 15f9101d4..bf6f9388c 100644 --- a/docs/developer-navigation.md +++ b/docs/developer-navigation.md @@ -278,7 +278,7 @@ Add or inspect a typed runtime document: - `Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeDaemonDocuments.cs` - `Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeSnapshotDocuments.cs` -- `Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeRtsViewportDocuments.cs` +- `Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeGameViewportDocuments.cs` - `Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeStarbridgeDocuments.cs` - `Aetheria.State/AetheriaDocumentRegistry.cs` - `Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeVerseClient.cs` @@ -294,7 +294,7 @@ Add or inspect a daemon command: Add a managed derived document/query: -- `Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeRtsDocuments.cs` +- `Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeGameDocuments.cs` - `Packages/org.gamecult.aetheria.state/Runtime/AetheriaClient.cs` - `Aetheria.Rts.Web/Electron/aetheria-rts-local-documents.ts` - `Aetheria.Rts.Web/Electron/aetheria-rts-generated-bindings.ts`