diff --git a/.voidbot/state/aetheria.cc b/.voidbot/state/aetheria.cc index 520ee7436..69e01a356 100644 Binary files a/.voidbot/state/aetheria.cc and b/.voidbot/state/aetheria.cc differ diff --git a/Assets/Scripts/ServerShared/EntitySettings.cs b/Assets/Scripts/ServerShared/EntitySettings.cs index dac16fcea..571c0ed92 100644 --- a/Assets/Scripts/ServerShared/EntitySettings.cs +++ b/Assets/Scripts/ServerShared/EntitySettings.cs @@ -1,10 +1,8 @@ using System; -using MessagePack; -[MessagePackObject, Serializable] +[Serializable] public class EntitySettings { - [Key(0)] public float ShutdownPerformance = .1f; public EntitySettings Copy() diff --git a/Assets/Scripts/ServerShared/ItemInstance.cs b/Assets/Scripts/ServerShared/ItemInstance.cs index 287313b23..677b53c84 100644 --- a/Assets/Scripts/ServerShared/ItemInstance.cs +++ b/Assets/Scripts/ServerShared/ItemInstance.cs @@ -7,55 +7,33 @@ using System.Collections; using System.Collections.Generic; using System.Linq; using System.Reflection; -//using JM.LinqFaster; -using MessagePack; -using MessagePack.Formatters; using Unity.Mathematics; using static Unity.Mathematics.math; -[Union(0, typeof(SimpleCommodity)), - Union(1, typeof(CompoundCommodity)), - Union(2, typeof(EquippableItem)), - Union(3, typeof(ConsumableItem))] public abstract class ItemInstance { - [Key(0)] public DatabaseLink Data; - [Key(1)] public ItemRotation Rotation; + public DatabaseLink Data; + public ItemRotation Rotation; } -[Union(0, typeof(CompoundCommodity)), - Union(1, typeof(EquippableItem)), - Union(2, typeof(ConsumableItem))] public abstract class CraftedItemInstance : ItemInstance { - [Key(2)] public float Quality; - - //[Key(3)] public List Ingredients = new List(); - - //[Key(4)] public Guid Blueprint; - - //[Key(3)] public string Name; - - //[Key(4)] public Guid SourceEntity; + public float Quality; } -[MessagePackObject] public class CompoundCommodity : CraftedItemInstance { } -[MessagePackObject] public class SimpleCommodity : ItemInstance { - [Key(2)] public int Quantity; + public int Quantity; } -[MessagePackObject] public class EquippableItem : CraftedItemInstance { - [Key(7)] public float Durability; - [Key(8)] public bool OverrideShutdown; + public float Durability; + public bool OverrideShutdown; } -[MessagePackObject] public class ConsumableItem : CraftedItemInstance { -} \ No newline at end of file +} diff --git a/Assets/Scripts/ServerShared/Ship.cs b/Assets/Scripts/ServerShared/Ship.cs index e8acb925a..fa13dfcb3 100644 --- a/Assets/Scripts/ServerShared/Ship.cs +++ b/Assets/Scripts/ServerShared/Ship.cs @@ -7,21 +7,13 @@ using System.Collections; using System.Collections.Generic; using System.Linq; using System.Reflection; -using MessagePack; using UniRx; using Unity.Mathematics; using static Unity.Mathematics.math; using quaternion = Unity.Mathematics.quaternion; -[MessagePackObject] public class Ship : Entity { - - // [Key("bindings")] public Dictionary Bindings = new Dictionary(); - //[IgnoreMember] public int HullHardpointCount; - - // [IgnoreMember] public Dictionary Contacts = new Dictionary(); - // [IgnoreMember] public Targetable Target; public Entity HomeEntity; public float2 MovementDirection; public bool IsPlayerShip; diff --git a/Assets/Scripts/ServerShared/ZoneData.cs b/Assets/Scripts/ServerShared/ZoneData.cs index 5163c9225..ad0a737c7 100644 --- a/Assets/Scripts/ServerShared/ZoneData.cs +++ b/Assets/Scripts/ServerShared/ZoneData.cs @@ -5,7 +5,6 @@ using System; using System.Collections; using System.Collections.Generic; -using MessagePack; using UniRx; using Unity.Mathematics; using static Unity.Mathematics.math; @@ -22,140 +21,96 @@ public class ZonePack public double Time; } -[MessagePackObject, - Union(0, typeof(PlanetData)), - Union(1, typeof(AsteroidBeltData)), - Union(2, typeof(GasGiantData)), - Union(3, typeof(SunData))] public abstract class BodyData : DatabaseEntry, INamedEntry { - [Key(1)] public string Name = ""; - [Key(2)] public Guid Orbit; - [Key(3)] public float Mass = 0; - [Key(4)] public Dictionary Resources = new Dictionary(); - [Key(5)] public float BodyRadiusMultiplier = 1; - [Key(6)] public float GravityRadiusMultiplier = 1; - [Key(7)] public float GravityDepthMultiplier = 1; - [Key(8)] public float GravityDepthExponent = 16; - [IgnoreMember] public string EntryName + public string EntryName { get => Name; set => Name = value; } } -[MessagePackObject] public class PlanetData : BodyData { } -[MessagePackObject] public class AsteroidBeltData : BodyData { - [Key(9)] public Asteroid[] Asteroids; } -[MessagePackObject] public class GasGiantData : BodyData { - [Key(9)] public float FirstOffsetDomainRotationSpeed = 1; - [Key(10)] public float FirstOffsetRotationSpeed = 1; - [Key(11)] public float SecondOffsetDomainRotationSpeed = 1; - [Key(12)] public float SecondOffsetRotationSpeed = 1; - [Key(13)] public float AlbedoRotationSpeed = 1; - [Key(14)] public float WaveRadiusMultiplier = 1; - [Key(15)] public float WaveDepthMultiplier = 1; - [Key(16)] public float WaveDepthExponent = 8; - [Key(17)] public float WaveSpeedMultiplier = 8; - [Key(18)] public List MaterialOverrides = new List(); - [Key(19)] public float4[] Colors = new float4[0]; } public class SunData : GasGiantData { - [Key(20)] public float3 LightColor = float3.zero; - [Key(21)] public float3 FogTintColor = float3.zero; - [Key(22)] public float LightRadiusMultiplier = 1; } -[MessagePackObject] public class Asteroid { - [Key(0)] public float Distance; - [Key(1)] public float Phase; - [Key(2)] public float Size; - [Key(3)] public float RotationSpeed; } -[MessagePackObject] public class OrbitData : DatabaseEntry { - [Key(1)] public Guid Parent; - [Key(2)] public float Distance; - [Key(3)] public float Phase; - [Key(4)] public float2 FixedPosition = float2.zero; - // [Key(4)] - // public float Period; - public static float2 Evaluate(float phase) { phase *= PI * 2; diff --git a/docs/aetheria-perfect-machine-map.md b/docs/aetheria-perfect-machine-map.md index 912e086df..d522d74b2 100644 --- a/docs/aetheria-perfect-machine-map.md +++ b/docs/aetheria-perfect-machine-map.md @@ -18,8 +18,8 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. ## Current Mechanism - Unity client/runtime lives under `Assets/`. Gameplay still reads the legacy - item/name catalog through `ActionGameManager.LegacyCatalog`, which is now the - only runtime entrypoint that calls `LegacyCatalogBoundary.GetCatalog`. + item/name catalog through a private `ActionGameManager` boot helper, which is + now the only runtime entrypoint that calls `LegacyCatalogBoundary.GetCatalog`. `ActionGameManager` no longer owns a global legacy cache. Local run saves, loadouts, player settings files, zone files, and generated keyboard layout caches no longer write bespoke durable files. The legacy `PlayerSettings` @@ -37,8 +37,9 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. `PlayerSettings.msgpack`, `.loadout`, `.zone`, and `GameData/KeyboardLayouts/*.msgpack` authority paths are disabled or deleted. The old `SavedGame`/`SavedZone` DTOs and `Galaxy` save-loader constructor are - deleted. The dead `SavedStory` JSON DTO is deleted. `ZonePack` and - `EntityPack` remain as runtime construction/loadout snapshots, but no longer + deleted. The dead `SavedStory` JSON DTO is deleted. `ZonePack`, body/orbit + zone runtime data, item-instance runtime data, `Ship`, and `EntitySettings` + remain as runtime construction/loadout/session projections, but no longer declare themselves as MessagePack persistence documents. - `Aetheria.State` now expands `AetheriaPlayerSettings` beyond an active-run pointer into the typed Verse replacement for `PlayerSettings.msgpack`: player @@ -60,12 +61,12 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. `EntityPack` serialization. Unity has not wired its save/loadout UI to this document yet, so the old in-memory `EntityPack` path is still a runtime construction helper, not durable authority. -- `ActionGameManager.LegacyCatalog` is the Unity runtime's single public legacy - catalog access point. It delegates to `LegacyCatalogBoundary`, which opens - `LegacyCatalogCache` as the only concrete pull-only catalog cache. Runtime - consumers receive `ILegacyCatalogReader`, so old MessagePack backing stores - may hydrate in-memory domain objects for the current Unity runtime, but this - path cannot push or delete legacy files. The legacy backing-store +- The private `ActionGameManager` catalog boot helper delegates to + `LegacyCatalogBoundary`, which opens `LegacyCatalogCache` as the only + concrete pull-only catalog cache. Runtime consumers receive + `ILegacyCatalogReader`, so old MessagePack backing stores may hydrate + in-memory domain objects for the current Unity runtime, but this path cannot + push or delete legacy files. The legacy backing-store write/realtime APIs and public cache mutation methods have been deleted; only backing-store pull hydration can populate it. The backing-store serializer methods are also deleted, so the legacy cache implementation exposes @@ -155,9 +156,11 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. Sprite, and Texture2D are deleted. Keyboard layout DTOs are plain runtime parse/display models, not MessagePack save shapes. `PlayerSettings` is a plain session-local runtime object until typed Verse settings are imported - into Unity. The global scene-load MessagePack resolver hook is deleted. The - slime compute settings path no longer serializes its local parameter struct - for change detection. + into Unity. `ZoneData` body/orbit DTOs, `ItemInstance` DTOs, + `EntitySettings`, and `Ship` are also plain runtime/session projections now, + not MessagePack persistence shapes. The global scene-load MessagePack + resolver hook is deleted. The slime compute settings path no longer + serializes its local parameter struct for change detection. - The dead story compiled-JSON cache sketch and its SHA helper are deleted; story compilation currently reads Ink source directly until a typed Verse story/cache document exists.