Rename runtime entity blueprint projector

This commit is contained in:
Meta Vens 2026-06-13 19:12:56 +01:00
commit a9abfe0c68
9 changed files with 24 additions and 17 deletions

Binary file not shown.

View file

@ -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

View file

@ -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;

View file

@ -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<HullData> hullFilter = null)

View file

@ -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)
{

View file

@ -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

View file

@ -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;

View file

@ -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