From c91ade1dad78efbcf97f3831685a92ad58329dbb Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 13 Jun 2026 13:28:51 +0100 Subject: [PATCH] Use typed catalog for give command selection --- .voidbot/state/aetheria.cc | Bin 30260 -> 30145 bytes Assets/Scripts/Gameplay/ActionGameManager.cs | 7 ++++--- docs/aetheria-perfect-machine-map.md | 14 ++++++++++---- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/.voidbot/state/aetheria.cc b/.voidbot/state/aetheria.cc index eb32b008672b84688348c3cd54b9e3a5fc5557ce..43c798fdb9d64cc933b81eb8758fefe400d53244 100644 GIT binary patch delta 1072 zcmaJ>O=}ZT6g4%L6oe|&B31M*8jBwtTAQ>+L8ysn78Q}Mx)5F_H#4u9d2jmOo2J1< z)I~RLl=%T}EEQKu`~!*`aW5!tT#7FI2YO#-T4_a>bLY-E=bm%#y#A4U^F8-+d#JE* zd8Xpb&n_g3t0$8WLz`LQVwno#i9C2OE6kM!g+l&RZnHm?_fPj~%RYj~*AZM9hD&@~#k!B9g>$q-C8!X~I#7#>nHGc1rEXu}LTTW-L3_&IlE(KTF(8!W^nCYXn6 zO791UKni*RDB=)Ro<7&fqsbG={bIg%eJ$ou#2NwCiMU1_R~@Ju2$^wx)L=-f!nGK+ zAuU!M2;u_fF)p-$JE^*AD$W_eg(!?g(_n}5yG>;&2Tt7-l0mRfPmmCqgD%bhZr&O;dk*YMa0cVPq1sPLMx52%w1(il!#G3_JN+ z9P3#<4fNSMCxRApjZ_@<1<;bzaWbDIXGsv$G>eT-9i|IzY=EZl$wlKc0j-!gtQ*r! z8Ilta#kS9RMVRzuJ&XcQfmw||Z{dbXd(URggr-6JG7czSi~{B&EGyQ;C5otqjo3?O zCdZS`nbBUFSvpyV8~-0mK>^uGpyTrZp^X@E;gS8j&Za3?e*{xXcF1JyO1oc1?laIP z8e}}j|8@&-gKN_-PQ9B*3g?eit9w>C)}-S9OJT#c*8MTMU%B>cxPJ4tlB;wBw0jZR z;z~vNr8khSja8p|fMFyRQ@hjc*#IXI=Suw-^~YmJ2S-}2%&$B%%+p^El#&O0ywC1F zA3C&UCG-nybR<1g>PnupC$g(8*{l7y^KdD<>EYx`JIadX*+KDr`{7Pu&KCMScsnwZ J{v67cmEV!@h9>|3 delta 1229 zcmZ`(zfTlF6!tiR&=7y1CKU24(8Rz6fdfN;5J7%KAq24@F>%;^>kJVI>^rJ`U&B4GK*@Y<~Pt z0c|*4s?kS>xNvd=T;dO=pk(M3_U$dEW(mv>cfh=2E>5Ee$8a(9AO=*U*1%fz*a2{{ zC5A-ttSF8wksEGWZ_A@I?Jbr4h`frOo+<@Cr^HZaTbafgTr=Q=26RD&z6*va4-J@d zfNrg^PFI!~7od`G#!XZ403atG6bDH}c1slfY(G}nJ_$yWGMIp-Kxt^n1c!oa5Euxi zlw93$I|NEDlgM@)Oo18tMvZEP0=C3WEp3ZfU@M$ZR*4Sfv^E7chUs+JfvL%v-iQ=2 z@}c_p?7PTqYv5EaD| RqrbcQrTD2SsqfD(`~$lp!a)E4 diff --git a/Assets/Scripts/Gameplay/ActionGameManager.cs b/Assets/Scripts/Gameplay/ActionGameManager.cs index 39868a2a5..2bb8ef588 100644 --- a/Assets/Scripts/Gameplay/ActionGameManager.cs +++ b/Assets/Scripts/Gameplay/ActionGameManager.cs @@ -480,10 +480,11 @@ public class ActionGameManager : MonoBehaviour args => { var itemName = string.Join(" ", args); - var item = ItemManager.GetCatalogEntries() - .FirstOrDefault(itemData => string.Equals(itemData.Name, itemName, StringComparison.InvariantCultureIgnoreCase)); - if (item != null) + var catalogItem = RuntimeCatalog?.EquipmentItems + .FirstOrDefault(item => string.Equals(item.Name, itemName, StringComparison.InvariantCultureIgnoreCase)); + if (catalogItem != null && Guid.TryParse(catalogItem.LegacyId, out var legacyId)) { + var item = ItemManager.GetCatalogEntry(legacyId); _currentEntity.CargoBays.First().TryStore(ItemManager.CreateInstance(item, .95f)); } }); diff --git a/docs/aetheria-perfect-machine-map.md b/docs/aetheria-perfect-machine-map.md index 341b2da57..d12cc68d4 100644 --- a/docs/aetheria-perfect-machine-map.md +++ b/docs/aetheria-perfect-machine-map.md @@ -85,7 +85,7 @@ 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, loadout item selection, trade, and give-command consumers + gameplay/UI API. Item instantiation, loadout item selection, and trade consumers now go through narrow `ItemManager.GetCatalogEntry` and `GetCatalogEntries` methods. This does not remove the legacy reader under the hood; it prevents old catalog authority from leaking into every caller @@ -94,7 +94,9 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. the package-owned `ActionGameManager.RuntimeCatalog` typed snapshot. Entity restore and loadout manufacturer-distance weighting no longer use `ItemManager` for faction lookup; they resolve factions through the `Galaxy` typed - corporation projection. + corporation projection. The `give` command selects matching items from the + typed runtime catalog, then temporarily hydrates the selected legacy + `EquippableItemData` by ID only for `ItemManager.CreateInstance`. - `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 @@ -192,6 +194,9 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. - Entity restore and loadout manufacturer-distance weighting no longer read 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. - 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 @@ -250,8 +255,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; trade debug, loadout item selection, and the give - console command still use `ItemManager` legacy item-domain materialization. + a typed snapshot consumer; the give console command is a typed-selection + consumer with temporary legacy item instantiation; trade debug and loadout + item selection still use `ItemManager` legacy item-domain materialization. - Inputs: Unity gameplay code, legacy catalog files, typed state documents, and CultMesh server state. - Outputs: `Aetheria.State` emits `.cc` state and CultMesh documents. Legacy