From bb38af3f6a3811812f7817bed92bf27fa68f9840 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sun, 14 Jun 2026 19:37:24 +0100 Subject: [PATCH] Demote zone construction blueprint state --- .voidbot/state/aetheria.cc | Bin 85711 -> 86298 bytes Aetheria.State/README.md | 6 +-- Assets/Scripts/Gameplay/ActionGameManager.cs | 4 +- Assets/Scripts/ServerShared/Zone.cs | 48 +++---------------- Assets/Scripts/ServerShared/ZoneData.cs | 2 +- Assets/Scripts/ServerShared/ZoneGenerator.cs | 4 +- Assets/Scripts/Zone Display/ZoneRenderer.cs | 8 ++-- docs/aetheria-perfect-machine-map.md | 39 ++++++++++----- 8 files changed, 44 insertions(+), 67 deletions(-) diff --git a/.voidbot/state/aetheria.cc b/.voidbot/state/aetheria.cc index 157ea75576a35abc4a1cc88f84396dbe9a3f1c93..0e364245b49442b2f2ff9f983148147591e2e669 100644 GIT binary patch delta 1865 zcma)7ONbmr7^ZhO@c~gUQACj+_O!CoYohyz@v%EQZa@gpb@Z?Y2sM=@6ef>%Wk@#595dU|GOa0G8n)nEVPd;I;=hbKPx zBopcF;PUS9*e9=#DpQwPJX9>j zJEzHC_O~aR97isfcPK+XLOMFYJgpw`6R1(dV}X{2{0uv% zEo=KcZOLA3`;~;5jAHFT1+{V^V-mJh8lyudMNH@hjl0}=YB51ca%VUyDphcygElBq z5fIg7NGVLpSaiTZIg%QlF(4O*UxSk3@SFSlKQ?qFY5;F^oa6OO0Rz&p@TYMF`l!*9 znxWIu3bd1#T8rQrf`4+1gwm2B`55LB)YmJIR;W@}xTMm<5$FUeQJ!*0!fQwyFErms zC9D=GJ0=JGhF>xjCED!rwtc?{e_kwpdy#gYn>o-7N6s{4c;!<7i&S@BdvqR?7ay-a zyuV*TP)dJF9z!3j3_Sod{M*P=;oe{)YgR@p{`~!+;(=e!G@HK2E>|&F_2^GJp{!qd z4ytpwB;Cf67?U(rX1v#mTX&r)K6>WV{>3I1ManWfh_r#n{Nk8=bG$ZT`r+Cv4ReSs z+ZJd@id2AZ&~L-*{7}SRdLH>=aAPw#AG8O5YzFnk|B-j_##ZoEarOC=!D8{)-w&Re zGQ;4ltzdDdsGJSC4~;hx{m?LNCM2Yx06;3>XVoF2wW~>f$R%CC+TG5j3yU{jKK*QD z{aegEa!ZT1HC7t{juQW}gK&t|ODoO%f+|;&4X&o$3SWP zLSZ~#E)yz`e$xKKaA!}4XC4;EX1gaqZ4W#dC?l4d;^^_&F z%D*ve%AI{ut{R#PcbYov26gEQli-RqP+CZ)K>Z1UlND4`f^)TGbNUy)(29!nIqlEF^y526tD0x+Wla!~nRfG)3+- zA~_a+y5%#U&HWSoif|mR!4QZj5rN}lBsGt=BBh`~ja8hg1<+WVqS+QDCczztnFz;V zaR!=P@dmfKZsp%;<|^c{_ci#ib9x;G;NXGY5l+3S7MAry#k7Z8aWj8iOa%1NWvi+4dJ^cmEo(CWH7(C zSr=%p#$QnaDNNsBkUChieTEL8W6?U1@nQ8cIn$#oEUuzeBhw9Lar7pMRF=C#Xw}&n z1xOA3M$urI8c38gmEWYUVF@|MmQ@h^EMDW*-?>XOcO+4Xx>5MsMqvqQv~$!rU>;|Q zYDl+^kb`fPdbN5agIT;xDLfO;N^BkGH9Ifaa_#dH{OBzPFE1YNEG}5V?EGMOuT1)a z+|&M`I6Oo)!jT%O5FOsFky_Ca%_zo)&Q5$FWn?j6^b!Tz!^6)tvb9ki2yfTPV%S?D z!^gIg (float) _time; } - public RuntimeZoneBlueprint Blueprint { get; } + public float Radius { get; } + public float Mass { get; } public GalaxyZone GalaxyZone { get; } public Galaxy Galaxy { get; } - public Zone(ItemManager itemManager, PlanetSettings settings, RuntimeZoneBlueprint blueprint, GalaxyZone galaxyZone, Galaxy galaxy) + public Zone(ItemManager itemManager, PlanetSettings settings, ZoneConstructionBlueprint blueprint, GalaxyZone galaxyZone, Galaxy galaxy) { _time = blueprint.Time; GalaxyZone = galaxyZone; Galaxy = galaxy; - Blueprint = blueprint; + Radius = blueprint.Radius; + Mass = blueprint.Mass; _itemManager = itemManager; Settings = settings; _random = new Random(Convert.ToUInt32(abs(galaxyZone?.Name.GetHashCode() ?? 1337))); @@ -100,35 +102,6 @@ public class Zone return agent; } - public RuntimeZoneBlueprint CaptureBlueprint() - { - return new RuntimeZoneBlueprint - { - Radius = Blueprint.Radius, - Mass = Blueprint.Mass, - Entities = Entities.Select(RuntimeEntityBlueprintProjector.CaptureBlueprint).ToList(), - Orbits = Orbits.Values.Select(o=>o.ToData()).ToList(), - Planets = CaptureBodyData().ToList(), - Time = _time - }; - } - - public IEnumerable CaptureBodyData() - { - foreach (var orbit in Orbits.Values) - { - var planet = PlanetInstances.Values.FirstOrDefault(body => body.OrbitId == orbit.ID); - if (planet != null) - { - yield return planet.ToData(); - continue; - } - - var belt = AsteroidBelts.Values.FirstOrDefault(body => body.Orbit == orbit.ID); - if (belt != null) yield return belt.ToData(); - } - } - public void AddOrbit(OrbitData orbit) { Orbits.Add(orbit.ID, new Orbit(Settings, orbit)); @@ -334,7 +307,7 @@ public class Zone public float GetHeight(float2 position) { - var result = -PowerPulse(length(position)/(Blueprint.Radius*2), Settings.ZoneDepthExponent) * Settings.ZoneDepth; + var result = -PowerPulse(length(position)/(Radius*2), Settings.ZoneDepthExponent) * Settings.ZoneDepth; foreach (var body in PlanetInstances.Values) { var p = position - body.Orbit.Position; @@ -419,7 +392,6 @@ public class Planet { public Orbit Orbit; protected readonly PlanetSettings Settings; - private readonly BodyData _data; public Guid ID { get; } public string Name { get; } public Guid OrbitId { get; } @@ -437,7 +409,6 @@ public class Planet { Settings = settings; Orbit = orbit; - _data = data; ID = data.ID; Name = data.Name ?? ""; OrbitId = data.Orbit; @@ -457,7 +428,6 @@ public class Planet GravityWellDepth = Settings.GravityDepth.Evaluate(Mass) * GravityDepthMultiplier; } - public BodyData ToData() => _data; } public class GasGiant : Planet @@ -526,7 +496,6 @@ public class Sun : GasGiant public class AsteroidBelt { - private readonly AsteroidBeltData _data; private readonly Asteroid[] _asteroids; public Guid ID { get; } public string Name { get; } @@ -548,7 +517,6 @@ public class AsteroidBelt public AsteroidBelt(AsteroidBeltData data) { - _data = data; _asteroids = data.Asteroids; ID = data.ID; Name = data.Name ?? ""; @@ -570,12 +538,10 @@ public class AsteroidBelt public Asteroid GetAsteroid(int asteroid) => _asteroids[asteroid]; - public AsteroidBeltData ToData() => _data; } public class Orbit { - private readonly OrbitData _data; public Guid ID { get; } public Guid Parent { get; } public float Distance { get; } @@ -588,7 +554,6 @@ public class Orbit public Orbit(PlanetSettings settings, OrbitData data) { - _data = data; ID = data.ID; Parent = data.Parent; Distance = data.Distance; @@ -597,5 +562,4 @@ public class Orbit Period = settings.OrbitPeriod.Evaluate(data.Distance); } - public OrbitData ToData() => _data; } diff --git a/Assets/Scripts/ServerShared/ZoneData.cs b/Assets/Scripts/ServerShared/ZoneData.cs index 92d2c17f3..697b7f3ce 100644 --- a/Assets/Scripts/ServerShared/ZoneData.cs +++ b/Assets/Scripts/ServerShared/ZoneData.cs @@ -11,7 +11,7 @@ using static Unity.Mathematics.math; using float2 = Unity.Mathematics.float2; using float3 = Unity.Mathematics.float3; -public class RuntimeZoneBlueprint +public class ZoneConstructionBlueprint { public List Planets = new List(); public List Orbits = new List(); diff --git a/Assets/Scripts/ServerShared/ZoneGenerator.cs b/Assets/Scripts/ServerShared/ZoneGenerator.cs index dbca05fad..85ae1bc8a 100644 --- a/Assets/Scripts/ServerShared/ZoneGenerator.cs +++ b/Assets/Scripts/ServerShared/ZoneGenerator.cs @@ -35,7 +35,7 @@ public static class ZoneGenerator private const int MaximumPlacementSamples = 32; - public static RuntimeZoneBlueprint GenerateZone( + public static ZoneConstructionBlueprint GenerateZone( ItemManager itemManager, AetheriaRuntimeCatalogSnapshot runtimeCatalog, ZoneGenerationSettings zoneSettings, @@ -43,7 +43,7 @@ public static class ZoneGenerator GalaxyZone galaxyZone, bool isTutorial = false) { - var blueprint = new RuntimeZoneBlueprint(); + var blueprint = new ZoneConstructionBlueprint(); var random = new Random(unchecked((uint) galaxyZone.Name.GetHashCode()) ^ hash(galaxyZone.Position)); diff --git a/Assets/Scripts/Zone Display/ZoneRenderer.cs b/Assets/Scripts/Zone Display/ZoneRenderer.cs index 367538b3a..33f81f562 100644 --- a/Assets/Scripts/Zone Display/ZoneRenderer.cs +++ b/Assets/Scripts/Zone Display/ZoneRenderer.cs @@ -185,9 +185,9 @@ public class ZoneRenderer : MonoBehaviour { ClearZone(); Zone = zone; - SectorBrushes.localScale = zone.Blueprint.Radius * 2 * Vector3.one; - SlimeGravityCamera.orthographicSize = zone.Blueprint.Radius; - SlimeRenderer.ZoneRadius = zone.Blueprint.Radius; + SectorBrushes.localScale = zone.Radius * 2 * Vector3.one; + SlimeGravityCamera.orthographicSize = zone.Radius; + SlimeRenderer.ZoneRadius = zone.Radius; foreach (var orbit in zone.Orbits.Values) { var planet = zone.PlanetInstances.Values.FirstOrDefault(body => body.OrbitId == orbit.ID); @@ -228,7 +228,7 @@ public class ZoneRenderer : MonoBehaviour AddWormhole(new Wormhole { Target = adjacentZone, - Position = dir * zone.Blueprint.Radius * Settings.WormholeDistanceRatio + Position = dir * zone.Radius * Settings.WormholeDistanceRatio }); } } diff --git a/docs/aetheria-perfect-machine-map.md b/docs/aetheria-perfect-machine-map.md index bd0ddd1ca..85d80b669 100644 --- a/docs/aetheria-perfect-machine-map.md +++ b/docs/aetheria-perfect-machine-map.md @@ -69,7 +69,7 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. `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. - `RuntimeZoneBlueprint`, body/orbit zone runtime data, item-instance runtime + `ZoneConstructionBlueprint`, 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 or serializer vocabulary or declare themselves as MessagePack persistence @@ -126,7 +126,7 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. groups, and a stat grid. This proves the `.zone` replacement graph is durable typed state. Unity now queues current-zone/current-entity-collection snapshots, current action-bar bindings, and current faction relationship rows through the - runtime commit log during run checkpoints; `RuntimeZoneBlueprint` and + runtime commit log during run checkpoints; `ZoneConstructionBlueprint` and `RuntimeEntityBlueprint` remain runtime construction/loadout projections rather than durable file formats. Runtime blueprints no longer capture or restore live temperature, armor, max-armor, or hull-conductivity grids; those @@ -147,9 +147,10 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. resources, gravity/body multipliers, asteroid belt entries, and gas/sun visual parameters now survive through the typed pending commit lane into `AetheriaZoneState`. Asteroid belt runtime damage, respawn timers, and - miner accumulators also persist on typed asteroid rows. `RuntimeZoneBlueprint` - feeds static generated geometry, but it is no longer the only place generated - celestial graph facts can live. + miner accumulators also persist on typed asteroid rows. `ZoneConstructionBlueprint` + feeds one-shot generated geometry into `Zone`; live zone radius/mass/orbit/body + reads come from runtime wrappers and typed checkpoint projection rather than + a retained construction payload. - Run checkpoint entity snapshots include typed simulation stat grids for temperature, thermal mass, armor, max armor, and hull-conductivity axes. They also carry public runtime session state: velocity, target entity @@ -799,7 +800,7 @@ First Aetheria surfaces to publish: incidental drain status. - Done: extend run checkpoint commits and smoke coverage to carry typed zone orbit/body rows into `AetheriaZoneState`, so generated celestial - graph facts no longer live only inside `RuntimeZoneBlueprint`. + graph facts no longer live only inside construction blueprints. - Done: extend run checkpoint commits and smoke coverage to carry typed entity simulation stat grids into `AetheriaEntitySnapshot`, so temperature/armor/conductivity no longer live only in runtime blueprints. @@ -1025,23 +1026,23 @@ First Aetheria surfaces to publish: therefore earned deletion rather than a new runtime metadata owner. - Done: move runtime orbit parent/phase/distance/fixed-position reads off `OrbitData`; `Zone`, `ActionGameManager`, and `ZoneRenderer` consume - `Orbit` runtime properties, with `Orbit.ToData()` retained only for - blueprint capture. + `Orbit` runtime properties, and the old `Orbit.ToData()` construction + capture bridge is deleted. - Done: move live asteroid-belt simulation, scanning, and mesh setup reads off `AsteroidBeltData`; `Zone`, `ResourceScanner`, and `AsteroidBeltUI` - consume `AsteroidBelt` runtime asteroid/resource/orbit properties, with - `AsteroidBelt.ToData()` retained for future capture/migration cuts. + consume `AsteroidBelt` runtime asteroid/resource/orbit properties, and + the old `AsteroidBelt.ToData()` construction capture bridge is deleted. - Done: move live planet mass/orbit/gravity reads off `BodyData`; `Zone` gravity evaluation and `ZoneRenderer` consume `Planet` runtime properties, - with `Planet.ToData()` retained as the temporary capture/config bridge. + and the old `Planet.ToData()` construction capture bridge is deleted. - Done: move typed zone orbit snapshot projection off - `RuntimeZoneBlueprint.Orbits`; run checkpoint commits now project current + construction-blueprint orbit rows; run checkpoint commits now project current `Zone.Orbits` runtime wrappers into typed orbit snapshot rows. - Done: move typed zone body snapshot projection off `BodyData` and `AsteroidBeltData`; run checkpoint commits now project `Planet` and `AsteroidBelt` runtime wrappers, including body resources, asteroid runtime damage/respawn/miner accumulators, and gas/sun visual fields. - - Done: move visited-sector summary counts off `RuntimeZoneBlueprint` + - Done: move visited-sector summary counts off construction-blueprint body/entity DTOs; `SectorRenderer` now counts planets, belts, gas giants, stars, stations, turrets, and ships from `GalaxyZone.Contents` runtime wrappers and live entities. @@ -1062,6 +1063,10 @@ First Aetheria surfaces to publish: `ActionGameManager` keeps typed `AetheriaRuntimeLoadoutTemplateSnapshot` documents and projects blueprints only for pricing, instantiation, and commit boundaries. + - Done: rename `RuntimeZoneBlueprint` to `ZoneConstructionBlueprint`, delete + retained construction-payload state from `Zone`, and delete the unused + construction-capture bridge; `Zone` now keeps radius/mass as copied runtime + facts after construction. - Done: delete the legacy `Behaviors` lists from `ConsumableItemData` and `EquippableItemData`; item DTOs can no longer carry behavior config state. - Done: move runtime blueprint price aggregation and conductivity restore @@ -1306,6 +1311,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: continue the zone demotion by renaming `RuntimeZoneBlueprint` to + `ZoneConstructionBlueprint`; the old intermediate name no longer appears + in live Unity source. - Done: rename the old `EntitySerializer` runtime helper to `RuntimeEntityBlueprintProjector`; it captures/instantiates runtime blueprint projections and no longer presents itself as a serializer. @@ -1360,6 +1368,11 @@ First Aetheria surfaces to publish: - Current Unity batchmode compile probes are blocked while another Unity editor instance has `E:/Projects/Aetheria` open; typed state builds and smokes remain the available verification until the editor lock is released. +- Direct `dotnet build .\Assembly-CSharp.csproj --no-restore` is not currently + a valid gameplay compile substitute: the generated Unity project references a + missing root-level `GameCult.Aetheria.State.Unity.csproj` instead of the live + package/state project path, so it fails before reaching the gameplay rename + checks. - Unity batchmode compile with Editor `6000.4.2f1` returned cleanly after the runtime catalog resolver cut; `Logs/codex-unity-compile.log` has no compiler error hits.