diff --git a/.voidbot/state/aetheria.cc b/.voidbot/state/aetheria.cc index aa6d96011..731974ad0 100644 Binary files a/.voidbot/state/aetheria.cc and b/.voidbot/state/aetheria.cc differ diff --git a/Aetheria.State/README.md b/Aetheria.State/README.md index c8e3c6e22..0822f3104 100644 --- a/Aetheria.State/README.md +++ b/Aetheria.State/README.md @@ -45,8 +45,9 @@ 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. `RuntimeZoneBlueprint` and `RuntimeEntityBlueprint` remain in-memory construction/loadout projections for -Unity runtime code, but no longer carry save-file vocabulary or MessagePack -persistence attributes. +Unity runtime code, with `RuntimeEntityBlueprintProjector` capturing and +instantiating those projections. They no longer carry save-file or serializer +vocabulary, and they do not declare 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/Gameplay/ActionGameManager.cs b/Assets/Scripts/Gameplay/ActionGameManager.cs index 0073cdc8f..4dfd396bf 100644 --- a/Assets/Scripts/Gameplay/ActionGameManager.cs +++ b/Assets/Scripts/Gameplay/ActionGameManager.cs @@ -754,7 +754,7 @@ public class ActionGameManager : MonoBehaviour nearestFaction, .5f); - var turret = EntitySerializer.InstantiateFromBlueprint(ItemManager, Zone, loadoutGenerator.GenerateTurretLoadout(), true); + var turret = RuntimeEntityBlueprintProjector.InstantiateFromBlueprint(ItemManager, Zone, loadoutGenerator.GenerateTurretLoadout(), true); turret.Position.xz = _currentEntity.Position.xz + ItemManager.Random.NextFloat2Direction() * ItemManager.Random.NextFloat(50, 500); turret.Zone = Zone; @@ -786,7 +786,7 @@ public class ActionGameManager : MonoBehaviour // // for (int i = 0; i < 8; i++) // { - // var ship = EntitySerializer.InstantiateFromBlueprint(ItemManager, Zone, loadoutGenerator.GenerateShipLoadout(), true); + // var ship = RuntimeEntityBlueprintProjector.InstantiateFromBlueprint(ItemManager, Zone, loadoutGenerator.GenerateShipLoadout(), true); // ship.Position.xz = _currentEntity.Position.xz + // ItemManager.Random.NextFloat2Direction() * ItemManager.Random.NextFloat(50, 500); // ship.Zone = Zone; @@ -796,7 +796,7 @@ public class ActionGameManager : MonoBehaviour // // for (int i = 0; i < 8; i++) // { - // var turret = EntitySerializer.InstantiateFromBlueprint(ItemManager, Zone, loadoutGenerator.GenerateTurretLoadout(), true); + // var turret = RuntimeEntityBlueprintProjector.InstantiateFromBlueprint(ItemManager, Zone, loadoutGenerator.GenerateTurretLoadout(), true); // turret.Position.xz = _currentEntity.Position.xz + // ItemManager.Random.NextFloat2Direction() * ItemManager.Random.NextFloat(50, 500); // turret.Zone = Zone; @@ -961,12 +961,12 @@ public class ActionGameManager : MonoBehaviour SectorMap.QueueZoneReveal(CurrentGalaxy.Entrance.AdjacentZones.Prepend(CurrentGalaxy.Entrance)); PopulateLevel(CurrentGalaxy.Entrance); var loadoutGenerator = new LoadoutGenerator(ref ItemManager.Random, ItemManager, RuntimeCatalog, CurrentGalaxy, Zone.GalaxyZone, IsTutorial ? CurrentGalaxy.ResolveFaction(Settings.TutorialGenerationSettings.ProtagonistFaction) : null, 2); - var ship = EntitySerializer.InstantiateFromBlueprint( + var ship = RuntimeEntityBlueprintProjector.InstantiateFromBlueprint( ItemManager, Zone, loadoutGenerator.GenerateShipLoadout(data => string.IsNullOrEmpty(Settings.StartingHullName) || data.Name==Settings.StartingHullName ), true); - // EntitySerializer.InstantiateFromBlueprint(ItemManager, Zone, LoadoutBlueprints.First(x => x.Name == StarterShipTemplate), true); + // RuntimeEntityBlueprintProjector.InstantiateFromBlueprint(ItemManager, Zone, LoadoutBlueprints.First(x => x.Name == StarterShipTemplate), true); ((Ship) ship).IsPlayerShip = true; ship.Position = float3.zero; ship.Zone = Zone; diff --git a/Assets/Scripts/ServerShared/LoadoutGenerator.cs b/Assets/Scripts/ServerShared/LoadoutGenerator.cs index c40e2f7c7..dfe48e645 100644 --- a/Assets/Scripts/ServerShared/LoadoutGenerator.cs +++ b/Assets/Scripts/ServerShared/LoadoutGenerator.cs @@ -61,7 +61,7 @@ public class LoadoutGenerator var entity = new Ship(ItemManager, null, hull, ItemManager.GameplaySettings.DefaultEntitySettings); entity.Faction = Faction; OutfitEntity(entity); - return EntitySerializer.CaptureBlueprint(entity); + return RuntimeEntityBlueprintProjector.CaptureBlueprint(entity); } public RuntimeOrbitalEntityBlueprint GenerateTurretLoadout() @@ -76,7 +76,7 @@ public class LoadoutGenerator var entity = new OrbitalEntity(ItemManager, null, hull, Guid.Empty, ItemManager.GameplaySettings.DefaultEntitySettings); entity.Faction = Faction; OutfitEntity(entity); - return EntitySerializer.CaptureBlueprint(entity) as RuntimeOrbitalEntityBlueprint; + return RuntimeEntityBlueprintProjector.CaptureBlueprint(entity) as RuntimeOrbitalEntityBlueprint; } public RuntimeOrbitalEntityBlueprint GenerateStationLoadout() @@ -119,7 +119,7 @@ public class LoadoutGenerator entity.CanTow = hullData.CanTow; - return EntitySerializer.CaptureBlueprint(entity) as RuntimeOrbitalEntityBlueprint; + return RuntimeEntityBlueprintProjector.CaptureBlueprint(entity) as RuntimeOrbitalEntityBlueprint; } public HullData RandomHull(HullType type, Predicate hullFilter = null) diff --git a/Assets/Scripts/ServerShared/EntitySerializer.cs b/Assets/Scripts/ServerShared/RuntimeEntityBlueprintProjector.cs similarity index 99% rename from Assets/Scripts/ServerShared/EntitySerializer.cs rename to Assets/Scripts/ServerShared/RuntimeEntityBlueprintProjector.cs index 3a8395244..7d1ce7015 100644 --- a/Assets/Scripts/ServerShared/EntitySerializer.cs +++ b/Assets/Scripts/ServerShared/RuntimeEntityBlueprintProjector.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; using System.Linq; using Unity.Mathematics; -public static class EntitySerializer +public static class RuntimeEntityBlueprintProjector { public static RuntimeEntityBlueprint CaptureBlueprint(Entity entity) { diff --git a/Assets/Scripts/ServerShared/EntitySerializer.cs.meta b/Assets/Scripts/ServerShared/RuntimeEntityBlueprintProjector.cs.meta similarity index 100% rename from Assets/Scripts/ServerShared/EntitySerializer.cs.meta rename to Assets/Scripts/ServerShared/RuntimeEntityBlueprintProjector.cs.meta diff --git a/Assets/Scripts/ServerShared/Zone.cs b/Assets/Scripts/ServerShared/Zone.cs index e0b49c01f..7d903aa3d 100644 --- a/Assets/Scripts/ServerShared/Zone.cs +++ b/Assets/Scripts/ServerShared/Zone.cs @@ -81,7 +81,7 @@ public class Zone foreach (var entityBlueprint in blueprint.Entities) { - var entity = EntitySerializer.InstantiateFromBlueprint(_itemManager, this, entityBlueprint); + var entity = RuntimeEntityBlueprintProjector.InstantiateFromBlueprint(_itemManager, this, entityBlueprint); Entities.Add(entity); entity.Activate(); if (entity is Ship {IsPlayerShip: false} ship) @@ -110,7 +110,7 @@ public class Zone { Radius = Blueprint.Radius, Mass = Blueprint.Mass, - Entities = Entities.Select(EntitySerializer.CaptureBlueprint).ToList(), + Entities = Entities.Select(RuntimeEntityBlueprintProjector.CaptureBlueprint).ToList(), Orbits = Orbits.Values.Select(o=>o.Data).ToList(), Planets = Planets.Values.ToList(), Time = _time diff --git a/Assets/Scripts/UI/Menu/InventoryPanel.cs b/Assets/Scripts/UI/Menu/InventoryPanel.cs index a974eca10..651953ef7 100644 --- a/Assets/Scripts/UI/Menu/InventoryPanel.cs +++ b/Assets/Scripts/UI/Menu/InventoryPanel.cs @@ -170,7 +170,7 @@ public class InventoryPanel : MonoBehaviour, IPointerClickHandler ContextMenu.AddOption("Save Loadout", () => { - GameManager.QueueRuntimeLoadoutTemplateCommit(EntitySerializer.CaptureBlueprint(_displayedEntity)); + GameManager.QueueRuntimeLoadoutTemplateCommit(RuntimeEntityBlueprintProjector.CaptureBlueprint(_displayedEntity)); }); if (GameManager.LoadoutBlueprints.Any()) @@ -180,7 +180,7 @@ public class InventoryPanel : MonoBehaviour, IPointerClickHandler ( $"{blueprint.Name} - {blueprint.Price(GameManager.ItemManager):n0}", () => { - var entity = EntitySerializer.InstantiateFromBlueprint(GameManager.ItemManager, GameManager.Zone, blueprint, true); + var entity = RuntimeEntityBlueprintProjector.InstantiateFromBlueprint(GameManager.ItemManager, GameManager.Zone, blueprint, true); entity.SetParent(GameManager.DockedEntity); GameManager.Credits -= blueprint.Price(GameManager.ItemManager); GameManager.CurrentEntity = entity; diff --git a/docs/aetheria-perfect-machine-map.md b/docs/aetheria-perfect-machine-map.md index ba56201f6..974b49d96 100644 --- a/docs/aetheria-perfect-machine-map.md +++ b/docs/aetheria-perfect-machine-map.md @@ -62,8 +62,9 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. deleted. The dead `SavedStory` JSON DTO is deleted. `RuntimeZoneBlueprint`, body/orbit zone runtime data, item-instance runtime data, `Ship`, and `EntitySettings` remain as runtime - construction/loadout/session projections, but no longer use save-file - vocabulary or declare themselves as MessagePack persistence documents. + construction/loadout/session projections, but no longer use save-file or + serializer vocabulary or 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 name, tutorial flag, story-file hash cursors, gameplay formatting, graphics @@ -637,6 +638,9 @@ First Aetheria surfaces to publish: `RuntimeZoneBlueprint`/`RuntimeEntityBlueprint`, and rename loadout collections away from save-payload vocabulary. These are now explicitly runtime construction projections, not portable state authority. + - Done: rename the old `EntitySerializer` runtime helper to + `RuntimeEntityBlueprintProjector`; it captures/instantiates runtime + blueprint projections and no longer presents itself as a serializer. - Done: demote Unity's live `PlayerSettings` runtime object to `RuntimePlayerSettings`; `AetheriaPlayerSettings` remains the typed Verse state document owner, while Unity only keeps a session projection and @@ -690,6 +694,8 @@ First Aetheria surfaces to publish: live Unity source has no `EntityPack`, `ShipPack`, `OrbitalEntityPack`, `ZonePack`, `PackedContents`, `PackZone`, `EntitySerializer.Pack`, or `EntitySerializer.Unpack` hits. +- Runtime entity blueprint projection no longer uses the `EntitySerializer` + authority name; live Unity source calls `RuntimeEntityBlueprintProjector`. - Unity runtime settings projection is now `RuntimePlayerSettings`; live Unity source has no standalone `PlayerSettings` class/property/method symbols. - Input binding and action-bar edits now queue the same typed player-settings