From 84bf298596ae095257c5a3ccbcf6d85d5fb2dc1f Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sun, 14 Jun 2026 11:40:28 +0100 Subject: [PATCH] Name runtime item references as definition ids --- .voidbot/state/aetheria.cc | Bin 85257 -> 85505 bytes Assets/Scripts/ServerShared/ItemInstance.cs | 9 ++----- Assets/Scripts/ServerShared/ItemManager.cs | 4 +-- ...e.cs => RuntimeItemDefinitionReference.cs} | 6 ++--- ...=> RuntimeItemDefinitionReference.cs.meta} | 0 docs/aetheria-perfect-machine-map.md | 25 +++++++++--------- 6 files changed, 20 insertions(+), 24 deletions(-) rename Assets/Scripts/ServerShared/{RuntimeItemReference.cs => RuntimeItemDefinitionReference.cs} (76%) rename Assets/Scripts/ServerShared/{RuntimeItemReference.cs.meta => RuntimeItemDefinitionReference.cs.meta} (100%) diff --git a/.voidbot/state/aetheria.cc b/.voidbot/state/aetheria.cc index 2242c66e09c045f16278bb6e7f388958e09c9cce..fa4a22b57857f5a2cb132e323fcff32891e437bd 100644 GIT binary patch delta 1286 zcmaKs%WG3X6vj>3iWMpxC7==|V7dSvwM?A=6f@FsaDuACbf3M;B(u~`|+gq1y=Cz9FM^)sDw?=p>F;>BtuX{Ao9PVx`~)VKm!EaD%Hd= zJD$}_;lipSEt7-G3snHkJSFCB#j}bEzKH6TNmVF9Q-G2c81{1qbfih^py0BYerA~T zP@Bg68I)QH3X+s?uM(jw)Ten0J*tH!f#;GkLz`3)1TUhP20X)s01HMzumW+aFgbG# zC?cky;&R7DkLS^A5Awe8HA4s?nD)RZTwu=UIM{kknP7I?Xl>-eO^lmfB@P-GEUfj^ z-d>6>z{^TdQM!mc%E#lr$No-7+nUI}wtH!ti)jjZRENigL?*{#f~l5~LaPcAx?1@K zH@y1_xh{!KCmyu8O>vrDc#@P62g8IBWdwte2SO>A1++3W5B(t?%n_%UevXlMl}1eO z+phjwkI?(Z<$&C{5R859sb@Y-91CuK=?i)`PR-^*;5hbSbX)n`Iq2JH5T`Smmkn0G z_8qdf|NBgWhr`DQrlxjy9mpF$C(X)&IJhOg(%!oH@!>!=n`4gB)XIl4{n2UT6~3o! z9&hMAnjR$H9|_jBP9KcFnUT@i$A%P8rmOXzTPHhvURd}0WA)efB@^Grx?8=$$Bv`T z&u3`Fem={o@x*4cG#vd|s$=)^{)vQYm7~rF6N#l}X=K12ULU)dc-7siWoCZ^@5IzY delta 1134 zcmZ8h&ubGw6n2}mw1Tus#a{;>qKIe%4GlJ0gr*`CES8pfC?1?-Uy{+?nRRBiVf7Hj zlX#Ln1jK{lkAf#5NROU8h&`y6Qc?T|y!a0k-|QyokK5+Wd*6KD_rA%a7yVD3_kVcT zH<&M6%1`Es6R0gvr`=-|0=d$H5&7aQ5G@3dp z&VY*`G@#IDLBK@~LX8@@(I6WFmS#b&pn@gAO$4*HburQg{oKydbj5Hfl1{~48fOXt z-5LU6dc4BYW8p=Yq0EJQ(cWWmZ8tFC0!t9a%1l8;3ZtY4erS?84MH|R$I#&+gQ>(uy~#ZU69wo(*TOvjH&JOM8J1@1q8ln!rm@s&>wq<2k8VwJF}G?^*h@E8 z6U)zPsG&ebN1gkcw6jD;GM{{<8-eNh+0=P~6=Kd*1fFb+dANd}{i1EttvXayM&}ox zOlzkMMC7zKWU_%W5^GXdN9a#UYZ~1&2Xia{sbF^~G`L*RlD!D3O8PeV73pH`Jrk9>R0~+uzxJJf{90jk z^Lor~PsPJO4z#o1OUK*Izv~B!w-(4dfC9hKdpXt`MZYQUu~x4@QS|`dUbc z4t-Ry^Yv)_a_h{Y^i59|CzjtBRwD*;?TxKd*|mX;^ZUwB?==3FIo5sc6XW)^w@#Ow oPrXv1^OrEt8k})tXRbIg*?KtRw7NeF<7;r$*%<0h6$;D$0XJx!qyPW_ diff --git a/Assets/Scripts/ServerShared/ItemInstance.cs b/Assets/Scripts/ServerShared/ItemInstance.cs index 55b2b9bc5..cbfcab064 100644 --- a/Assets/Scripts/ServerShared/ItemInstance.cs +++ b/Assets/Scripts/ServerShared/ItemInstance.cs @@ -12,15 +12,10 @@ using static Unity.Mathematics.math; public abstract class ItemInstance { - public RuntimeItemReference Data; + public RuntimeItemDefinitionReference Reference; public ItemRotation Rotation; - public RuntimeItemReference Reference - { - get => Data; - set => Data = value; - } - public Guid ItemId => Data?.ItemId ?? Guid.Empty; + public Guid ItemId => Reference?.ItemId ?? Guid.Empty; } public abstract class CraftedItemInstance : ItemInstance diff --git a/Assets/Scripts/ServerShared/ItemManager.cs b/Assets/Scripts/ServerShared/ItemManager.cs index b439e8b0d..5dd2dc4f0 100644 --- a/Assets/Scripts/ServerShared/ItemManager.cs +++ b/Assets/Scripts/ServerShared/ItemManager.cs @@ -302,9 +302,9 @@ public class ItemManager return shape; } - public RuntimeItemReference CreateReference(Guid itemId) + public RuntimeItemDefinitionReference CreateReference(Guid itemId) { - return new RuntimeItemReference(itemId); + return new RuntimeItemDefinitionReference(itemId); } public void Log(string s) diff --git a/Assets/Scripts/ServerShared/RuntimeItemReference.cs b/Assets/Scripts/ServerShared/RuntimeItemDefinitionReference.cs similarity index 76% rename from Assets/Scripts/ServerShared/RuntimeItemReference.cs rename to Assets/Scripts/ServerShared/RuntimeItemDefinitionReference.cs index 4a518e277..5c09e10d8 100644 --- a/Assets/Scripts/ServerShared/RuntimeItemReference.cs +++ b/Assets/Scripts/ServerShared/RuntimeItemDefinitionReference.cs @@ -10,15 +10,15 @@ public interface INamedEntry string EntryName { get; set; } } -public class RuntimeItemReference +public class RuntimeItemDefinitionReference { public Guid ItemId; - public RuntimeItemReference() + public RuntimeItemDefinitionReference() { } - public RuntimeItemReference(Guid itemId) + public RuntimeItemDefinitionReference(Guid itemId) { ItemId = itemId; } diff --git a/Assets/Scripts/ServerShared/RuntimeItemReference.cs.meta b/Assets/Scripts/ServerShared/RuntimeItemDefinitionReference.cs.meta similarity index 100% rename from Assets/Scripts/ServerShared/RuntimeItemReference.cs.meta rename to Assets/Scripts/ServerShared/RuntimeItemDefinitionReference.cs.meta diff --git a/docs/aetheria-perfect-machine-map.md b/docs/aetheria-perfect-machine-map.md index daade6200..7fb2f5299 100644 --- a/docs/aetheria-perfect-machine-map.md +++ b/docs/aetheria-perfect-machine-map.md @@ -46,7 +46,7 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. command documents through the provider-owned Eve command bridge on startup and on a daemon polling loop while hosting the CultMesh state node. `Aetheria.State.ApplyPending` remains a bounded local operator applicator for both pending lanes. -- Shared item domain state is still partly built around `RuntimeItemReference`, +- Shared item domain state is still partly built around `RuntimeItemDefinitionReference`, `ItemData`, `BehaviorData`, GUID identity, and runtime catalog metadata. Dead user-record and galaxy-map-layer catalog roots have been deleted, and surviving runtime DTOs no longer carry legacy catalog group/table annotations. Newtonsoft, @@ -136,7 +136,7 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. - `ActionGameManager` opens `AetheriaRuntimeCatalogStore` over `aetheria-world.cc`, projects it through `AetheriaRuntimeItemCatalog`, and gives `ItemManager` explicit item lookup authority. Item instances carry - `RuntimeItemReference`, an item-definition id, not a process-global catalog + `RuntimeItemDefinitionReference`, an item-definition id, not a process-global catalog resolver, hydrated projection cache, or durable item-data owner. The old `LegacyItemCatalogBoundary`, `LegacyItemCatalogCache`, and runtime MessagePack deserializer path have been @@ -283,11 +283,10 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. `Faction` DTOs, including allegiance edges, for the existing simulation shape and resolves full name arrays from `aetheria.name_file.v2` records. The runtime no longer opens the old `GameData/NameFile/*.msgpack` directory. -- Item instances carry `RuntimeItemReference`, a narrow item-definition id +- Item instances carry `RuntimeItemDefinitionReference`, a narrow item-definition id resolved by `ItemManager` against the typed runtime item catalog projected - from `aetheria-world.cc`. The optional `Projection` on the reference is a - hydrated DTO cache for legacy simulation/UI code, not state authority. - MessagePack catalog construction no longer grabs global link-resolution + from `aetheria-world.cc`. Runtime item references no longer carry hydrated DTO + projection caches or global link-resolution authority. MessagePack catalog construction no longer grabs global link-resolution authority, and the old generic `RuntimeCatalogLink` abstraction is gone. - `Economy.Server` now starts the modern `Aetheria.State` CultMesh node, drains pending Unity runtime commits through the typed state applicator, and no @@ -548,8 +547,7 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. behavior metadata instead of rebuilding config DTOs for lookup. `ItemInstance.ItemId` is the runtime identity surface and `ItemInstance.Reference` is the explicit item-reference API; - `RuntimeItemReference Data` remains only the backing compatibility field - until native typed item instances replace it. The reader interface for this + there is no remaining `ItemInstance.Data` identity/backing field. The reader interface for this bridge is named `IRuntimeItemCatalogReader` and exposes only typed catalog row lookup. Behavior type selection now uses an explicit runtime catalog map instead of @@ -1062,8 +1060,11 @@ First Aetheria surfaces to publish: API callers use. - Done: add `ItemInstance.Reference` as the explicit item-reference API and move factories/cargo stacking off direct `.Data` comparisons and - assignments. `Data` remains only the serialized/backing compatibility - field. + assignments. + - Done: rename `RuntimeItemReference` to + `RuntimeItemDefinitionReference` and delete the `ItemInstance.Data` + compatibility field; item instances now expose item identity through + `Reference` and `ItemId` only. - Done: delete the dead `ItemManager.GetRuntimeItemProjection` bridge after loadout generation stopped hydrating selected typed rows into `EquippableItemData` merely to instantiate equipment. @@ -1131,8 +1132,8 @@ First Aetheria surfaces to publish: - `rg ".Data.Value|SetValue|GetCatalogEntry|IRuntimeItemCatalogReader|BindRuntimeItemCatalog|ResolveRuntimeItemCatalog|private static IRuntimeItemCatalogReader"` in `Assets/Scripts` is zero for the old item value/catalog-entry/resolver path. - Live Unity source has no `RuntimeCatalogLink` or `RuntimeCatalogLinkBase`; - item instances expose `ItemId` and `Reference`; direct `Data.ItemId` reads are - contained inside the `ItemInstance.ItemId` bridge. + item instances expose `ItemId` and `Reference`; the old `ItemInstance.Data` + identity field is deleted. - Live Unity source has no `RuntimeCatalogEntry` or `RuntimeItemProjectionEntry`. - Live Unity source has no `InspectableRuntimeCatalogLinkAttribute`; `LegacyPayloadKeyAttribute` remains only as the temporary mapper key.