From eac886d783f2164a98d99a4645ba8409bac223d8 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Mon, 15 Jun 2026 03:12:24 +0100 Subject: [PATCH] Remove cargo GUID lookup overloads --- .voidbot/state/aetheria.cc | Bin 98954 -> 99690 bytes Aetheria.State/README.md | 5 +++-- Assets/Scripts/ServerShared/Entity.cs | 26 ++++---------------------- docs/aetheria-perfect-machine-map.md | 3 +++ 4 files changed, 10 insertions(+), 24 deletions(-) diff --git a/.voidbot/state/aetheria.cc b/.voidbot/state/aetheria.cc index 7fa34ad75ee486e5b4f009421bb2e6c786f8401f..f94de5d1b7089eea1775cad8b59d80df4c9a0385 100644 GIT binary patch delta 1633 zcmaJ>PiS047QdMVl>y2v1chygU5(YuvxX`u;^H@+ zU_5w2ax2)(##x({8xapf@RwcVB^F~JDwJ%29(KFDRo|^q)d4LO^9^k(O|d8M;5OqO zgi_m4m>(?YDcsi#zlQ&sTpK&6a696l{w3^)drH#;U8Glae0A_q$0CQU(Zz`#gb0Mm z3?6mxjMZGWG8h^@28UBdLX;o~ZCv8A!vyz7ovDT!5g07;xyE873hr@Bc@QdXOQBY7EOwv`MC>!o0Z}`7(mhE| zpX=8R8V#xq71;n0rVrG#RU~{GGGnNd z;{6fl<^r-AFfJYcV>mbu*I9Cu4lf&vp5jIcX2D0i|K^b5u#m;hT69cjvVHi%(WTG7 z*3f*sny`;9CcppsZ12%wM99VTGfn7ALys4nvj?7XcrBL{?$7k@{qgF_(+manUtIw-jd8l8q#?~PVe4cR}&Iu8x7qtF2&r?nK5h3 zGTgbV8D@ocj-|o{z|cXZt$Jw_G>X63W*YnpS>RCHhOyqxL2FDh7cGtSM@de+HWqxa ziz#M!zTc8ApBl`1?LhgE9*@ZE+uyFE-!x7vI`vXUMS+CQp*X=~JU9Uo2-)p6+$X{fWb2=I7E|T@s9cR4Oj`)7c%e Ydwe)#v6B2XeQN)~4ta2FqOyAZA82bzyNShjVDuTvU;x3epepM8T5b)ZJ4l8 zgOH1WOTN?yrsSgoobJ2ku>{;fVYn%Q6mBW=#C93?Hs4GY5FAvzNKd0uxmu-6d~m?U zJhMw(<2Q4o;466tZNsI2MW*RD7t02nOHeD!M2*g4g5^KHxpzEX3oe;UulBi~tWE2f(?gcJABo(rV z$|Y3Sc$jUYZ)zct_*=PAoq?$W*I)+*6ngZB216moec0(!(hMD_Ic8%gHO>H1`BGAi zB4-Zs4XSYA_0jO~MoW3G7R|~3lcu9BMG*x@8i@>Cl@y%_5J*gvF{xr)#Ayed(%qh8`@B>2`xya&D+taa4r=m8*!v&12?4CgK{Dlf*Y+tu-(_W8=hqBXwy=Zw{Dg{k+)D@Qu4(+75UFPmK*>9Crv zHz!E=p`k5Vx`Ezk=_(IO)><7nP}|OQWntO!>Mr6{uKZoL$_Y4lA$q;~=&tp)DM2sx G&HMv{1aJfZ diff --git a/Aetheria.State/README.md b/Aetheria.State/README.md index 0bd6b6067..205a5e202 100644 --- a/Aetheria.State/README.md +++ b/Aetheria.State/README.md @@ -89,8 +89,9 @@ facade. `ItemInstance.ItemKey` is the identity surface; the old `ItemId` legacy-GUID projection has been deleted from item instances. Cargo inventory indexes, consumable activation lookup, action-bar consumable quantity/fill, transfer lookup, trade owned counts, weapon ammo references, and -item-use behavior references now use item keys. The old derived behavior -`AmmoType`/`Item` GUID properties have been deleted. +item-use behavior references now use item keys. The old cargo/consumable GUID +lookup overloads and the derived behavior `AmmoType`/`Item` GUID properties +have been deleted. Unity runtime commit DTOs carry typed `ItemKey`/`HullItemKey` fields only for loadout items, action-bar targets, body resources, entity hulls, and active consumables; the commit applier no longer reconstructs item keys from legacy diff --git a/Assets/Scripts/ServerShared/Entity.cs b/Assets/Scripts/ServerShared/Entity.cs index f1be5746e..26fb259e4 100644 --- a/Assets/Scripts/ServerShared/Entity.cs +++ b/Assets/Scripts/ServerShared/Entity.cs @@ -320,11 +320,6 @@ public abstract class Entity return _activeConsumables.FirstOrDefault(ac => ac.Item?.ItemKey == itemKey); } - public ConsumableItemEffect FindActiveConsumable(Guid itemId) - { - return FindActiveConsumable(AetheriaRuntimeItemReference.FromLegacyId(itemId)); - } - public bool CanActivateConsumable(AetheriaRuntimeCatalogItem item) { var itemKey = GetItemKey(item); @@ -426,21 +421,11 @@ public abstract class Entity return sum; } - public int CountItemsInCargo(Guid itemDataID) - { - return CountItemsInCargo(AetheriaRuntimeItemReference.FromLegacyId(itemDataID)); - } - public EquippedCargoBay FindItemInCargo(string itemKey) { return CargoBays.FirstOrDefault(c => c.ContainsItem(itemKey)); } - public EquippedCargoBay FindItemInCargo(Guid itemDataID) - { - return FindItemInCargo(AetheriaRuntimeItemReference.FromLegacyId(itemDataID)); - } - public Shape UnoccupiedSpace { get @@ -461,9 +446,11 @@ public abstract class Entity // Attempts to move a given number of items of the given type to the target Entity // Returns the number of items successfully transferred - public int TryTransferItems(Entity target, Guid itemDataID, int quantity) + public int TryTransferItems(Entity target, string itemKey, int quantity) { - var itemKey = AetheriaRuntimeItemReference.FromLegacyId(itemDataID); + if (target == null || string.IsNullOrWhiteSpace(itemKey) || quantity <= 0) + return 0; + int quantityTransferred = 0; while (quantityTransferred < quantity) { @@ -1600,11 +1587,6 @@ public class EquippedCargoBay : EquippedItem return ContainsItem(itemKey) ? ItemsOfType[itemKey].FirstOrDefault() : null; } - public ItemInstance GetFirstItem(Guid itemId) - { - return GetFirstItem(AetheriaRuntimeItemReference.FromLegacyId(itemId)); - } - public EquippedCargoBay(ItemManager itemManager, EquippableItem item, int2 position, Entity entity, string name) : base(itemManager, item, position, entity) { var typedCargoBay = ItemManager.GetRuntimeItem(EquippableItem); diff --git a/docs/aetheria-perfect-machine-map.md b/docs/aetheria-perfect-machine-map.md index d4538e3c5..66394339e 100644 --- a/docs/aetheria-perfect-machine-map.md +++ b/docs/aetheria-perfect-machine-map.md @@ -1229,6 +1229,9 @@ First Aetheria surfaces to publish: still derive legacy GUIDs until those structures move to typed keys. - Done: delete the `ItemInstance.ItemId` legacy-GUID projection; diagnostics now report `ItemKey` so item instances expose only typed item-key identity. + - Done: delete `Entity`/`EquippedCargoBay` cargo and consumable GUID lookup + overloads; transfer, count, active-consumable, and first-item APIs now + expose item-key contracts only. - Remove runtime dependency on `ItemData` DTOs as item instance owners. 5. Mesh host