Use item keys for body resources

This commit is contained in:
Meta Vens 2026-06-15 03:35:40 +01:00
commit 2d3172887b
7 changed files with 10 additions and 7 deletions

Binary file not shown.

View file

@ -20,7 +20,7 @@ or weapon-group index. They also include current faction relationship rows as
typed corporation references plus relationship tokens and numeric standings.
Zone checkpoints include typed orbit and body rows for generated celestial
state: orbit IDs, parent IDs, distance, phase, fixed positions, body kind,
resources, gravity/body multipliers, asteroid entries, and gas/sun visual
typed resource item keys, gravity/body multipliers, asteroid entries, and gas/sun visual
parameters. Entity checkpoints include typed simulation stat grids for
temperature, thermal mass, armor, max armor, and hull-conductivity axes.
Player settings include player name, tutorial flag,

View file

@ -674,7 +674,7 @@ public class ActionGameManager : MonoBehaviour
.OrderBy(pair => pair.Key)
.Select(pair => new AetheriaRuntimeBodyResourceCommit
{
ItemKey = AetheriaRuntimeItemReference.FromLegacyId(pair.Key),
ItemKey = pair.Key ?? "",
Amount = pair.Value
})
.ToArray() ?? Array.Empty<AetheriaRuntimeBodyResourceCommit>(),
@ -705,7 +705,7 @@ public class ActionGameManager : MonoBehaviour
.OrderBy(pair => pair.Key)
.Select(pair => new AetheriaRuntimeBodyResourceCommit
{
ItemKey = AetheriaRuntimeItemReference.FromLegacyId(pair.Key),
ItemKey = pair.Key ?? "",
Amount = pair.Value
})
.ToArray() ?? Array.Empty<AetheriaRuntimeBodyResourceCommit>(),

View file

@ -370,7 +370,7 @@ public class Planet
public string Name { get; }
public Guid OrbitId { get; }
public float Mass { get; }
public IReadOnlyDictionary<Guid, float> Resources { get; }
public IReadOnlyDictionary<string, float> Resources { get; }
public float BodyRadiusMultiplier { get; }
public float GravityRadiusMultiplier { get; }
public float GravityDepthMultiplier { get; }
@ -475,7 +475,7 @@ public class AsteroidBelt
public string Name { get; }
public Guid Orbit { get; }
public float Mass { get; }
public IReadOnlyDictionary<Guid, float> Resources { get; }
public IReadOnlyDictionary<string, float> Resources { get; }
public float BodyRadiusMultiplier { get; }
public float GravityRadiusMultiplier { get; }
public float GravityDepthMultiplier { get; }

View file

@ -31,7 +31,7 @@ public abstract class BodyConstructionData : INamedEntry
public float Mass = 0;
public Dictionary<Guid, float> Resources = new Dictionary<Guid, float>();
public Dictionary<string, float> Resources = new Dictionary<string, float>();
public float BodyRadiusMultiplier = 1;

View file

@ -124,7 +124,7 @@ public static class ZoneGenerator
blueprint.Bodies = planets.Where(p=>!p.Empty).Select(planet =>
{
// Dictionary<Guid, float> planetResources = new Dictionary<Guid, float>();
// Dictionary<string, float> planetResources = new Dictionary<string, float>();
BodyType bodyType = planet.Belt ? BodyType.Asteroid :
planet.Mass > zoneSettings.SunMass ? BodyType.Sun :
planet.Mass > zoneSettings.GasGiantMass ? BodyType.GasGiant :

View file

@ -1238,6 +1238,9 @@ First Aetheria surfaces to publish:
- Done: move action-bar consumable bindings off `Target.LegacyId` parsing;
they read the typed runtime row `ItemKey` directly for HUD fill/count and
runtime commit projection.
- Done: move zone body resource dictionaries from legacy item GUID keys to
typed item-key strings; runtime body resource commit projection no longer
calls `FromLegacyId`.
- Remove runtime dependency on `ItemData` DTOs as item instance owners.
5. Mesh host