From d15418a389d79d43609e0a90f21804cca535d237 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sun, 14 Jun 2026 07:35:33 +0100 Subject: [PATCH] Delete dead runtime item projection bridge --- Aetheria.State/README.md | 11 +++++----- .../AetheriaRuntimeItemCatalog.cs | 6 ------ Assets/Scripts/ServerShared/ItemManager.cs | 5 ----- docs/aetheria-perfect-machine-map.md | 20 +++++++++---------- 4 files changed, 14 insertions(+), 28 deletions(-) diff --git a/Aetheria.State/README.md b/Aetheria.State/README.md index 6b395fa4d..34e36f1db 100644 --- a/Aetheria.State/README.md +++ b/Aetheria.State/README.md @@ -71,14 +71,13 @@ optional hydrated projection cache. The old generic `RuntimeCatalogLink` abstraction has been deleted; item data projection is routed through `ItemManager` and a runtime item projection reader over the typed catalog. `Projection` is not durable state; it is a bridge for surviving simulation and -UI code. The remaining single-item bridge is named `GetRuntimeItemProjection`, -not catalog entry access. +UI code. The remaining single-item bridge is explicit `GetData` projection +hydration, not catalog entry access. Loadout generation now applies typed catalog prefilters for item category, -hardpoint type, shape fit, hull type, and behavior kind before hydrating legacy -`ItemData` projections for final simulation compatibility. +hardpoint type, shape fit, hull type, and behavior kind, then instantiates +generated equipment directly from typed runtime rows. The surviving trade menu also applies typed catalog prefilters for row size, -hardpoint type, and behavior kind before hydrating `ItemData` projections for -legacy commodity filters, columns, and buy actions. +hardpoint type, and behavior kind before legacy buy actions. Surviving item catalog Unity DTOs inherit `RuntimeItemProjectionEntry`; the old `RuntimeCatalogEntry` base name no longer appears in live source. Temporary faction/corporation projections and zone body/orbit DTOs keep local GUID fields diff --git a/Assets/Scripts/ServerShared/AetheriaRuntimeItemCatalog.cs b/Assets/Scripts/ServerShared/AetheriaRuntimeItemCatalog.cs index 5465a4ab3..59bb25c00 100644 --- a/Assets/Scripts/ServerShared/AetheriaRuntimeItemCatalog.cs +++ b/Assets/Scripts/ServerShared/AetheriaRuntimeItemCatalog.cs @@ -11,7 +11,6 @@ public interface IRuntimeItemProjectionReader AetheriaRuntimeCatalogItem GetRuntimeItem(Guid guid); IReadOnlyList GetBehaviorProjections(Guid guid); ItemData Get(Guid guid); - T Get(Guid guid) where T : ItemData; } public sealed class AetheriaRuntimeItemCatalog : IRuntimeItemProjectionReader @@ -88,11 +87,6 @@ public sealed class AetheriaRuntimeItemCatalog : IRuntimeItemProjectionReader return item; } - public T Get(Guid guid) where T : ItemData - { - return Get(guid) as T; - } - private static ItemData ProjectItem(AetheriaRuntimeCatalogItem item) { if (!Guid.TryParse(item.LegacyId, out var id)) diff --git a/Assets/Scripts/ServerShared/ItemManager.cs b/Assets/Scripts/ServerShared/ItemManager.cs index 761dde632..a945db109 100644 --- a/Assets/Scripts/ServerShared/ItemManager.cs +++ b/Assets/Scripts/ServerShared/ItemManager.cs @@ -53,11 +53,6 @@ public class ItemManager _logger = logger; } - public T GetRuntimeItemProjection(Guid id) where T : ItemData - { - return _itemProjections.Get(id); - } - public AetheriaRuntimeCatalogItem GetRuntimeItem(ItemInstance item) { var itemId = item?.Data?.ItemId ?? Guid.Empty; diff --git a/docs/aetheria-perfect-machine-map.md b/docs/aetheria-perfect-machine-map.md index e487696e8..764d51ebb 100644 --- a/docs/aetheria-perfect-machine-map.md +++ b/docs/aetheria-perfect-machine-map.md @@ -143,8 +143,8 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. `DatabaseLink`/`RuntimeCatalogLink` path has collapsed into the item-specific runtime reference. - `ItemManager` no longer exposes the raw runtime item catalog reader as public - gameplay/UI API. Temporary item instantiation bridges now go through the - narrow `ItemManager.GetRuntimeItemProjection` method. `ItemManager` no + gameplay/UI API. Temporary item projection hydration now goes through + `ItemManager.GetData` over `RuntimeItemReference.ItemId`. `ItemManager` no longer exposes a legacy catalog enumeration API or a catalog-entry-shaped single-item API. This prevents catalog authority from leaking into every caller that only needs a projection lookup. The item properties UI no longer uses @@ -946,10 +946,9 @@ First Aetheria surfaces to publish: `RuntimeItemReference.Projection`, making the hydrated `ItemData` DTO a cache/display/behavior bridge derived from `ItemId` instead of the reference's apparent state value. - - Done: rename the remaining `ItemManager.GetCatalogEntry` bridge to - `GetRuntimeItemProjection` and rename the bridge reader interface to - `IRuntimeItemProjectionReader`, so the live API exposes projection - hydration rather than catalog-entry ownership. + - Done: delete the dead `ItemManager.GetRuntimeItemProjection` bridge + after loadout generation stopped hydrating selected typed rows into + `EquippableItemData` merely to instantiate equipment. - Done: quarantine the vendored Unity `MessagePack` assembly by disabling asmdef auto-reference; only explicit state-spine assemblies should see it while the Unity CultCache bridge still needs a low-level `.cc` codec. @@ -1049,8 +1048,7 @@ Do not add behavior to `ItemData`, `RuntimeItemProjectionEntry`, or the temporary `AetheriaRuntimeItemCatalog` DTO materializer. The typed state spine and migration quarantine exist; the next cuts should replace surviving projection consumers with typed item facets, typed behavior factories, and Eve -surfaces until `GetRuntimeItemProjection` has no caller and the old DTO -bridge can be deleted. Loadout generation should keep moving eligibility tests -onto `AetheriaRuntimeCatalogItem` rows before projection; any predicate that -still needs `ItemData` must earn that dependency by using behavior objects or -simulation-only methods that typed facets do not yet expose. +surfaces until the remaining `GetData` hydration users are gone and the old DTO +bridge can be deleted. Any predicate that still needs `ItemData` must earn that +dependency by using behavior objects or simulation-only methods that typed +facets do not yet expose.