diff --git a/.voidbot/state/aetheria.cc b/.voidbot/state/aetheria.cc index d8c987116..7fa34ad75 100644 Binary files a/.voidbot/state/aetheria.cc and b/.voidbot/state/aetheria.cc differ 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