From a9abfe0c68c041a02798956410e84df3a08bb0bf Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 13 Jun 2026 19:12:56 +0100 Subject: [PATCH] Rename runtime entity blueprint projector --- .voidbot/state/aetheria.cc | Bin 46286 -> 46595 bytes Aetheria.State/README.md | 5 +++-- Assets/Scripts/Gameplay/ActionGameManager.cs | 10 +++++----- .../Scripts/ServerShared/LoadoutGenerator.cs | 6 +++--- ....cs => RuntimeEntityBlueprintProjector.cs} | 2 +- ...> RuntimeEntityBlueprintProjector.cs.meta} | 0 Assets/Scripts/ServerShared/Zone.cs | 4 ++-- Assets/Scripts/UI/Menu/InventoryPanel.cs | 4 ++-- docs/aetheria-perfect-machine-map.md | 10 ++++++++-- 9 files changed, 24 insertions(+), 17 deletions(-) rename Assets/Scripts/ServerShared/{EntitySerializer.cs => RuntimeEntityBlueprintProjector.cs} (99%) rename Assets/Scripts/ServerShared/{EntitySerializer.cs.meta => RuntimeEntityBlueprintProjector.cs.meta} (100%) diff --git a/.voidbot/state/aetheria.cc b/.voidbot/state/aetheria.cc index aa6d960111bb86c5a63faef099926dd56f80f2c2..731974ad0f7eb0207755264b95c386f5b6a8d8d0 100644 GIT binary patch delta 1291 zcmZXU%TE+R5XQqUi9BNDfC7n{juJJ|9awgQ#3xA9cmN6Lh3KJorgmr8p6N+X&*G9O zF&sUaRu0PJ0EmK#kNpFP2NO@~m9r-kFC2{*YaaVhZZkDC)m6XmtN!{kvG6PL{#Bwa zJ#Zo2uMK4fr=K<*R-Y43s*%BT7~#peYUF$-jI=Z#OKg0poNhj&F5SCh0^!Uc*Bxoe z@)QV*GHVV55k5w2ASN&uUrp+f9DqXvIMfD%NUp}SUBeTC&wwtu&^B~NEqnKQP%-{V zr>^t`c!W9zu^dlQtVtyXEGK1y%|#iDbkDm{5sN$CMPf-}a7=NyBz)E(xv~V}#f?#k zNrVex_=4sbexM~t%MJ6CxK49EqoPcx;664~oiI1gd~k*3 zNRQaGh)2s9N)9}i7aI?;xd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Tvv^+>qmRC2vST7 y_H*Z%EVGo*Vu3RIrJdK}P%E#8Z10wAXSQUQwpQ9DrIIUY3~ulCw4VmAPyGfj6@Os> 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