diff --git a/.voidbot/state/aetheria.cc b/.voidbot/state/aetheria.cc index 2d855ab63..0f07ebe8c 100644 Binary files a/.voidbot/state/aetheria.cc and b/.voidbot/state/aetheria.cc differ diff --git a/Assets/Scripts/ServerShared/CultCache/DatabaseEntry.cs b/Assets/Scripts/ServerShared/CultCache/DatabaseEntry.cs index 41d6f51f2..fbbd0bb84 100644 --- a/Assets/Scripts/ServerShared/CultCache/DatabaseEntry.cs +++ b/Assets/Scripts/ServerShared/CultCache/DatabaseEntry.cs @@ -3,53 +3,15 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ using System; -using System.Linq; -using MessagePack; -using MessagePack.Formatters; -// TODO: USE THIS EVERYWHERE using Unity.Mathematics; -using static Unity.Mathematics.math; public interface INamedEntry { string EntryName { get; set; } } -[MessagePackObject, - Union(0, typeof(SimpleCommodityData)), - Union(1, typeof(CompoundCommodityData)), - Union(2, typeof(GearData)), - Union(3, typeof(HullData)), - Union(4, typeof(SimpleCommodity)), - Union(5, typeof(CompoundCommodity)), - Union(6, typeof(EquippableItem)), - Union(8, typeof(GalaxyMapLayerData)), - Union(9, typeof(NameFile)), - //Union(10, typeof(ZoneData)), - Union(11, typeof(PlayerData)), - // Union(12, typeof(Corporation)), - Union(13, typeof(Faction)), - Union(14, typeof(OrbitalEntity)), - Union(15, typeof(OrbitData)), - Union(16, typeof(BodyData)), - Union(17, typeof(PersonalityAttribute)), - Union(18, typeof(AgentTask)), - // Union(19, typeof(LoadoutData)), - Union(20, typeof(Ship)), - Union(21, typeof(Mining)), - Union(22, typeof(StationTowing)), - Union(23, typeof(Survey)), - Union(24, typeof(HaulingTask)), - Union(25, typeof(AsteroidBeltData)), - Union(26, typeof(GasGiantData)), - Union(27, typeof(SunData)), - Union(28, typeof(PlanetData)), - Union(29, typeof(CargoBayData)), - Union(30, typeof(DockingBayData)), - Union(31, typeof(WeaponItemData))] public abstract class DatabaseEntry { - [Key(0)] public Guid ID = Guid.NewGuid(); public override int GetHashCode() @@ -64,20 +26,15 @@ public abstract class DatabaseEntry } } -[MessagePackObject] public class DatabaseLink : DatabaseLinkBase where T : ItemData { - [IgnoreMember] public T Value => ResolveRuntimeItemCatalog(LinkID); } -[MessagePackObject] public class DatabaseLinkBase { - [Key(0)] public Guid LinkID; - [IgnoreMember] private static IRuntimeItemCatalogReader Catalog { get; set; } protected static T ResolveRuntimeItemCatalog(Guid linkId) where T : ItemData diff --git a/docs/aetheria-perfect-machine-map.md b/docs/aetheria-perfect-machine-map.md index 4f81a5a7b..4758caddf 100644 --- a/docs/aetheria-perfect-machine-map.md +++ b/docs/aetheria-perfect-machine-map.md @@ -77,7 +77,8 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. binds `DatabaseLinkBase` to that typed runtime item reader before gameplay objects read `ItemInstance.Data.Value`. The old `LegacyItemCatalogBoundary`, `LegacyItemCatalogCache`, and runtime MessagePack deserializer path have been - deleted. + deleted. `DatabaseEntry` and `DatabaseLink` are plain runtime identity/link + helpers now, not MessagePack objects or a global union root. - `ItemManager` no longer exposes the raw runtime item catalog reader as public gameplay/UI API. Temporary item instantiation bridges now go through the narrow `ItemManager.GetCatalogEntry` method. `ItemManager` no longer @@ -256,7 +257,10 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. 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. Item properties + item records for the old simulation object model. `DatabaseEntry` no longer + carries MessagePack union metadata; remaining item/behavior DTO MessagePack + keys are temporary projection metadata until typed behavior factories replace + reflection. Item properties manufacturer display is a typed snapshot consumer; loadout generation is the remaining runtime single-ID item lookup bridge. The old trade debug UI and console `give` command have been deleted. No live caller can enumerate legacy @@ -284,9 +288,10 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. generated keyboard layout caches, and server-side `DatabaseCache` paths. - 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 `DatabaseEntry` or - MessagePack catalog paths except bounded migration readers that emit typed - `Aetheria.State` documents. +- 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. `DatabaseEntry` is no longer a + persistence owner. ## Target Authority Map @@ -435,10 +440,11 @@ First Aetheria surfaces to publish: `AetheriaRuntimeItemCatalog`, a typed-state-backed projection from `AetheriaRuntimeCatalogSnapshot`; delete `LegacyItemCatalogBoundary`, `LegacyItemCatalogCache`, and the runtime MessagePack deserializer path. + - Done: demote `DatabaseEntry` and `DatabaseLink` from MessagePack + union/object shapes to plain runtime identity/link helpers. - Convert domain references from GUID/base-class patterns to typed record refs. - - Remove runtime dependency on `DatabaseEntry`/`ItemData` DTOs as item - instance owners. + - Remove runtime dependency on `ItemData` DTOs as item instance owners. 5. Mesh host - Replace `Economy.Server` RethinkDB and LiteNetLib database authority with a