From 0cfa9ea2df26c840638b1b0891717aeb60a31494 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 13 Jun 2026 13:38:40 +0100 Subject: [PATCH] Use typed catalog for trade debug rows --- .voidbot/state/aetheria.cc | Bin 30436 -> 30488 bytes Assets/Scripts/UI/Menu/TradeMenuDebug.cs | 11 ++++++++++- docs/aetheria-perfect-machine-map.md | 18 ++++++++++++------ 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/.voidbot/state/aetheria.cc b/.voidbot/state/aetheria.cc index 2806873be425604d0ed55189995f86087856050b..bce3484d0b4ffbc1e79e800e5a9c1e449ed51ee1 100644 GIT binary patch delta 956 zcmZWo&ubGw6gEk*%|)nUiv{gNMMZFvw!!!V6m6<*QH!M&DO8#4&StlromppR(*}`( zUOaf4i)XbI#DkK9con^Q6rrFuZ=&db;M>`a(t4YD^S$@J_s#dd{U|*7S$MTk?604x z)~vCb{#_c@ABvB&`}lE3{OAFm-`X-E(B9VmS59_{l-Z=Ro%#HHZUX3_#F zR$|~{1soAl@T3Sq`4m(qqAtjUs{q5wBsfG7CR*0I!$=Trel%sSQJyr?O8VvD%8;#S z*g)7h3v31W6jDi)p1E{r%`)&55Ch>Z_#GFYXbgTn~P8f(4j_1HMnrhR^WWp3S$P|kc=@Ey5 zXwx;E#AuqUXeglOVXB2I98`*{*m_MIg^lbmVgVx4$sS#&s|v8DlPHLNk>EIzM$8nJ za5o{6;5Ts!+a$nI0xV8U;~Op@J?Jq)>3!s_eAI`oMo1#yEeQVUkn4g3peKp-f^f$d za+Z4WmmL?ot49_O_CI`v$jxJVaB{v6?f=!?=oQ)N|bi$@5@mySU15Adyog} SV`-qfFML-nXNy>`E&KrsU0B%w delta 927 zcmZuwU279T6m?^f21O}Y3JP{murGDfCZ;wDf;6QBEPfEQ1XL!wH@jnIXV%%-w!w#h z4?g)Ki{KAXs)C^G9}q#``~iwDfN<=Vw+ z)orYdRD<00bzinG{6G z9g=9ObV8VhhVi0vtS((^E1cdJuz8R4O!!0Mj((GAN#Ea9?_yvgn(0%o1#j z>PuzHEAW7AL*kHZW^L}Upm7pPO^_&iwz1IeVcI{`v6MU^UBD2KaNrkOML;+N)EkiX z2PunV+U3wf#Z6Q~x`T1B)pSWqXTQ!=hV9FwsLgHDlg>b-k?r5z(;yNw;_Kt}UFvDl zW7=?eA$a{{aiok1>{EEywgO|@Vxb-dhIE@Dg(opVr6acz%{V6t>L?TCThXS&X8T%V zUKYYPsh|NUcde)iElZKThvUP~?GT87U2W*k`7)wRV99RExKGf%6h8`LPEnI3u)-_< z7q!E5Xh)cYG=@q@l^;tc%p4}2^w0x&OAWBPCzX!|=nw?)aTjnU@E-$(m|`4%H8HZu zP71fGtC$~v`vy%5rMd~dt2U1-z2Xd+Z j!2-2qdqRh@c^;3!3kH14A6ejhy#Vsf=wsO;^`*`q(Y8x> diff --git a/Assets/Scripts/UI/Menu/TradeMenuDebug.cs b/Assets/Scripts/UI/Menu/TradeMenuDebug.cs index e5a07d57d..e9576eb29 100644 --- a/Assets/Scripts/UI/Menu/TradeMenuDebug.cs +++ b/Assets/Scripts/UI/Menu/TradeMenuDebug.cs @@ -205,7 +205,9 @@ public class TradeMenuDebug : MonoBehaviour data => () => $"{data.Shape.Width}x{data.Shape.Height}", data => data.Shape.Width*data.Shape.Height)); - var items = GameManager.ItemManager.GetCatalogEntries().Where(i=>i.Price!=0); + var items = ActionGameManager.RuntimeCatalog.TradeItems + .Select(HydrateLegacyItem) + .Where(i => i != null); if (MinimumSizeFilter.gameObject.activeSelf) items = items.Where(i => @@ -351,6 +353,13 @@ public class TradeMenuDebug : MonoBehaviour })); } + private ItemData HydrateLegacyItem(GameCult.Aetheria.State.Unity.AetheriaRuntimeCatalogItem item) + { + return Guid.TryParse(item.LegacyId, out var legacyId) + ? GameManager.ItemManager.GetCatalogEntry(legacyId) + : null; + } + private void Buy(HullData data) { if (data.Price < GameManager.Credits) diff --git a/docs/aetheria-perfect-machine-map.md b/docs/aetheria-perfect-machine-map.md index 0ed272d20..7f55fd063 100644 --- a/docs/aetheria-perfect-machine-map.md +++ b/docs/aetheria-perfect-machine-map.md @@ -85,9 +85,8 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. deserialization only. UI code no longer reaches into `LegacyCatalogBoundary.GetCatalog` directly. - `ItemManager` no longer exposes the raw `ILegacyCatalogReader` as public - gameplay/UI API. Item instantiation and trade consumers - now go through narrow `ItemManager.GetCatalogEntry` and - `GetCatalogEntries` methods. This does not remove the legacy reader under + gameplay/UI API. Temporary item instantiation bridges now go through narrow + `ItemManager.GetCatalogEntry` methods. This does not remove the legacy reader under the hood; it prevents old catalog authority from leaking into every caller that only needs a domain lookup. The item properties UI no longer uses `ItemManager` for manufacturer display; it resolves the manufacturer through @@ -100,6 +99,8 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. `LoadoutGenerator` also receives the typed runtime catalog and uses it to own item candidate selection before hydrating selected legacy item DTOs by ID for exact fitting checks and behavior construction. + `TradeMenuDebug` uses the typed trade catalog for rows and only hydrates + legacy `ItemData` by ID for its old inspect/buy UI callbacks. - `Galaxy` generation no longer accepts `ILegacyCatalogReader` or `ItemManager`. Sector and tutorial generation receive the package-owned typed runtime catalog. `Galaxy` projects typed corporation v2 records into temporary legacy @@ -203,6 +204,9 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. - `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. +- `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. - MessagePack is no longer used as a runtime object-cloning shortcut for `EntitySettings`, and UI/player-settings startup no longer registers the old MessagePack resolver. Resolver registration is confined to legacy catalog @@ -261,9 +265,9 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. contract for full .NET smokes and Eve surface reads. Neither writes state or owns simulation. The legacy cache no longer has a public mutation surface, but it still materializes `ItemManager`. Item properties manufacturer display is - a typed snapshot consumer; the give console command and loadout generation - are typed-selection consumers with temporary legacy item instantiation; trade - debug still uses `ItemManager` legacy item-domain materialization. + a typed snapshot consumer; the give console command, loadout generation, and + trade debug are typed-selection consumers with temporary legacy item + instantiation or UI callback hydration. - Inputs: Unity gameplay code, legacy catalog files, typed state documents, and CultMesh server state. - Outputs: `Aetheria.State` emits `.cc` state and CultMesh documents. Legacy @@ -421,6 +425,8 @@ First Aetheria surfaces to publish: - Done: move `LoadoutGenerator` item candidate selection to the typed runtime catalog; legacy item DTO hydration remains only for exact fitting checks and behavior construction. + - Done: move `TradeMenuDebug` row selection to the typed trade catalog; + legacy item DTO hydration remains only for old inspect/buy callbacks. - Replace `ActionGameManager` cache bootstrap with the new state runtime. - Convert domain references from GUID/base-class patterns to typed record refs.