From 13e79909231a842030f703b80862c0dfdd601b50 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Mon, 15 Jun 2026 02:14:58 +0100 Subject: [PATCH] Remove behavior item GUID projections --- .voidbot/state/aetheria.cc | Bin 95809 -> 96200 bytes Aetheria.State/README.md | 9 +++++---- .../ServerShared/Behaviors/ItemUsage.cs | 2 -- .../Scripts/ServerShared/Behaviors/Weapon.cs | 5 ----- docs/aetheria-perfect-machine-map.md | 17 +++++++++-------- 5 files changed, 14 insertions(+), 19 deletions(-) diff --git a/.voidbot/state/aetheria.cc b/.voidbot/state/aetheria.cc index 5fd23bbddfc8649c3d0c1747041f0c3689942a86..aa611bf27efeb27719171642059542bcd9e4bb01 100644 GIT binary patch delta 1588 zcmZWpOK%)S5N7;<*uu!cGC>9)XsK1(>?0$ z@n%D$O~f&$Xby9VK!Ok{7zxP--#{FY5^+EQ31me601uJm1e~azo>{L!+GkBy)z{zm zRek+?@0~w;zxcGPe{%YjiAwp{(dz1TXE^z$>slVEPE@jp=)P1$CT(P2&!H~=+SX{# z(%sgVGob4r86|5_ryER2!Zd`Xb!d{Aa|^dr9EMajcjixaJ|+@sAc4D}2p1#}+y_bE zVk8t056f+Um(?NjD+_ZZk|F}B8L0A2H=r#1*%^2TXe4-x&@dE)a*r%v+Z9E9u!$WV zsI)Nysw8;OBvcbby$czU5*5oDb)igbH=V|lnEV4AktUGwwiKWX6I z@EQSV@QxE1bIn4qNL|5^l1MYb$H?iGxgv^Z)L3?pjJ_CoXcLM#n(-Kj7Q{R-m`tBH zp*b|3|0v(mz!g^A`6IcvK9t@car#>2Ww8i8b(;$wG9FUK6`}azhU$R1OcPgx5!Gys z1xz;$(HFqgC}IuYB0wpKVqqNM5y44~LExEukA%#ZHn=8Y?onyPAU^C+X;}(R`ZflC5pyP!a=p&^J=Cjb)J!Hu5G$#Uy1CO{=$|int!I?_~vY4Gi zJ1Nt;L6Jy9m_{tS7ahm)MiJr(7ty1@<=c4Gx{z-}P5tuN%m*K%Np}_#dj3T6{tp9N z>if_7mzLh55h8Gr7qu5xF;he|I7n4zQKm%hv;QlZk4*Bp7)>5L7~1;q{=JdpqhFs( zUT+*oZajP{>6;onbH=*e+K_pO()hqmqUv-SX)ujs=q#3zUXX1ZgV#*{4l2pZkM<|G zj}AWhnvug!qnpr2&yB)EH1kWvv_;|3fhGlBr7Rh2#O2QT|yV`72MQP3WDcO=1r1?i`krW?{~hRGxw*z zC+__<@y(ZG`{!D(Ewua-$6Cv4-gCu|W4A_?g_C7PJ-Irn9A79aPmLcLi^kVy#xMSS zYO`^gY=^W!xGaV3Lx#Z$#su$PTDmZMfqGU+qaq7gu4B4w@-#)=-@I~J=7z%JkADsg zdT2mXs=5?{Roe%FF~Mq-Mp)6M3VS!)_89+*AVHCCdA6p}!4RZ^#9fOqB?weVkQ*W6 z3g(;&FcGV0g_4VKO39=TC_$u|(w0fQqg0#_T61Iez_U@* zhZs((UQ_9;gOUj_)XD)MX|*5&k%lpCx z7!bC&{{6EvTi$`URH;`}6T|R-a&EwI?XY)bvf=c*7>m0PUwUt}QZ)tkWv^g}2yM>x zlr!DMojvj4?Y!){->ta5Z>sq8#=+B7xGWbUtx~oR!)BW}A^r#IOv)_$uTTaZrQfH> z+<)SYPd?+--aJ>})z^!;-=AKe{_X4iZ=OAm8M_uJ9h#DO70&Dq4+wHwE|KE_)jsrj z?~N65_;|^?x<0u7-PAL8s4Lup)Aqc@b@}MdbTRhJ^TQvGdM_WW-lF-|^5+&~CKPQv zIO=^ov2kjOCw})$q_hR)bz1lkFUZvrmE8g9@bfS8?_6>hcJT)rM&y^=XOud_R RY2KAK{!P7mlXdO*@_#NU+WG(h 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.