Demote runtime snapshots from MessagePack save shapes
This commit is contained in:
parent
fc6eca6a93
commit
1c592b10e9
5 changed files with 29 additions and 67 deletions
Binary file not shown.
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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<int2, PersistentBehaviorData[]> 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<int2, PersistentBehaviorData[]> 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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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<ItemInstance> Inventory = new List<ItemInstance>();
|
||||
//
|
||||
// [Key(5)]
|
||||
// public Dictionary<Guid, float> BuyPrices = new Dictionary<Guid, float>();
|
||||
//
|
||||
// [Key(6)]
|
||||
// public Dictionary<Guid, float> SellPrices = new Dictionary<Guid, float>();
|
||||
//
|
||||
// [Key(7)]
|
||||
// public Guid Zone;
|
||||
//
|
||||
// [IgnoreMember] public string EntryName
|
||||
// {
|
||||
// get => Name;
|
||||
// set => Name = value;
|
||||
// }
|
||||
// }
|
||||
|
||||
[MessagePackObject,
|
||||
Union(0, typeof(PlanetData)),
|
||||
Union(1, typeof(AsteroidBeltData)),
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue