Rename Unity observed frame helpers
This commit is contained in:
parent
203fe80c0e
commit
50ae86bc4c
8 changed files with 80 additions and 80 deletions
|
|
@ -3012,7 +3012,7 @@ static void RequireTypedRuntimeBehaviorCoverage(string root)
|
|||
{
|
||||
var itemManagerPath = Path.Combine(root, "Assets", "Scripts", "ServerShared", "ItemManager.cs");
|
||||
var actionGameManagerPath = Path.Combine(root, "Assets", "Scripts", "Gameplay", "ActionGameManager.cs");
|
||||
var observedEntityProjectorPath = Path.Combine(root, "Assets", "Scripts", "Gameplay", "AetheriaUnityObservedEntityProjector.cs");
|
||||
var observedEntityRestorerPath = Path.Combine(root, "Assets", "Scripts", "Gameplay", "AetheriaUnityObservedEntityRestorer.cs");
|
||||
|
||||
var itemManager = File.Exists(itemManagerPath)
|
||||
? File.ReadAllText(itemManagerPath)
|
||||
|
|
@ -3020,10 +3020,10 @@ static void RequireTypedRuntimeBehaviorCoverage(string root)
|
|||
var actionGameManager = File.Exists(actionGameManagerPath)
|
||||
? File.ReadAllText(actionGameManagerPath)
|
||||
: throw new InvalidOperationException("Cannot verify typed runtime behavior coverage; ActionGameManager.cs is missing.");
|
||||
var observedEntityProjector = File.Exists(observedEntityProjectorPath)
|
||||
? File.ReadAllText(observedEntityProjectorPath)
|
||||
: throw new InvalidOperationException("Cannot verify typed runtime behavior coverage; AetheriaUnityObservedEntityProjector.cs is missing.");
|
||||
var runtimeRestoreSource = actionGameManager + "\n" + observedEntityProjector;
|
||||
var observedEntityRestorer = File.Exists(observedEntityRestorerPath)
|
||||
? File.ReadAllText(observedEntityRestorerPath)
|
||||
: throw new InvalidOperationException("Cannot verify typed runtime behavior coverage; AetheriaUnityObservedEntityRestorer.cs is missing.");
|
||||
var runtimeRestoreSource = actionGameManager + "\n" + observedEntityRestorer;
|
||||
|
||||
var requiredFactoryMappings = new[]
|
||||
{
|
||||
|
|
@ -12186,18 +12186,18 @@ static void RequireMainMenuContinueRunState(string root)
|
|||
var daemonEntitySnapshotProjector = File.Exists(daemonEntitySnapshotProjectorPath)
|
||||
? File.ReadAllText(daemonEntitySnapshotProjectorPath)
|
||||
: throw new InvalidOperationException("Cannot verify Continue entity projection; AetheriaRuntimeEntitySnapshotProjector.cs is missing.");
|
||||
var observedEntityProjectorPath = Path.Combine(root, "Assets", "Scripts", "Gameplay", "AetheriaUnityObservedEntityProjector.cs");
|
||||
var observedEntityProjector = File.Exists(observedEntityProjectorPath)
|
||||
? File.ReadAllText(observedEntityProjectorPath)
|
||||
: throw new InvalidOperationException("Cannot verify Continue entity projection; AetheriaUnityObservedEntityProjector.cs is missing.");
|
||||
var observedEntityRestorerPath = Path.Combine(root, "Assets", "Scripts", "Gameplay", "AetheriaUnityObservedEntityRestorer.cs");
|
||||
var observedEntityRestorer = File.Exists(observedEntityRestorerPath)
|
||||
? File.ReadAllText(observedEntityRestorerPath)
|
||||
: throw new InvalidOperationException("Cannot verify Continue entity projection; AetheriaUnityObservedEntityRestorer.cs is missing.");
|
||||
var entityConstructionBlueprintProjectorPath = Path.Combine(root, "Assets", "Scripts", "Gameplay", "AetheriaUnityEntityConstructionBlueprintProjector.cs");
|
||||
var entityConstructionBlueprintProjector = File.Exists(entityConstructionBlueprintProjectorPath)
|
||||
? File.ReadAllText(entityConstructionBlueprintProjectorPath)
|
||||
: throw new InvalidOperationException("Cannot verify Continue entity construction projection; AetheriaUnityEntityConstructionBlueprintProjector.cs is missing.");
|
||||
var observedZoneContextProjectorPath = Path.Combine(root, "Assets", "Scripts", "Gameplay", "AetheriaUnityObservedZoneContextProjector.cs");
|
||||
var observedZoneContextProjector = File.Exists(observedZoneContextProjectorPath)
|
||||
? File.ReadAllText(observedZoneContextProjectorPath)
|
||||
: throw new InvalidOperationException("Cannot verify Continue zone context projection; AetheriaUnityObservedZoneContextProjector.cs is missing.");
|
||||
var observedZoneContextFactoryPath = Path.Combine(root, "Assets", "Scripts", "Gameplay", "AetheriaUnityObservedZoneContextFactory.cs");
|
||||
var observedZoneContextFactory = File.Exists(observedZoneContextFactoryPath)
|
||||
? File.ReadAllText(observedZoneContextFactoryPath)
|
||||
: throw new InvalidOperationException("Cannot verify Continue zone context projection; AetheriaUnityObservedZoneContextFactory.cs is missing.");
|
||||
var gameplaySceneWiringPath = Path.Combine(root, "Assets", "Scripts", "Gameplay", "AetheriaUnityGameplaySceneWiring.cs");
|
||||
var gameplaySceneWiring = File.Exists(gameplaySceneWiringPath)
|
||||
? File.ReadAllText(gameplaySceneWiringPath)
|
||||
|
|
@ -12240,7 +12240,7 @@ static void RequireMainMenuContinueRunState(string root)
|
|||
"private Galaxy ObservedGalaxy { get; set; }",
|
||||
"ObservedGalaxy = boot.ObservedGalaxy",
|
||||
"ResolveObservedGalaxyZone",
|
||||
"private AetheriaUnityObservedZoneContextProjector ObservedZoneContextProjector =>",
|
||||
"private AetheriaUnityObservedZoneContextFactory ObservedZoneContextFactory =>",
|
||||
"entity => CurrentEntityBinder.RestoreBinding(entity)",
|
||||
"private AetheriaUnityObservedTargetQuery ObservedTargetQuery =>",
|
||||
"ResolveObservedTarget = entity => ObservedTargetQuery.GetObservedTarget(entity)",
|
||||
|
|
@ -12329,9 +12329,9 @@ static void RequireMainMenuContinueRunState(string root)
|
|||
string.Join(", ", managerSnapshotProjectionHits));
|
||||
}
|
||||
|
||||
var requiredObservedEntityProjectorSymbols = new[]
|
||||
var requiredObservedEntityRestorerSymbols = new[]
|
||||
{
|
||||
"public sealed class AetheriaUnityObservedEntityProjector",
|
||||
"public sealed class AetheriaUnityObservedEntityRestorer",
|
||||
"public bool TryApplyInPlace(",
|
||||
"public void Replace(",
|
||||
"EntityConstructionBlueprintProjector.ProjectObservedFromBlueprint(_itemManager, zone, blueprint)",
|
||||
|
|
@ -12346,14 +12346,14 @@ static void RequireMainMenuContinueRunState(string root)
|
|||
"resourceScanner.RestoreRuntimeState(",
|
||||
"_entityIndex.RefreshDaemonIndex();"
|
||||
};
|
||||
var missingObservedEntityProjectorSymbols = requiredObservedEntityProjectorSymbols
|
||||
.Where(symbol => !observedEntityProjector.Contains(symbol, StringComparison.Ordinal))
|
||||
var missingObservedEntityRestorerSymbols = requiredObservedEntityRestorerSymbols
|
||||
.Where(symbol => !observedEntityRestorer.Contains(symbol, StringComparison.Ordinal))
|
||||
.ToArray();
|
||||
if (missingObservedEntityProjectorSymbols.Length > 0)
|
||||
if (missingObservedEntityRestorerSymbols.Length > 0)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"Observed Unity entity mutation/restoration must live in AetheriaUnityObservedEntityProjector instead of ActionGameManager: " +
|
||||
string.Join(", ", missingObservedEntityProjectorSymbols));
|
||||
"Observed Unity entity mutation/restoration must live in AetheriaUnityObservedEntityRestorer instead of ActionGameManager: " +
|
||||
string.Join(", ", missingObservedEntityRestorerSymbols));
|
||||
}
|
||||
|
||||
var forbiddenManagerFacadeProjectionSymbols = new[]
|
||||
|
|
@ -12430,9 +12430,9 @@ static void RequireMainMenuContinueRunState(string root)
|
|||
string.Join(", ", managerEntityConstructionHits));
|
||||
}
|
||||
|
||||
var requiredObservedZoneContextProjectorSymbols = new[]
|
||||
var requiredObservedZoneContextFactorySymbols = new[]
|
||||
{
|
||||
"public sealed class AetheriaUnityObservedZoneContextProjector",
|
||||
"public sealed class AetheriaUnityObservedZoneContextFactory",
|
||||
"public Zone ResolveContext(",
|
||||
"private readonly Dictionary<int, Zone> _observedZoneContextsByDaemonIndex",
|
||||
"private static ZoneConstructionBlueprint CreateZoneConstructionBlueprint(",
|
||||
|
|
@ -12443,14 +12443,14 @@ static void RequireMainMenuContinueRunState(string root)
|
|||
"new Zone(_itemManager, _planetSettings, constructionBlueprint, galaxyZone, _observedGalaxy)",
|
||||
"_playMusic(MusicType.Overworld);"
|
||||
};
|
||||
var missingObservedZoneContextProjectorSymbols = requiredObservedZoneContextProjectorSymbols
|
||||
.Where(symbol => !observedZoneContextProjector.Contains(symbol, StringComparison.Ordinal))
|
||||
var missingObservedZoneContextFactorySymbols = requiredObservedZoneContextFactorySymbols
|
||||
.Where(symbol => !observedZoneContextFactory.Contains(symbol, StringComparison.Ordinal))
|
||||
.ToArray();
|
||||
if (missingObservedZoneContextProjectorSymbols.Length > 0)
|
||||
if (missingObservedZoneContextFactorySymbols.Length > 0)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"Observed Unity zone context lowering must live in AetheriaUnityObservedZoneContextProjector instead of ActionGameManager: " +
|
||||
string.Join(", ", missingObservedZoneContextProjectorSymbols));
|
||||
"Observed Unity zone context lowering must live in AetheriaUnityObservedZoneContextFactory instead of ActionGameManager: " +
|
||||
string.Join(", ", missingObservedZoneContextFactorySymbols));
|
||||
}
|
||||
|
||||
var forbiddenManagerZoneContextProjectionSymbols = new[]
|
||||
|
|
@ -12484,10 +12484,10 @@ static void RequireMainMenuContinueRunState(string root)
|
|||
"Aetheria zone-render feed does not identify a run id.",
|
||||
"AetheriaRuntimeEntitySnapshotProjector.CreateSnapshots(runId, render.ZoneIndex, render.EntitySnapshots)",
|
||||
".OrderBy(entity => entity.EntityIndex)",
|
||||
"_entityProjector.TryApplyInPlace(",
|
||||
"_entityRestorer.TryApplyInPlace(",
|
||||
"zoneRenderer?.ApplyZoneRender(render)",
|
||||
"_zoneContextProjector.ResolveContext(targetZone, render)",
|
||||
"_entityProjector.Replace(entitySnapshots, currentEntityKey, _getZone())",
|
||||
"_zoneContextFactory.ResolveContext(targetZone, render)",
|
||||
"_entityRestorer.Replace(entitySnapshots, currentEntityKey, _getZone())",
|
||||
"_restoreCurrentEntityBinding(currentEntity)",
|
||||
"_entityIndex.TryResolveEntityByRecordKey(currentEntityKey, out var currentEntity)",
|
||||
"_entityIndex.EntitiesByDaemonIndex",
|
||||
|
|
@ -12513,8 +12513,8 @@ static void RequireMainMenuContinueRunState(string root)
|
|||
"private bool TryRestoreEntityGraphFromZoneRender(",
|
||||
"AetheriaRuntimeRtsProjection.ProjectZoneRender(observed.Frame)",
|
||||
"AetheriaRuntimeEntitySnapshotProjector.CreateSnapshots(runId, daemonZone)",
|
||||
"ObservedEntityProjector.TryApplyInPlace(",
|
||||
"ObservedEntityProjector.Replace(entitySnapshots, currentEntityKey, Zone)",
|
||||
"ObservedEntityRestorer.TryApplyInPlace(",
|
||||
"ObservedEntityRestorer.Replace(entitySnapshots, currentEntityKey, Zone)",
|
||||
"ZoneRenderer?.LoadDaemonZoneView(_observedEntityIndex.EntitiesByDaemonIndex, render)",
|
||||
"ZoneRenderer?.RestoreDroppedPickupsFromDaemonZoneState(daemonZone)",
|
||||
"render.ActionBarBindings",
|
||||
|
|
@ -13103,9 +13103,9 @@ static void RequireUnityObserverDoesNotTickLocalSimulation(string root)
|
|||
var observedFrameApplierPath = Path.Combine(root, "Assets", "Scripts", "Gameplay", "AetheriaUnityObservedFrameApplier.cs");
|
||||
var legacyUnityDaemonEntitySnapshotProjectorPath = Path.Combine(root, "Assets", "Scripts", "Gameplay", "AetheriaUnityDaemonEntitySnapshotProjector.cs");
|
||||
var daemonEntitySnapshotProjectorPath = Path.Combine(root, "Packages", "org.gamecult.aetheria.state", "Runtime", "AetheriaRuntimeEntitySnapshotProjector.cs");
|
||||
var observedEntityProjectorPath = Path.Combine(root, "Assets", "Scripts", "Gameplay", "AetheriaUnityObservedEntityProjector.cs");
|
||||
var observedEntityRestorerPath = Path.Combine(root, "Assets", "Scripts", "Gameplay", "AetheriaUnityObservedEntityRestorer.cs");
|
||||
var entityConstructionBlueprintProjectorPath = Path.Combine(root, "Assets", "Scripts", "Gameplay", "AetheriaUnityEntityConstructionBlueprintProjector.cs");
|
||||
var observedZoneContextProjectorPath = Path.Combine(root, "Assets", "Scripts", "Gameplay", "AetheriaUnityObservedZoneContextProjector.cs");
|
||||
var observedZoneContextFactoryPath = Path.Combine(root, "Assets", "Scripts", "Gameplay", "AetheriaUnityObservedZoneContextFactory.cs");
|
||||
var currentEntityBinderPath = Path.Combine(root, "Assets", "Scripts", "Gameplay", "AetheriaUnityCurrentEntityBinder.cs");
|
||||
var gameplaySceneWiringPath = Path.Combine(root, "Assets", "Scripts", "Gameplay", "AetheriaUnityGameplaySceneWiring.cs");
|
||||
var daemonGameplayOperationsPath = Path.Combine(root, "Packages", "org.gamecult.aetheria.state", "Runtime", "AetheriaRuntimeDaemonOperationsClient.cs");
|
||||
|
|
@ -13158,15 +13158,15 @@ static void RequireUnityObserverDoesNotTickLocalSimulation(string root)
|
|||
var daemonEntitySnapshotProjector = File.Exists(daemonEntitySnapshotProjectorPath)
|
||||
? File.ReadAllText(daemonEntitySnapshotProjectorPath)
|
||||
: throw new InvalidOperationException("Cannot verify Unity observer authority; AetheriaRuntimeEntitySnapshotProjector.cs is missing.");
|
||||
var observedEntityProjector = File.Exists(observedEntityProjectorPath)
|
||||
? File.ReadAllText(observedEntityProjectorPath)
|
||||
: throw new InvalidOperationException("Cannot verify Unity observer authority; AetheriaUnityObservedEntityProjector.cs is missing.");
|
||||
var observedEntityRestorer = File.Exists(observedEntityRestorerPath)
|
||||
? File.ReadAllText(observedEntityRestorerPath)
|
||||
: throw new InvalidOperationException("Cannot verify Unity observer authority; AetheriaUnityObservedEntityRestorer.cs is missing.");
|
||||
var entityConstructionBlueprintProjector = File.Exists(entityConstructionBlueprintProjectorPath)
|
||||
? File.ReadAllText(entityConstructionBlueprintProjectorPath)
|
||||
: throw new InvalidOperationException("Cannot verify Unity observer authority; AetheriaUnityEntityConstructionBlueprintProjector.cs is missing.");
|
||||
var observedZoneContextProjector = File.Exists(observedZoneContextProjectorPath)
|
||||
? File.ReadAllText(observedZoneContextProjectorPath)
|
||||
: throw new InvalidOperationException("Cannot verify Unity observer authority; AetheriaUnityObservedZoneContextProjector.cs is missing.");
|
||||
var observedZoneContextFactory = File.Exists(observedZoneContextFactoryPath)
|
||||
? File.ReadAllText(observedZoneContextFactoryPath)
|
||||
: throw new InvalidOperationException("Cannot verify Unity observer authority; AetheriaUnityObservedZoneContextFactory.cs is missing.");
|
||||
var currentEntityBinder = File.Exists(currentEntityBinderPath)
|
||||
? File.ReadAllText(currentEntityBinderPath)
|
||||
: throw new InvalidOperationException("Cannot verify Unity observer authority; AetheriaUnityCurrentEntityBinder.cs is missing.");
|
||||
|
|
@ -13246,7 +13246,7 @@ static void RequireUnityObserverDoesNotTickLocalSimulation(string root)
|
|||
"private Galaxy ObservedGalaxy { get; set; }",
|
||||
"ObservedGalaxy = boot.ObservedGalaxy",
|
||||
"ResolveObservedGalaxyZone",
|
||||
"private AetheriaUnityObservedZoneContextProjector ObservedZoneContextProjector =>",
|
||||
"private AetheriaUnityObservedZoneContextFactory ObservedZoneContextFactory =>",
|
||||
"entity => CurrentEntityBinder.RestoreBinding(entity)",
|
||||
"private AetheriaUnityEntityConstructionBlueprintProjector EntityConstructionBlueprintProjector =>",
|
||||
"EntityConstructionBlueprintProjector.ProjectObservedEntity",
|
||||
|
|
@ -13298,19 +13298,19 @@ static void RequireUnityObserverDoesNotTickLocalSimulation(string root)
|
|||
|
||||
if (daemonEntitySnapshotProjector.Contains("EntityIndexFromRecordKey", StringComparison.Ordinal) ||
|
||||
observedFrameApplier.Contains("EntityIndexFromRecordKey", StringComparison.Ordinal) ||
|
||||
observedEntityProjector.Contains("EntityIndexFromRecordKey", StringComparison.Ordinal))
|
||||
observedEntityRestorer.Contains("EntityIndexFromRecordKey", StringComparison.Ordinal))
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"Unity observer entity projection must use typed daemon entity indices instead of parsing synthetic record keys.");
|
||||
}
|
||||
|
||||
if (!observedEntityProjector.Contains("public bool TryApplyInPlace(", StringComparison.Ordinal) ||
|
||||
!observedEntityProjector.Contains("public void Replace(", StringComparison.Ordinal) ||
|
||||
!observedEntityProjector.Contains("EntityConstructionBlueprintProjector.ProjectObservedFromBlueprint(_itemManager, zone, blueprint)", StringComparison.Ordinal) ||
|
||||
!observedEntityProjector.Contains("RestoreRuntimeBehaviorState(entity, entitySnapshot, restoredEntities)", StringComparison.Ordinal))
|
||||
if (!observedEntityRestorer.Contains("public bool TryApplyInPlace(", StringComparison.Ordinal) ||
|
||||
!observedEntityRestorer.Contains("public void Replace(", StringComparison.Ordinal) ||
|
||||
!observedEntityRestorer.Contains("EntityConstructionBlueprintProjector.ProjectObservedFromBlueprint(_itemManager, zone, blueprint)", StringComparison.Ordinal) ||
|
||||
!observedEntityRestorer.Contains("RestoreRuntimeBehaviorState(entity, entitySnapshot, restoredEntities)", StringComparison.Ordinal))
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"Unity observer facade restoration no longer flows through the dedicated observed entity projector.");
|
||||
"Unity observer facade restoration no longer flows through the dedicated observed entity restorer.");
|
||||
}
|
||||
|
||||
var requiredEntityConstructionBlueprintProjectorSymbols = new[]
|
||||
|
|
@ -13364,13 +13364,13 @@ static void RequireUnityObserverDoesNotTickLocalSimulation(string root)
|
|||
string.Join(", ", managerEntityConstructionHits));
|
||||
}
|
||||
|
||||
if (!observedZoneContextProjector.Contains("public Zone ResolveContext(", StringComparison.Ordinal) ||
|
||||
!observedZoneContextProjector.Contains("private static ZoneConstructionBlueprint CreateZoneConstructionBlueprint(", StringComparison.Ordinal) ||
|
||||
!observedZoneContextProjector.Contains("private static BodyConstructionData CreateBodyConstructionData(", StringComparison.Ordinal) ||
|
||||
!observedZoneContextProjector.Contains("new Zone(_itemManager, _planetSettings, constructionBlueprint, galaxyZone, _observedGalaxy)", StringComparison.Ordinal))
|
||||
if (!observedZoneContextFactory.Contains("public Zone ResolveContext(", StringComparison.Ordinal) ||
|
||||
!observedZoneContextFactory.Contains("private static ZoneConstructionBlueprint CreateZoneConstructionBlueprint(", StringComparison.Ordinal) ||
|
||||
!observedZoneContextFactory.Contains("private static BodyConstructionData CreateBodyConstructionData(", StringComparison.Ordinal) ||
|
||||
!observedZoneContextFactory.Contains("new Zone(_itemManager, _planetSettings, constructionBlueprint, galaxyZone, _observedGalaxy)", StringComparison.Ordinal))
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"Unity observer zone context lowering no longer flows through the dedicated observed zone context projector.");
|
||||
"Unity observer zone context lowering no longer flows through the dedicated observed zone context factory.");
|
||||
}
|
||||
|
||||
var requiredObservedFrameApplierSymbols = new[]
|
||||
|
|
@ -13381,11 +13381,11 @@ static void RequireUnityObserverDoesNotTickLocalSimulation(string root)
|
|||
"private bool TryRestoreEntityGraphFromZoneRender(",
|
||||
"AetheriaRuntimeEntitySnapshotProjector.CreateSnapshots(runId, render.ZoneIndex, render.EntitySnapshots)",
|
||||
".OrderBy(entity => entity.EntityIndex)",
|
||||
"_entityProjector.Replace(entitySnapshots, currentEntityKey, _getZone())",
|
||||
"_entityProjector.TryApplyInPlace(",
|
||||
"_entityRestorer.Replace(entitySnapshots, currentEntityKey, _getZone())",
|
||||
"_entityRestorer.TryApplyInPlace(",
|
||||
"_entityIndex.TryResolveEntityByRecordKey(currentEntityKey, out var currentEntity)",
|
||||
"_entityIndex.EntitiesByDaemonIndex",
|
||||
"_zoneContextProjector.ResolveContext(targetZone, render)",
|
||||
"_zoneContextFactory.ResolveContext(targetZone, render)",
|
||||
"zoneRenderer?.LoadDaemonZoneView(_entityIndex.EntitiesByDaemonIndex, render)",
|
||||
"zoneRenderer?.ApplyZoneRender(render)",
|
||||
"zoneRenderer?.RestoreDroppedPickupsFromZoneRender(render)",
|
||||
|
|
@ -13410,8 +13410,8 @@ static void RequireUnityObserverDoesNotTickLocalSimulation(string root)
|
|||
"private bool TryRestoreEntityGraphFromZoneRender(",
|
||||
"AetheriaRuntimeRtsProjection.ProjectZoneRender(observed.Frame)",
|
||||
"AetheriaRuntimeEntitySnapshotProjector.CreateSnapshots(runId, daemonZone)",
|
||||
"ObservedEntityProjector.Replace(entitySnapshots, currentEntityKey, Zone)",
|
||||
"ObservedEntityProjector.TryApplyInPlace(",
|
||||
"ObservedEntityRestorer.Replace(entitySnapshots, currentEntityKey, Zone)",
|
||||
"ObservedEntityRestorer.TryApplyInPlace(",
|
||||
"ZoneRenderer?.LoadDaemonZoneView(_observedEntityIndex.EntitiesByDaemonIndex, render)",
|
||||
"ZoneRenderer?.ApplyZoneRender(render)",
|
||||
"ZoneRenderer?.RestoreDroppedPickupsFromDaemonZoneState(daemonZone)",
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ carried into 7D.3 command reroute or 7D.4 projection reroute.
|
|||
| 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. |
|
||||
| Trade value settings projection | `Aetheria.State/Documents/AetheriaTradeValuePolicy.cs`; `Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeCatalogSnapshot.cs`; `Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeCatalogStore.cs`; `InventoryMenu.cs`; `InventoryPanel.cs`; `TradeMenu.cs`; `ZoneRenderer.cs` | Trade value projection is now authored typed state. The daemon seeds `global:aetheria.trade_value_policy.v1`, provider advertisements include `aetheria.trade_value_policy.v1`, and runtime catalog snapshots read that policy into `AetheriaRuntimeCatalogSnapshot.TradeValueSettings`. Unity panels/renderers consume it through explicit `AetheriaClient` catalog caches. The Unity `GameSettings` projection helper and `ActionGameManager.ObservedTradeValueSettings` are gone. | Done for manager, Unity-settings source, and code-only default cleanup. Next policy work is designer-facing Eve/CultUI authoring, not another Unity settings bridge. |
|
||||
| Sector map reads | `Assets/Scripts/UI/Menu/SectorMap.cs`; `Assets/Scripts/UI/Menu/SectorRenderer.cs`; `Assets/Scripts/UI/MainMenu.cs` | Sector map renders from `AetheriaClient.SectorMapAsync`, emits clicked zone indices, and resolves details from `SectorMapAsync` plus daemon zone contents. Main-menu observed-game boot also uses `SectorMapAsync` for run id, frame id, tutorial mode, generation seed, zones, links, discovery, and faction relationships. It no longer reads `ActionGameManager.TryGetObservedGalaxy`, passes `GalaxyZone` objects through UI events, or reads whole daemon frames for Unity observed-galaxy boot. | Done for the current topology/detail/boot surface. Remaining work is richer faction/home/boss icon metadata as typed sector-map fields if designers still need those signals. |
|
||||
| Frame lowering | `Assets/Scripts/Gameplay/AetheriaUnityObservedFrameApplier.cs`; `Assets/Scripts/Gameplay/AetheriaUnityObservedRunProjection.cs`; `Assets/Scripts/Gameplay/AetheriaUnityObservedZoneContextProjector.cs`; `Assets/Scripts/Gameplay/ActionGameManager.cs` | Frame handoff is now named as `ApplyLatestZoneRender`: it reads `ZoneRenderAsync()` and adapts only the target zone needed for the Unity presentation shell. The frame applier no longer receives the whole observed galaxy facade, the temporary projected-zone lookup lives beside the observed-run projection holder, and `ActionGameManager` no longer keeps an observed-galaxy property. The remaining whole-graph dependency is lazily resolved inside the quarantined `Zone` construction adapter because the legacy `Zone` constructor still requires it. | Keep narrowing toward typed projection/native render consumption. Persistent gameplay mirror belongs to Stage 8 demolition. |
|
||||
| Frame lowering | `Assets/Scripts/Gameplay/AetheriaUnityObservedFrameApplier.cs`; `Assets/Scripts/Gameplay/AetheriaUnityObservedRunProjection.cs`; `Assets/Scripts/Gameplay/AetheriaUnityObservedZoneContextFactory.cs`; `Assets/Scripts/Gameplay/ActionGameManager.cs` | Frame handoff is now named as `ApplyLatestZoneRender`: it reads `ZoneRenderAsync()` and adapts only the target zone needed for the Unity presentation shell. The frame applier no longer receives the whole observed galaxy facade, the temporary projected-zone lookup lives beside the observed-run projection holder, and `ActionGameManager` no longer keeps an observed-galaxy property. The remaining whole-graph dependency is lazily resolved inside the quarantined `Zone` construction adapter because the legacy `Zone` constructor still requires it. | Keep narrowing toward typed projection/native render consumption. Persistent gameplay mirror belongs to Stage 8 demolition. |
|
||||
|
||||
### 7D.5 Renderer/Input Shell Queue
|
||||
|
||||
|
|
|
|||
|
|
@ -17,9 +17,9 @@ public class ActionGameManager : MonoBehaviour
|
|||
private AetheriaDaemonObserver _daemonObserver;
|
||||
private AetheriaUnityPilotCommandSender _pilotCommands;
|
||||
private AetheriaUnityObservedDockingIndex _observedDocking;
|
||||
private AetheriaUnityObservedEntityProjector _observedEntityProjector;
|
||||
private AetheriaUnityObservedEntityRestorer _observedEntityRestorer;
|
||||
private AetheriaUnityCurrentEntityBinder _currentEntityBinder;
|
||||
private AetheriaUnityObservedZoneContextProjector _observedZoneContextProjector;
|
||||
private AetheriaUnityObservedZoneContextFactory _observedZoneContextFactory;
|
||||
private AetheriaUnityPilotFrameAdapter _pilotFrameAdapter;
|
||||
private AetheriaUnityPilotOperationAdapter _pilotOperationAdapter;
|
||||
private AetheriaUnityObservedTargetQuery _observedTargetQuery;
|
||||
|
|
@ -38,15 +38,15 @@ public class ActionGameManager : MonoBehaviour
|
|||
_observedDocking ??= new AetheriaUnityObservedDockingIndex(
|
||||
() => ResolveDaemonObserver()?.Client,
|
||||
_observedEntityIndex);
|
||||
private AetheriaUnityObservedEntityProjector ObservedEntityProjector =>
|
||||
_observedEntityProjector ??= new AetheriaUnityObservedEntityProjector(
|
||||
private AetheriaUnityObservedEntityRestorer ObservedEntityRestorer =>
|
||||
_observedEntityRestorer ??= new AetheriaUnityObservedEntityRestorer(
|
||||
_observedEntityIndex,
|
||||
ItemManager,
|
||||
EntityConstructionBlueprintProjector.ProjectObservedEntity,
|
||||
_loadoutItemFactory.CreateLoadoutItem,
|
||||
Debug.LogWarning);
|
||||
private AetheriaUnityObservedZoneContextProjector ObservedZoneContextProjector =>
|
||||
_observedZoneContextProjector ??= new AetheriaUnityObservedZoneContextProjector(
|
||||
private AetheriaUnityObservedZoneContextFactory ObservedZoneContextFactory =>
|
||||
_observedZoneContextFactory ??= new AetheriaUnityObservedZoneContextFactory(
|
||||
ItemManager,
|
||||
Settings.PlanetSettings,
|
||||
() => ObservedGalaxy,
|
||||
|
|
@ -100,8 +100,8 @@ public class ActionGameManager : MonoBehaviour
|
|||
() => Zone,
|
||||
zone => Zone = zone,
|
||||
_observedEntityIndex,
|
||||
ObservedEntityProjector,
|
||||
ObservedZoneContextProjector,
|
||||
ObservedEntityRestorer,
|
||||
ObservedZoneContextFactory,
|
||||
() => ZoneRenderer,
|
||||
() => CurrentEntity,
|
||||
entity => CurrentEntityBinder.RestoreBinding(entity),
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using GameCult.Aetheria.State.Verse;
|
||||
|
||||
public sealed class AetheriaUnityObservedEntityProjector
|
||||
public sealed class AetheriaUnityObservedEntityRestorer
|
||||
{
|
||||
private readonly AetheriaUnityObservedEntityIndex _entityIndex;
|
||||
private readonly ItemManager _itemManager;
|
||||
|
|
@ -14,7 +14,7 @@ public sealed class AetheriaUnityObservedEntityProjector
|
|||
private readonly Func<AetheriaRuntimeLoadoutItemSnapshot, ItemInstance> _createLoadoutItem;
|
||||
private readonly Action<string> _logWarning;
|
||||
|
||||
public AetheriaUnityObservedEntityProjector(
|
||||
public AetheriaUnityObservedEntityRestorer(
|
||||
AetheriaUnityObservedEntityIndex entityIndex,
|
||||
ItemManager itemManager,
|
||||
Func<AetheriaRuntimeEntitySnapshot, bool, EntityConstructionBlueprint> createBlueprint,
|
||||
|
|
@ -14,8 +14,8 @@ public sealed class AetheriaUnityObservedFrameApplier
|
|||
private readonly Func<Zone> _getZone;
|
||||
private readonly Action<Zone> _setZone;
|
||||
private readonly AetheriaUnityObservedEntityIndex _entityIndex;
|
||||
private readonly AetheriaUnityObservedEntityProjector _entityProjector;
|
||||
private readonly AetheriaUnityObservedZoneContextProjector _zoneContextProjector;
|
||||
private readonly AetheriaUnityObservedEntityRestorer _entityRestorer;
|
||||
private readonly AetheriaUnityObservedZoneContextFactory _zoneContextFactory;
|
||||
private readonly Func<ZoneRenderer> _resolveZoneRenderer;
|
||||
private readonly Func<Entity> _getCurrentEntity;
|
||||
private readonly Action<Entity> _restoreCurrentEntityBinding;
|
||||
|
|
@ -32,8 +32,8 @@ public sealed class AetheriaUnityObservedFrameApplier
|
|||
Func<Zone> getZone,
|
||||
Action<Zone> setZone,
|
||||
AetheriaUnityObservedEntityIndex entityIndex,
|
||||
AetheriaUnityObservedEntityProjector entityProjector,
|
||||
AetheriaUnityObservedZoneContextProjector zoneContextProjector,
|
||||
AetheriaUnityObservedEntityRestorer entityRestorer,
|
||||
AetheriaUnityObservedZoneContextFactory zoneContextFactory,
|
||||
Func<ZoneRenderer> resolveZoneRenderer,
|
||||
Func<Entity> getCurrentEntity,
|
||||
Action<Entity> restoreCurrentEntityBinding,
|
||||
|
|
@ -44,8 +44,8 @@ public sealed class AetheriaUnityObservedFrameApplier
|
|||
_getZone = getZone ?? (() => null);
|
||||
_setZone = setZone ?? (_ => { });
|
||||
_entityIndex = entityIndex ?? throw new ArgumentNullException(nameof(entityIndex));
|
||||
_entityProjector = entityProjector ?? throw new ArgumentNullException(nameof(entityProjector));
|
||||
_zoneContextProjector = zoneContextProjector ?? throw new ArgumentNullException(nameof(zoneContextProjector));
|
||||
_entityRestorer = entityRestorer ?? throw new ArgumentNullException(nameof(entityRestorer));
|
||||
_zoneContextFactory = zoneContextFactory ?? throw new ArgumentNullException(nameof(zoneContextFactory));
|
||||
_resolveZoneRenderer = resolveZoneRenderer ?? (() => null);
|
||||
_getCurrentEntity = getCurrentEntity ?? (() => null);
|
||||
_restoreCurrentEntityBinding = restoreCurrentEntityBinding ?? (_ => { });
|
||||
|
|
@ -115,7 +115,7 @@ public sealed class AetheriaUnityObservedFrameApplier
|
|||
}
|
||||
|
||||
var zoneRenderer = _resolveZoneRenderer();
|
||||
if (_entityProjector.TryApplyInPlace(
|
||||
if (_entityRestorer.TryApplyInPlace(
|
||||
_lastAppliedZoneRenderRunId,
|
||||
_lastAppliedZoneRenderZoneIndex,
|
||||
runId,
|
||||
|
|
@ -138,14 +138,14 @@ public sealed class AetheriaUnityObservedFrameApplier
|
|||
|
||||
if (_getZone()?.GalaxyZone != targetZone)
|
||||
{
|
||||
var resolvedZone = _zoneContextProjector.ResolveContext(targetZone, render);
|
||||
var resolvedZone = _zoneContextFactory.ResolveContext(targetZone, render);
|
||||
if (resolvedZone == null)
|
||||
return false;
|
||||
|
||||
_setZone(resolvedZone);
|
||||
}
|
||||
|
||||
_entityProjector.Replace(entitySnapshots, currentEntityKey, _getZone());
|
||||
_entityRestorer.Replace(entitySnapshots, currentEntityKey, _getZone());
|
||||
zoneRenderer?.LoadDaemonZoneView(_entityIndex.EntitiesByDaemonIndex, render);
|
||||
if (_entityIndex.TryResolveEntityByRecordKey(currentEntityKey, out var currentEntity))
|
||||
_restoreCurrentEntityBinding(currentEntity);
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ using UnityEngine;
|
|||
using float2 = Unity.Mathematics.float2;
|
||||
using float4 = Unity.Mathematics.float4;
|
||||
|
||||
public sealed class AetheriaUnityObservedZoneContextProjector
|
||||
public sealed class AetheriaUnityObservedZoneContextFactory
|
||||
{
|
||||
private readonly Dictionary<int, Zone> _observedZoneContextsByDaemonIndex = new Dictionary<int, Zone>();
|
||||
private readonly ItemManager _itemManager;
|
||||
|
|
@ -20,7 +20,7 @@ public sealed class AetheriaUnityObservedZoneContextProjector
|
|||
private readonly Action<MusicType> _playMusic;
|
||||
private Galaxy _observedGalaxy;
|
||||
|
||||
public AetheriaUnityObservedZoneContextProjector(
|
||||
public AetheriaUnityObservedZoneContextFactory(
|
||||
ItemManager itemManager,
|
||||
PlanetSettings planetSettings,
|
||||
Func<Galaxy> resolveObservedGalaxy,
|
||||
Loading…
Reference in a new issue