From 1c592b10e93e3135ba709f39db2c8d770d60a58d Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 13 Jun 2026 08:18:30 +0100 Subject: [PATCH] Demote runtime snapshots from MessagePack save shapes --- .voidbot/state/aetheria.cc | Bin 15745 -> 15959 bytes Aetheria.State/README.md | 6 +- .../Scripts/ServerShared/EntitySerializer.cs | 52 ++++++++---------- Assets/Scripts/ServerShared/ZoneData.cs | 32 ----------- docs/aetheria-perfect-machine-map.md | 6 +- 5 files changed, 29 insertions(+), 67 deletions(-) diff --git a/.voidbot/state/aetheria.cc b/.voidbot/state/aetheria.cc index 9adf3911564f3895f5c697b0790106662d421053..01a7091de39a8b7a31a2dd974253eb095b2e6e11 100644 GIT binary patch delta 1257 zcmZWp-)kL36ehW$woph5{ekHZPeCo1o824J+$2?@#UG&3rfu*g(8}DMb9YB)XSOr5 zX*Usq^ra7dsLqQZ=!22G_+SW#6a*>w?wdsM&3~Z(LC@^o+%yK3Wp~b;@0{!rV-~aCq$8Xmob_;@Hhs)}LHO zm!T01OsSm65v*c`&9t+dw#;*8s-0W!Q^Zv_Sn@eA#bH@1Y<>(LOarCwwdv*H8d}TJ zW~*f@2wW#+j>_5S$3!xb|2-m)?qRoKDHBBiZo{JK3CHA%!F`nt=1eG{M+yS|L{Wc` zXpYdsgq0Q{MTLerp;at3(+g9l;~*x zCIMQiv-9sYrYew_vV?dLw$y3Nb-meD1^S8CI_pEN2OGdTAthuLC!)maJ<97bi=>*V zAT_MW>|4Z;IbfyBv(@PUCk=>FDe-AXxH7Ku}a`(TJi5 z2~sF7t7wZQLEaDZLJI0A(D>~--gkR#md*lMsgxZ0bo3T#2|`_=Qt-#8PJ9sWZ#vP6 zTt`~NJ>fD4)cH^k8+3%bB@(+r8)w_37+WDMe{Av;Sm+x>(0$;gVLeG!4yGGY-~RRW z|5_JzuI!l#`Yac+BC~?jDkZ9PqCT2@d3^VXAN*jjzjM*E6KDNDZ@}rfq4y8uoZ8L# z30DLUM!AK3`|b9pljCC}7rc&P#QN{z$8R^7vnD-gJ19z0HvyUsYlm|d?{(~NMrZEa zzOMKAkvV4snVBpQ1peO~*CLV+v?8Ya9R?h2n0+Z$gXGOn`Ka^Gcypu7beA_AOYQf5 zwe#fs)&O~GctdRE&4d>;vp$;c9^Os!f3_wDch3B5edlaU|Nc@FUGUFZr@d|+@((bZpt68?)7fi_3zVs-|jb!>>Vne?j0Ptysx`*oNSAQD%bfsinS8l%FRRXTxlwfT#1^6EUG4EZrumJ=70q)Qmw z1iXz2G_;E00vUtNJnFxUZ|#=e1QCjO^~X9{0W!{WM#)0PS4)MZS3phBWY(N45*-4g zoDQh8UW{d;kOt}$pfi*`6yOX-cqhsEQe9_Al14kFG^9zw0vbTjPFfKY1WFpKU0?-Q zH4@vVrECG}&T^_R9@=$&zP?C-1;(GJ1khS7_?1j)$&xe-Tm5s2xonb8fX5P}Odz5r z1_^{J6$vUM@x}cWj-|~ZSLCMpGRl#{P&r!;&|;*TU|QHFbCj3Fs}QouyHKoN(=8`7 z89uZl4DtsO8qjfqW)W~(*p|OAy02RRsVvkZ!HNc|!2}xHj4ORe6)1T&ZbyQvrhP1* zcGj`Be@qfMYgmkO5pP=<%Sb0o3$l&;cZTc@lWwgWL+CWtBZ4+*!&s65`$+{ZCdsU+ zfl{AkHp}=jsFGHJP1x^SHnOp1BP%JH^h*A+Lh}+Ir$C^uTQ3gDLE7UMA9=+1k z=zTfxZFtYhy4%*R+xNHsHGZOcZQxx^mN&&^*&qGRib_Vwz!lkOc}f1`_|6@JiJEuR z5nMf z|Gu*`{_F7W{IAc=%w&K4?&QaQV0JPKsNs$NMzy^b%(H%1ANB)t6KPiO@zkfyYmw=N Ezkb<_XaE2J diff --git a/Aetheria.State/README.md b/Aetheria.State/README.md index eff5e630f..459352741 100644 --- a/Aetheria.State/README.md +++ b/Aetheria.State/README.md @@ -26,9 +26,9 @@ state spine is being rebuilt. The old `SavedGame`/`SavedZone` DTOs and `Galaxy` loader constructor have also been deleted; the new document family is live Verse run/zone state, not a bespoke save-file format. -The dead `SavedStory` JSON DTO is gone. `ZonePack` remains an in-memory zone -construction snapshot for Unity runtime code, but no longer carries MessagePack -persistence attributes. +The dead `SavedStory` JSON DTO is gone. `ZonePack` and `EntityPack` remain +in-memory construction/loadout snapshots for Unity runtime code, but no longer +carry MessagePack persistence attributes. Keyboard layout rendering now reads the checked-in Unity text asset directly. The old generated `GameData/KeyboardLayouts/*.msgpack` cache was deleted; layout diff --git a/Assets/Scripts/ServerShared/EntitySerializer.cs b/Assets/Scripts/ServerShared/EntitySerializer.cs index 99ab1bf8c..bf3db2a7f 100644 --- a/Assets/Scripts/ServerShared/EntitySerializer.cs +++ b/Assets/Scripts/ServerShared/EntitySerializer.cs @@ -2,7 +2,6 @@ using System; using System.Collections; using System.Collections.Generic; using System.Linq; -using MessagePack; using Unity.Mathematics; public static class EntitySerializer @@ -147,44 +146,39 @@ public static class EntitySerializer } } -[MessagePackObject] public class ShipPack : EntityPack { - [Key(17)] public float3 Position; - [Key(18)] public float2 Direction; - [Key(19)] public bool IsPlayerShip; + public float3 Position; + public float2 Direction; + public bool IsPlayerShip; } -[MessagePackObject] public class OrbitalEntityPack : EntityPack { - [Key(17)] public Guid Orbit; - [Key(18)] public int Story = -1; - [Key(19)] public SecurityLevel SecurityLevel; - [Key(20)] public float SecurityRadius; + public Guid Orbit; + public int Story = -1; + public SecurityLevel SecurityLevel; + public float SecurityRadius; } -[MessagePackObject, - Union(0, typeof(OrbitalEntityPack)), - Union(1, typeof(ShipPack))] public abstract class EntityPack { - [Key(0)] public string Name; - [Key(1)] public EquippableItem Hull; - [Key(2)] public (int2 position, EquippableItem item)[] Equipment; - [Key(3)] public (int2 position, EquippableItem item)[] CargoBays; - [Key(4)] public (int2 position, EquippableItem item)[] DockingBays; - [Key(5)] public Dictionary PersistedBehaviors; - [Key(6)] public float[,] Temperature; - [Key(7)] public float[,] Armor; - [Key(8)] public bool2[,] Conductivity; - [Key(10)] public int[] DockingBayAssignments; - [Key(11)] public (int2 position, ItemInstance item)[][] CargoContents; - [Key(12)] public (int2 position, ItemInstance item)[][] DockingBayContents; - [Key(13)] public EntityPack[] Children; - [Key(14)] public EntitySettings Settings; - [Key(15)] public Guid Faction; - [Key(16)] public int[][] WeaponGroups; + public string Name; + public EquippableItem Hull; + public (int2 position, EquippableItem item)[] Equipment; + public (int2 position, EquippableItem item)[] CargoBays; + public (int2 position, EquippableItem item)[] DockingBays; + public Dictionary PersistedBehaviors; + public float[,] Temperature; + public float[,] Armor; + public bool2[,] Conductivity; + public int[] DockingBayAssignments; + public (int2 position, ItemInstance item)[][] CargoContents; + public (int2 position, ItemInstance item)[][] DockingBayContents; + public EntityPack[] Children; + public EntitySettings Settings; + public Guid Faction; + public int[][] WeaponGroups; private int _price; diff --git a/Assets/Scripts/ServerShared/ZoneData.cs b/Assets/Scripts/ServerShared/ZoneData.cs index 6d7190c84..5163c9225 100644 --- a/Assets/Scripts/ServerShared/ZoneData.cs +++ b/Assets/Scripts/ServerShared/ZoneData.cs @@ -22,38 +22,6 @@ public class ZonePack public double Time; } -// [LegacyCatalogGroup("Galaxy"), MessagePackObject] -// public class StationData : DatabaseEntry, INamedEntry -// { -// [Key(1)] -// public string Name; -// -// // Can be Planet or Orbit -// [Key(2)] -// public Guid Parent; -// -// [Key(3)] -// public Guid Owner; -// -// [Key(4)] -// public List Inventory = new List(); -// -// [Key(5)] -// public Dictionary BuyPrices = new Dictionary(); -// -// [Key(6)] -// public Dictionary SellPrices = new Dictionary(); -// -// [Key(7)] -// public Guid Zone; -// -// [IgnoreMember] public string EntryName -// { -// get => Name; -// set => Name = value; -// } -// } - [MessagePackObject, Union(0, typeof(PlanetData)), Union(1, typeof(AsteroidBeltData)), diff --git a/docs/aetheria-perfect-machine-map.md b/docs/aetheria-perfect-machine-map.md index 61307969f..4e6785c9e 100644 --- a/docs/aetheria-perfect-machine-map.md +++ b/docs/aetheria-perfect-machine-map.md @@ -31,9 +31,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` remains as a - runtime zone construction snapshot, but no longer declares itself as a - MessagePack persistence document. + deleted. The dead `SavedStory` JSON DTO is deleted. `ZonePack` and + `EntityPack` remain as runtime construction/loadout snapshots, but no longer + declare themselves as MessagePack persistence documents. - `LegacyCatalogBoundary` 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