From 606144fe96f8840dea2c944f315a80fd5f58c0c8 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Mon, 29 Jun 2026 01:49:18 +0100 Subject: [PATCH] Remove loadout template state wrapper --- Aetheria.State.Verify/Program.cs | 19 ++++++++++++++----- ...AetheriaRuntimeLoadoutSnapshotProjector.cs | 13 ------------- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/Aetheria.State.Verify/Program.cs b/Aetheria.State.Verify/Program.cs index 2ac1404de..5c6d1bcca 100644 --- a/Aetheria.State.Verify/Program.cs +++ b/Aetheria.State.Verify/Program.cs @@ -17800,11 +17800,11 @@ static void RequireInventoryLoadoutSaveRequestAuthority(string root) var requiredLoadoutSnapshotProjectorSymbols = new[] { - "ProjectLoadoutTemplateAsync(", - "AetheriaClientState state", - ".Reactive()", - "ProjectLoadoutTemplate(", - "frame.Current?.Run ?? new AetheriaRuntimeRunCheckpointCommit()" + "public static AetheriaRuntimeLoadoutTemplateCommit ProjectLoadoutTemplate(", + "AetheriaRuntimeRunCheckpointCommit run,", + "TryParseEntityKey(entityKey, out var zoneIndex, out var entityIndex)", + "ProjectLoadoutTemplate(run, zoneIndex, entityIndex)", + "ProjectEntityLoadout(entity, entities)" }; var missingLoadoutSnapshotProjectorSymbols = requiredLoadoutSnapshotProjectorSymbols .Where(symbol => !loadoutSnapshotProjector.Contains(symbol, StringComparison.Ordinal)) @@ -17816,6 +17816,15 @@ static void RequireInventoryLoadoutSaveRequestAuthority(string root) string.Join(", ", missingLoadoutSnapshotProjectorSymbols)); } + if (loadoutSnapshotProjector.Contains("ProjectLoadoutTemplateAsync(", StringComparison.Ordinal) || + loadoutSnapshotProjector.Contains("AetheriaClientState state", StringComparison.Ordinal) || + loadoutSnapshotProjector.Contains(".Reactive()", StringComparison.Ordinal) || + loadoutSnapshotProjector.Contains("frame.Current?.Run", StringComparison.Ordinal)) + { + throw new InvalidOperationException( + "Loadout snapshot composition must not own managed document sampling; InventoryPanel already caches the reactive daemon frame."); + } + if (loadoutSnapshotProjector.Contains("state.Daemon.LatestFrame.LatestAsync()", StringComparison.Ordinal)) { throw new InvalidOperationException( diff --git a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeLoadoutSnapshotProjector.cs b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeLoadoutSnapshotProjector.cs index d0380d3ca..066021312 100644 --- a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeLoadoutSnapshotProjector.cs +++ b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeLoadoutSnapshotProjector.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Threading.Tasks; #nullable enable @@ -9,18 +8,6 @@ namespace GameCult.Aetheria.State.Verse { public static class AetheriaRuntimeLoadoutSnapshotProjector { - public static Task ProjectLoadoutTemplateAsync( - AetheriaClientState state, - string entityKey) - { - if (state == null) throw new ArgumentNullException(nameof(state)); - - using var frame = state.Reactive(); - return Task.FromResult(ProjectLoadoutTemplate( - frame.Current?.Run ?? new AetheriaRuntimeRunCheckpointCommit(), - entityKey ?? "")); - } - public static AetheriaRuntimeLoadoutTemplateCommit ProjectLoadoutTemplate( AetheriaRuntimeRunCheckpointCommit run, string entityKey)