From 9d8636f41992937ea30b80b3df5a00244b2c4f08 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 13 Jun 2026 19:41:09 +0100 Subject: [PATCH] Demote loadout item projection bridge --- Assets/Scripts/ServerShared/LoadoutGenerator.cs | 4 ++-- docs/aetheria-perfect-machine-map.md | 13 ++++++++++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/Assets/Scripts/ServerShared/LoadoutGenerator.cs b/Assets/Scripts/ServerShared/LoadoutGenerator.cs index dfe48e645..03df0a2f9 100644 --- a/Assets/Scripts/ServerShared/LoadoutGenerator.cs +++ b/Assets/Scripts/ServerShared/LoadoutGenerator.cs @@ -139,7 +139,7 @@ public class LoadoutGenerator manufacturer != Guid.Empty && (Galaxy.IsPrelude || Galaxy.ContainsFaction(manufacturer) && (Faction == null || Faction.Allegiance.ContainsKey(manufacturer)))) - .Select(HydrateLegacyItem) + .Select(ProjectRuntimeItem) .Where(item => item != null) .Where(item => item.Price > 0 && @@ -178,7 +178,7 @@ public class LoadoutGenerator return string.Equals(item.Category, requestedType.Name, StringComparison.Ordinal); } - private T HydrateLegacyItem(AetheriaRuntimeCatalogItem item) where T : EquippableItemData + private T ProjectRuntimeItem(AetheriaRuntimeCatalogItem item) where T : EquippableItemData { return Guid.TryParse(item.LegacyId, out var legacyId) ? ItemManager.GetCatalogEntry(legacyId) diff --git a/docs/aetheria-perfect-machine-map.md b/docs/aetheria-perfect-machine-map.md index 19fb3bdd1..905c98d6e 100644 --- a/docs/aetheria-perfect-machine-map.md +++ b/docs/aetheria-perfect-machine-map.md @@ -250,11 +250,15 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. legacy `Faction` entries through `ItemManager`; they use `Galaxy.ResolveFaction` over the typed corporation projection. - The `give` command no longer enumerates legacy item catalog entries; typed - catalog selection owns the command match, with legacy item hydration kept as - an instantiation-only bridge. + catalog selection owns the command match, with runtime item projection kept + as an instantiation-only bridge. - `LoadoutGenerator` no longer enumerates legacy item catalog entries for its candidate pool; typed catalog filtering owns the first item selection pass, - with legacy DTO hydration kept as a fitting/instantiation bridge. + with runtime item projection kept as a fitting/instantiation bridge. +- `LoadoutGenerator` names the post-selection bridge as runtime item + projection: typed catalog rows own candidate selection, and `ItemManager` + only projects the selected row into the temporary DTO shape needed by fitting + and instantiation. - `TradeMenuDebug` no longer enumerates legacy item catalog entries for its table rows; typed trade catalog records own the row set, with legacy DTO hydration kept for the old debug UI callbacks. @@ -551,6 +555,9 @@ First Aetheria surfaces to publish: MessagePack, Newtonsoft, RethinkDB, or bespoke save-file serializer symbols. - Done: delete dead `PlayerData` and `GalaxyMapLayerData` catalog roots, and remove legacy catalog group/table annotations from surviving runtime DTOs. + - Done: rename loadout generation's selected-item bridge from legacy + hydration to runtime item projection; typed catalog filtering remains the + selection owner. - Done: remove the stale `MessagePack` assembly reference from `Aetheria.Shared.Unity`; the remaining MessagePack reference is contained in the typed state package's `.cc` reader.