From a4665d606521f97582653f3d9261c0ecdb2e33e0 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sun, 14 Jun 2026 08:00:42 +0100 Subject: [PATCH] Delete runtime item projection base --- .voidbot/state/aetheria.cc | Bin 75888 -> 75338 bytes Aetheria.State/README.md | 18 +++----- Assets/Scripts/ServerShared/ItemData.cs | 14 +++++- .../RuntimeItemProjectionEntry.cs | 16 ------- docs/aetheria-perfect-machine-map.md | 40 +++++++++--------- 5 files changed, 40 insertions(+), 48 deletions(-) diff --git a/.voidbot/state/aetheria.cc b/.voidbot/state/aetheria.cc index a04a991ce420de14513377da8af2885cdc356898..c481858e48549d4e5679ef71c252e38237f94305 100644 GIT binary patch delta 1000 zcmaJ=O-~b16wN?UF_6@xKrA2LjUOa*XbRW@D@fH;78(OAh?~dEZTrZ~d-c6H)S3`A zEM4iCOk68|urkJo3nOvi#u($mP5A-FCGJi1%}iV4#@*!1yXTyH&%K9V6Q4dOUOw$Q zJ~KO)%b8Q>r`GNp1OCUZdmW?@A-wxm8_8!QGAt|It%4$^s8ClY~5u+c$%^k}j z)NOuWC@T~og4%$Q?ynOG0$sj|_C!Rt0gQvgSw+9m%1SG1O2UA6s>(&kx6VCg6VWiC zq|hxAMRZLac%4b0O6qEhIN)G~SPi(eQYud34UafssZE6@bQ%+y(f0S>4c^w`gz7@h zoJJ@UQkHC}>i-U!&lEDLJ8!<}Na-K2h*h#lxrnrj%U3|RCM8OciaHM9O)3?Xxd86i zAgSv)B%B{CTrJ5^8P;0_aN6QbD&bj*3ppQ;kg^KsUiDCgHm)7Z;Mb6mPKSlD-S9;u ztBXAsg}-&-_zkoBXG- z&|1hYLGd~fHmF8TXCXYMsH@HKdfZG1`@dfgrOaKzEFID{EXxPmj|G;SXZ@e6;BPhi z{N7x0Ces%BPgtFd%$Q+GGmQA`plD#YZkNMNt8j+%dPWFk>R_CmMTDSX1TN7L#0_`6 zQl@vVOe~a>+7$|9`ZIVmY@9Qu1D-Nqu`oA1GndVp*=%<0i6RyG@Hs)PASij&>NxZF z5_aS5%Gip(uslau#Ht1pBgUDdt+VsLbPu=BtB?!NEAU5*{SK6G-Qba+K5FnbJR2Qi W&@*P-?Lg7}?(K{jA9_1je(ev_&|tv; delta 1344 zcma)6J!~9B6xP@m%f^93@)Ny#WFHlIW;tW?$%u8_FRR1 zf1E8AkE`sNQDIe(w1qByKf<`!+RQU68wk>31JR2fJE0#mdoRy)5n#;7ri z&_JeI5OJ;Bpt7_Lw%tV0NsU}F5t8)aRbhjn-J;pEXxZrQ|qr3m>#4ITNueTn=D%b?u z?($l-_G&Z_`}b8 z42+d&3eC<;rZ_&qrgja;%qn;V6Mju9T{0jEH7`lu#)$j2ga)EqlN1)VyQx5I8$-%) zB8GGfXxdoTbM4jB*i3okLD_`U8!bg0p(Sn7Rjym5Sear+pC#RWhYa8Emk)Su6QxO4 z>TKQBZ>zg^*A%g6sW@TQO5_p3p=^B@c}n!4$%qbO16~$l&^8^CJpUap9nR&`75PkN z&72taY>;(8jmOm4&@URx-8qDBiNf5n~&Vv2d}Yr+}@AXO9OWG zZt3+3x?*_qr%LVQ&C=bgKrZ!C^gLX0Tvr)}w?3hrcyPhh9=$0a3?Z2Z5i_|GErPeIJnbel&zAZViE#tHVq(8AfGS!Jgx%PaKt%`rB0=Buu_L3ivg zBHDyR4mTK;= n;VGwvM~cfQnd&9h$^%#Yc9QKKhRVBmdv})I9qYvwYFqyRP#WF; diff --git a/Aetheria.State/README.md b/Aetheria.State/README.md index 34e36f1db..85433054a 100644 --- a/Aetheria.State/README.md +++ b/Aetheria.State/README.md @@ -66,22 +66,18 @@ Dead legacy catalog roots for user records and galaxy map-layer resources have 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 `RuntimeItemReference`, a narrow item-definition id plus -optional hydrated projection cache. The old generic `RuntimeCatalogLink` -abstraction has been deleted; item data projection is routed through -`ItemManager` and a runtime item projection reader over the typed catalog. -`Projection` is not durable state; it is a bridge for surviving simulation and -UI code. The remaining single-item bridge is explicit `GetData` projection -hydration, not catalog entry access. +Item instances now carry `RuntimeItemReference`, a narrow item-definition id. +The old generic `RuntimeCatalogLink` abstraction, `ItemManager.GetData` +hydration path, and `RuntimeItemReference.Projection` cache have been deleted; +runtime item facts come from typed catalog rows. Loadout generation now applies typed catalog prefilters for item category, hardpoint type, shape fit, hull type, and behavior kind, then instantiates generated equipment directly from typed runtime rows. The surviving trade menu also applies typed catalog prefilters for row size, hardpoint type, and behavior kind before legacy buy actions. -Surviving item catalog Unity DTOs inherit `RuntimeItemProjectionEntry`; the old -`RuntimeCatalogEntry` base name no longer appears in live source. Temporary -faction/corporation projections and zone body/orbit DTOs keep local GUID fields -but no longer inherit the shared projection identity base. +Surviving item catalog Unity DTOs keep local legacy GUID fields only where old +simulation APIs still accept DTO objects. The old `RuntimeCatalogEntry` and +`RuntimeItemProjectionEntry` base names no longer appear in live source. The dead `InspectableRuntimeCatalogLinkAttribute` inspector metadata is gone; typed runtime projection still uses `LegacyPayloadKeyAttribute` only where the temporary mapper needs a deterministic field order. diff --git a/Assets/Scripts/ServerShared/ItemData.cs b/Assets/Scripts/ServerShared/ItemData.cs index d3daa0a62..adb68b079 100644 --- a/Assets/Scripts/ServerShared/ItemData.cs +++ b/Assets/Scripts/ServerShared/ItemData.cs @@ -260,8 +260,10 @@ public class Shape } -public abstract class ItemData : RuntimeItemProjectionEntry, INamedEntry +public abstract class ItemData : INamedEntry { + public Guid ID = Guid.NewGuid(); + [Inspectable, LegacyPayloadKey(1)] public string Name; @@ -293,6 +295,16 @@ public abstract class ItemData : RuntimeItemProjectionEntry, INamedEntry set => Name = value; } + public override int GetHashCode() + { + return ID.GetHashCode(); + } + + public override bool Equals(object obj) + { + return obj is ItemData item && item.ID == ID; + } + } [Inspectable] diff --git a/Assets/Scripts/ServerShared/RuntimeProjection/RuntimeItemProjectionEntry.cs b/Assets/Scripts/ServerShared/RuntimeProjection/RuntimeItemProjectionEntry.cs index 09d9a0253..4a518e277 100644 --- a/Assets/Scripts/ServerShared/RuntimeProjection/RuntimeItemProjectionEntry.cs +++ b/Assets/Scripts/ServerShared/RuntimeProjection/RuntimeItemProjectionEntry.cs @@ -10,22 +10,6 @@ public interface INamedEntry string EntryName { get; set; } } -public abstract class RuntimeItemProjectionEntry -{ - public Guid ID = Guid.NewGuid(); - - public override int GetHashCode() - { - return ID.GetHashCode(); - } - - public override bool Equals(object obj) - { - if (obj is RuntimeItemProjectionEntry entry) return entry.ID == ID; - return false; - } -} - public class RuntimeItemReference { public Guid ItemId; diff --git a/docs/aetheria-perfect-machine-map.md b/docs/aetheria-perfect-machine-map.md index e940dd676..f592f846c 100644 --- a/docs/aetheria-perfect-machine-map.md +++ b/docs/aetheria-perfect-machine-map.md @@ -46,8 +46,8 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. 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 `RuntimeItemProjectionEntry`, - GUID identity, runtime catalog metadata, and static projection references. Dead +- Shared item domain state is still partly built around `RuntimeItemReference`, + `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, JsonKnownTypes, RethinkDB, LiteNetLib client transport, and the broken @@ -137,8 +137,8 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. resolver, hydrated projection cache, or durable item-data owner. The old `LegacyItemCatalogBoundary`, `LegacyItemCatalogCache`, and runtime MessagePack deserializer path have been - deleted. The old `DatabaseEntry`/`RuntimeCatalogEntry` base has been demoted - to `RuntimeItemProjectionEntry` for surviving item DTOs, and the old generic + deleted. The old `DatabaseEntry`/`RuntimeCatalogEntry`/`RuntimeItemProjectionEntry` + identity base has been deleted from live source, and the old generic `DatabaseLink`/`RuntimeCatalogLink` path has collapsed into the item-specific runtime reference. - `ItemManager` no longer exposes the raw runtime item catalog reader as public @@ -510,13 +510,11 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. now exposes that typed package snapshot at boot. The SDK-style `Aetheria.State.Unity` facade maps typed `.cc` documents into the same contract for full .NET smokes and Eve surface reads. Neither writes state or - owns simulation. The runtime no longer has a MessagePack catalog cache. - `AetheriaRuntimeItemCatalog` materializes temporary `ItemData` DTOs from typed - item records for the old simulation object model. `RuntimeItemProjectionEntry` is - an item projection identity helper, not a persistence base or corporation - owner. `RuntimeItemReference.Projection` is a hydrated DTO cache derived from - `RuntimeItemReference.ItemId` through `ItemManager`; it is not allowed to own - item identity or persistence. The reader interface for this bridge is named + owns simulation. The runtime no longer has a MessagePack catalog cache or + whole-item DTO projection cache. `AetheriaRuntimeItemCatalog` exposes typed + item rows and temporarily projects typed behavior payloads into `BehaviorData` + objects for the old behavior class constructors. `RuntimeItemReference.ItemId` + is the only item reference value. The reader interface for this bridge is named `IRuntimeItemProjectionReader` so callers cannot mistake it for catalog ownership. Behavior type selection now uses an explicit runtime catalog map instead of `UnionAttribute` reflection. @@ -552,13 +550,13 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. authority. - Forbidden writers: old JSON backing stores, JsonKnownTypes converters, Rethink/LiteNet paths, IMGUI database editor exports, local save-file writes, - generated keyboard layout caches, and server-side `DatabaseCache` paths. + generated keyboard layout caches, server-side `DatabaseCache` paths, and item + DTO projection caches. - Shared paths: manual gameplay edits, editor edits, server updates, file load, file save, and migration all need to converge on one typed commit primitive. - Deletion line: no new behavior should be added to old `ItemData` DTO metadata or MessagePack catalog paths except bounded migration readers and the - current typed item projection bridge. `RuntimeItemProjectionEntry` is not a - persistence owner. + current typed behavior projection bridge. ## Target Authority Map @@ -571,11 +569,12 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. - Derived state: Unity scene objects, HUD panels, editor inspectors, debug views, server dashboards, and compatibility DTOs. - Forbidden writers: Unity UI components, RethinkDB, legacy JSON stores, - `RuntimeCatalogEntry.ID`, global cache statics, and any compatibility reader. + `RuntimeCatalogEntry.ID`, `RuntimeItemProjectionEntry`, global cache statics, + and any compatibility reader. - Shared paths: gameplay input, editor edits, import/deep-load, replication, simulation ticks, and tests all call the same typed state service. -- Deletion line: replace the remaining `RuntimeItemProjectionEntry`/`ItemData` runtime DTO - projection with native typed item instances, then remove old MessagePack +- Deletion line: replace the remaining `ItemData` runtime DTO projection with + native typed item instances and typed behavior factories, then remove old MessagePack catalog metadata from live Unity source once import-only migration no longer needs it. @@ -837,6 +836,8 @@ First Aetheria surfaces to publish: `ServerShared/RuntimeProjection`. - Done: rename the surviving runtime DTO identity base from `RuntimeCatalogEntry` to `RuntimeItemProjectionEntry`. + - Done: delete the `RuntimeItemProjectionEntry` base after item DTO hydration + was removed; surviving `ItemData` DTOs own only their local legacy GUID. - Done: delete unused `InspectableRuntimeCatalogLinkAttribute` metadata from runtime DTOs; link inspection no longer masquerades as catalog authority. - Done: replace behavior union reflection with an explicit runtime catalog @@ -1010,8 +1011,7 @@ First Aetheria surfaces to publish: `Assets/Scripts` is zero for the old item value/catalog-entry/resolver path. - Live Unity source has no `RuntimeCatalogLink` or `RuntimeCatalogLinkBase`; item instances use `RuntimeItemReference` and expose `Data.ItemId`. -- Live Unity source has no `RuntimeCatalogEntry`; only surviving item DTOs - inherit `RuntimeItemProjectionEntry`. +- Live Unity source has no `RuntimeCatalogEntry` or `RuntimeItemProjectionEntry`. - Live Unity source has no `InspectableRuntimeCatalogLinkAttribute`; `LegacyPayloadKeyAttribute` remains only as the temporary mapper key. - Unity batchmode compile also returned cleanly after disabling `MessagePack` @@ -1048,7 +1048,7 @@ First Aetheria surfaces to publish: ## Immediate Cut Line -Do not add behavior to `ItemData` or `RuntimeItemProjectionEntry`. The typed +Do not add behavior to `ItemData` or resurrect `RuntimeItemProjectionEntry`. The typed state spine and migration quarantine exist; the next cuts should replace the surviving behavior DTO projection bridge with typed behavior factories and Eve surfaces. Any predicate that still needs legacy DTO objects must earn that