From 0b92a2faae6f5923295de79403e51187afbfef17 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Mon, 15 Jun 2026 02:57:50 +0100 Subject: [PATCH] Remove item instance legacy ID projection --- .voidbot/state/aetheria.cc | Bin 98306 -> 98954 bytes Aetheria.State/README.md | 4 ++-- Assets/Scripts/ServerShared/Entity.cs | 4 ++-- Assets/Scripts/ServerShared/ItemInstance.cs | 2 -- Assets/Scripts/ServerShared/ItemManager.cs | 4 ++-- docs/aetheria-perfect-machine-map.md | 2 ++ 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.voidbot/state/aetheria.cc b/.voidbot/state/aetheria.cc index d8c9871160125c775543e6990858fc09756acbb6..7fa34ad75ee486e5b4f009421bb2e6c786f8401f 100644 GIT binary patch delta 1477 zcmZ`(O=ule6!s=fNJMN5wZ#(j7%7<2H%V)gytay#1nV=cP@B-&-F-7B?_E1{?|AQ> zSD%}tmM&D>_!grp5&yR8Ljr}W6@(TSiXal~RyQuH*oCz{Z#6YZem_(pWA-G$7SQz*kdc5Ntce2n2nvT);Mn2&EOa4NAuC;NvjnBH8?E zxrq>=7A=hO>m%&JwHO;bY*$XK)D|Jt>SYYAP!cY3LwPY;jE+IC5SP93375Qq8Y00P zQW-140*J;`X$ubGl0!f!kw>6b;R0eRWCMJgKC+fDQ=%RtK?I!<+5|oREq=kL7NsFT zn}2sczdf-A)GUsnN$7}mEJ9)7S*?HJKq05T`F8;zD|*GeOGt`FPe_L`j$?;a1!1BGb&0JTY=#$#br@i+0+Lz#9oT z(I}NqL_>SwrbXf>UssuoxE9#G@#9U_dH>1#*i-p!#UTH7gzXyhhN4QruuR zf2#YRD@YyJ4G27%Xgba6WKlTbM$rpx$62N&J>I^vi1K$+Hu1o@7u2?C#-g=xBV{i! zwwzCDHn-R1R!X~7+?$9h8flAitJz~~S68HSeVyB|nW%`Co-jBM(vC-2h`_;wT9CQj znh4rKvPvXEdyFjMD914!6RzDrA+S8hx`G}_gVIJnJ|~HXKYVL g4G!m{8B_gKf06U@b^eKsM_cTd(R+JktB2432cB0O2><{9 delta 1341 zcmZ8hO^6&t6t*_m!H5QlxCSqIAbVKc=}mUx?j*9vx+}>T@n_kMVUa*h_v@L8-Bq2c z>X~gXqk@Qvhouj57NR)`fdLl}aq*Bt@ZiryHs*X zWxy>ENoZG`R^M)cNp;A5^q{P~rer8O-YV7K%o3a*!$*MsbRBPZETB)L(G(Hd0R}IF zPNfwwmQ;NuNs`10CFkMt)_R4~9y4DI;`FJfq{D$;5v&5Y;5fNPS1?-`|9iJB zN<&2t{;u@jppwIt=h@Q(Z&SU29qwnXfP{~^kOnw?q*FW+zOdk{IN?^bMI>zI^uB?< zC9^{Ms)!r`BjPloEu?uUFbdrJ0mP!COR%j{8F1}9g3Ycl;HMS}vEM4BAg2T5!DOm> zgguO)@Rx_wC*Y-7p>^GSP9#lN^(hE0A(RLr>9oTkzszO^`|FApEDdCcXeo*_3W#yx z!vB&(TqeC;B{FxRa)vTxj3fRg_768XBaQ}@*rZVaKG!;fSBRjJ!sk($H;R^Vt^1tR zbgEh6ayab*m3Q_)pnMuZ+EMz;eU?86pKLZ)wcn*)zD;S2m?zZJCpkdNx^B7@ z;_^ti6gzQ8pZ<31RQ~p?HLL2Cv;rMUwD#giaLC{ZMT3uddDI z-nCj@zk7Og=g-fkH#Xc#OB(B3C`y#4(SXYl#n-K`V<@C>8Q7@KFC0Eq=Ydk@d>`HX z>+Wr-Z_%xC=i3+>W*!~yn&gFgp diff --git a/Aetheria.State/README.md b/Aetheria.State/README.md index 3bfccef3a..0bd6b6067 100644 --- a/Aetheria.State/README.md +++ b/Aetheria.State/README.md @@ -85,8 +85,8 @@ been deleted from live Unity source. Surviving runtime DTOs no longer carry legacy catalog group/table annotations; their remaining metadata is projection and inspection metadata for the typed runtime bridge. Item instances now carry `AetheriaRuntimeItemReference`, a typed item-key -facade. `ItemInstance.ItemKey` is the identity surface, while `ItemId` is a -derived legacy-GUID compatibility projection for broader simulation paths. +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 diff --git a/Assets/Scripts/ServerShared/Entity.cs b/Assets/Scripts/ServerShared/Entity.cs index 75b6afd84..f1be5746e 100644 --- a/Assets/Scripts/ServerShared/Entity.cs +++ b/Assets/Scripts/ServerShared/Entity.cs @@ -264,7 +264,7 @@ public abstract class Entity Hull = hull; var typedHull = itemManager.GetRuntimeItem(hull); if (typedHull == null) - throw new InvalidOperationException($"Unable to construct entity: missing typed hull row for {hull?.ItemId}"); + throw new InvalidOperationException($"Unable to construct entity: missing typed hull row for {hull?.ItemKey}"); Name = typedHull.Name; MapEntity(); WeaponGroups = new (List weapons, List items)[itemManager.GameplaySettings.WeaponGroupCount]; @@ -354,7 +354,7 @@ public abstract class Entity { var typedHull = ItemManager.GetRuntimeItem(Hull); if (typedHull == null) - throw new InvalidOperationException($"Unable to map entity {Name}: missing typed hull row for {Hull?.ItemId}"); + throw new InvalidOperationException($"Unable to map entity {Name}: missing typed hull row for {Hull?.ItemKey}"); var hullShape = GetHullShape(typedHull); EquippedHull = new EquippedItem(ItemManager, Hull, int2.zero, this); diff --git a/Assets/Scripts/ServerShared/ItemInstance.cs b/Assets/Scripts/ServerShared/ItemInstance.cs index 6c13c7941..7d6f5d110 100644 --- a/Assets/Scripts/ServerShared/ItemInstance.cs +++ b/Assets/Scripts/ServerShared/ItemInstance.cs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -using System; using System.Collections; using System.Collections.Generic; using System.Linq; @@ -16,7 +15,6 @@ public abstract class ItemInstance public ItemRotation Rotation; public string ItemKey => Reference?.ItemKey ?? ""; - public Guid ItemId => Reference?.LegacyItemId ?? Guid.Empty; } public abstract class CraftedItemInstance : ItemInstance diff --git a/Assets/Scripts/ServerShared/ItemManager.cs b/Assets/Scripts/ServerShared/ItemManager.cs index 9645cc16e..69224c062 100644 --- a/Assets/Scripts/ServerShared/ItemManager.cs +++ b/Assets/Scripts/ServerShared/ItemManager.cs @@ -598,7 +598,7 @@ public class ItemManager var durability = pow(item.Durability / maxDurability, durabilityExponent * stat.DurabilityExponentMultiplier); var result = lerp(stat.Min, stat.Max, quality * durability); if (float.IsNaN(result)) - throw new InvalidOperationException($"Performance Stat on {typedItem?.Name ?? item.ItemId.ToString()} evaluating as NaN: input data is invalid! Durability: {item.Durability} / {maxDurability}"); + throw new InvalidOperationException($"Performance Stat on {typedItem?.Name ?? item.ItemKey} evaluating as NaN: input data is invalid! Durability: {item.Durability} / {maxDurability}"); return result; } @@ -647,7 +647,7 @@ public class ItemManager var typedItem = GetRuntimeItem(item); if (typedItem == null) { - _logger($"Attempted to instantiate missing item id {item?.ItemId}"); + _logger($"Attempted to instantiate missing item key {item?.ItemKey}"); return null; } diff --git a/docs/aetheria-perfect-machine-map.md b/docs/aetheria-perfect-machine-map.md index b054b81f1..d4538e3c5 100644 --- a/docs/aetheria-perfect-machine-map.md +++ b/docs/aetheria-perfect-machine-map.md @@ -1227,6 +1227,8 @@ First Aetheria surfaces to publish: references, item-use behavior references, and runtime commit item/hull surfaces now carry typed item keys; remaining broader simulation paths 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. - Remove runtime dependency on `ItemData` DTOs as item instance owners. 5. Mesh host