diff --git a/.voidbot/state/aetheria.cc b/.voidbot/state/aetheria.cc index 5fd23bbdd..aa611bf27 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 5f99d6b54..0d5a3be44 100644 --- a/Aetheria.State/README.md +++ b/Aetheria.State/README.md @@ -89,11 +89,12 @@ facade. `ItemInstance.ItemKey` is the identity surface, while `ItemId` is a derived legacy-GUID compatibility projection for broader simulation paths. 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. -Unity runtime commit DTOs also carry typed `ItemKey`/`HullItemKey` fields for +item-use behavior references now use item keys. The old 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. Their old `*LegacyId` fields remain import/export compatibility -only; the commit applier prefers typed keys whenever present. +consumables; the commit applier no longer reconstructs item keys from legacy +item GUID fields. The package runtime catalog snapshot indexes items by canonical item key; Unity gameplay, HUD, inventory, trade, ship, and zone helper lookups use `ItemKey` directly instead of deriving `ItemId` and searching by legacy GUID. diff --git a/Assets/Scripts/ServerShared/Behaviors/ItemUsage.cs b/Assets/Scripts/ServerShared/Behaviors/ItemUsage.cs index d764f06e2..b25f8810d 100644 --- a/Assets/Scripts/ServerShared/Behaviors/ItemUsage.cs +++ b/Assets/Scripts/ServerShared/Behaviors/ItemUsage.cs @@ -2,13 +2,11 @@ * 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.Linq; [Inspectable, Order(-5)] public class ItemUsageConfig : RuntimeBehaviorConfig { public string ItemKey; - public Guid Item => AetheriaRuntimeItemReference.ToLegacyId(ItemKey); public override Behavior CreateInstance(EquippedItem item) { diff --git a/Assets/Scripts/ServerShared/Behaviors/Weapon.cs b/Assets/Scripts/ServerShared/Behaviors/Weapon.cs index 1b41e2386..234f34d1a 100644 --- a/Assets/Scripts/ServerShared/Behaviors/Weapon.cs +++ b/Assets/Scripts/ServerShared/Behaviors/Weapon.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.Generic; using System.Linq; using Unity.Mathematics; @@ -44,7 +43,6 @@ public abstract class WeaponConfig : RuntimeBehaviorConfig [InspectablePrefab] public PerformanceStat Visibility = new PerformanceStat(); public string AmmoItemKey; - public Guid AmmoType => AetheriaRuntimeItemReference.ToLegacyId(AmmoItemKey); [InspectablePrefab] public int MagazineSize; @@ -71,7 +69,6 @@ public abstract class Weapon : Behavior, IActivatedBehavior public DamageType DamageType { get; } public string EffectPrefab { get; } public string AmmoItemKey { get; } - public Guid AmmoType { get; } public int MagazineSize { get; } public bool UsesAmmo => !string.IsNullOrWhiteSpace(AmmoItemKey); public GuidedProjectileTargetMode GuidedProjectileTargeting { get; private set; } @@ -105,7 +102,6 @@ public abstract class Weapon : Behavior, IActivatedBehavior DamageType = data.DamageType; EffectPrefab = data.EffectPrefab ?? ""; AmmoItemKey = data.AmmoItemKey; - AmmoType = data.AmmoType; MagazineSize = data.MagazineSize; InitializeGuidedProjectileProfile(data); } @@ -116,7 +112,6 @@ public abstract class Weapon : Behavior, IActivatedBehavior DamageType = data.DamageType; EffectPrefab = data.EffectPrefab ?? ""; AmmoItemKey = data.AmmoItemKey; - AmmoType = data.AmmoType; MagazineSize = data.MagazineSize; InitializeGuidedProjectileProfile(data); } diff --git a/docs/aetheria-perfect-machine-map.md b/docs/aetheria-perfect-machine-map.md index 19eaded87..77c50f56a 100644 --- a/docs/aetheria-perfect-machine-map.md +++ b/docs/aetheria-perfect-machine-map.md @@ -632,8 +632,9 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. consumable activation, action-bar consumable fill/quantity display, item transfer lookup, and trade owned-count rows now use item keys rather than GUID-owned cargo indexes. Weapon ammo and item-use behavior config item - references are also typed-key-first (`AmmoItemKey`/`ItemKey`), with - `AmmoType`/`Item` only derived GUID compatibility. Runtime commit DTOs now + references are also item-key-only at the behavior API surface + (`AmmoItemKey`/`ItemKey`); the derived `AmmoType` and `Item` GUID + compatibility properties have been deleted. Runtime commit DTOs now publish item and hull identity through `ItemKey`/`HullItemKey`, with legacy ID fields demoted to compatibility. The package runtime catalog snapshot now indexes items by canonical item key, and Unity gameplay/UI/zone helper @@ -1048,7 +1049,7 @@ First Aetheria surfaces to publish: `Weapon`-owned target mode, curve keys, dodge frequency, and evaluated thrust/top-speed values. - Done: move HUD ammo display reads off `WeaponData`; `SchematicDisplay` - consumes `Weapon.AmmoType`, `Weapon.MagazineSize`, and `Weapon.UsesAmmo`, + consumes `Weapon.AmmoItemKey`, `Weapon.MagazineSize`, and `Weapon.UsesAmmo`, and the public `WeaponData` escape hatch has been removed. - Done: delete dormant legacy item audio reads in `EntityInstance` and stale commented thruster sound-trigger code; those paths had no live output and @@ -1346,11 +1347,11 @@ First Aetheria surfaces to publish: action-bar consumable quantity/fill, item transfer lookup, and trade owned counts from derived `Guid ItemId` keys to typed `ItemKey` strings. - Done: move weapon ammo and `ItemUsage` config references from GUID fields - to typed item-key fields. `AmmoType` and `Item` remain derived compatibility - properties, but runtime ammo consumption, item use, and HUD ammo counts use - `AmmoItemKey`/`ItemKey`. - - Done: add typed `ItemKey`/`HullItemKey` fields to runtime commit item - surfaces and make the applier prefer them over stale legacy-ID fields. + to typed item-key fields. The derived `AmmoType` and `Item` compatibility + properties have been deleted; runtime ammo consumption, item use, and HUD + ammo counts use `AmmoItemKey`/`ItemKey`. + - Done: make runtime commit item surfaces item-key-only through + `ItemKey`/`HullItemKey`; stale legacy-ID commit fields were deleted. Loadout items, action-bar targets, body resources, entity hulls, cargo contents, and active consumables now prove typed-key ownership in the Unity smoke without any item legacy-ID commit fields.