diff --git a/Aetheria.State.Unity.Smoke/Program.cs b/Aetheria.State.Unity.Smoke/Program.cs index b76a849a4..bdf102b75 100644 --- a/Aetheria.State.Unity.Smoke/Program.cs +++ b/Aetheria.State.Unity.Smoke/Program.cs @@ -187,7 +187,7 @@ try PositionZ = 3.0, DirectionX = 0.0, DirectionY = 1.0, - HullItemLegacyId = "smoke:hull", + HullItemDefinitionLegacyId = "smoke:hull", Equipment = new[] { new AetheriaRuntimeLoadoutItemSlotCommit @@ -196,7 +196,7 @@ try Y = 0, Item = new AetheriaRuntimeLoadoutItemCommit { - ItemLegacyId = "smoke:weapon", + ItemDefinitionLegacyId = "smoke:weapon", Quality = 0.9, Durability = 0.8 } diff --git a/Assets/Scripts/Gameplay/ActionGameManager.cs b/Assets/Scripts/Gameplay/ActionGameManager.cs index 59d8cbe29..5a61f68ec 100644 --- a/Assets/Scripts/Gameplay/ActionGameManager.cs +++ b/Assets/Scripts/Gameplay/ActionGameManager.cs @@ -266,7 +266,7 @@ public class ActionGameManager : MonoBehaviour { Name = blueprint.Name ?? "", Kind = blueprint is RuntimeShipBlueprint ? "ship" : blueprint is RuntimeOrbitalEntityBlueprint ? "orbital" : "entity", - FactionLegacyId = blueprint.Faction == Guid.Empty ? "" : blueprint.Faction.ToString("D"), + CorporationLegacyId = blueprint.Faction == Guid.Empty ? "" : blueprint.Faction.ToString("D"), Hull = ProjectLoadoutItem(blueprint.Hull), Equipment = ProjectSlots(blueprint.Equipment), CargoBays = ProjectSlots(blueprint.CargoBays), @@ -315,7 +315,7 @@ public class ActionGameManager : MonoBehaviour return new AetheriaRuntimeLoadoutItemCommit { - ItemLegacyId = item.Data?.ItemId.ToString("D") ?? "", + ItemDefinitionLegacyId = item.Data?.ItemId.ToString("D") ?? "", Quality = item is CraftedItemInstance crafted ? crafted.Quality : 1.0, Durability = item is EquippableItem equippable ? equippable.Durability : 1.0, Quantity = item is SimpleCommodity commodity ? commodity.Quantity : 1 @@ -379,8 +379,8 @@ public class ActionGameManager : MonoBehaviour PositionZ = entity.Position.z, DirectionX = entity.Direction.x, DirectionY = entity.Direction.y, - FactionLegacyId = entity.Faction?.ID.ToString("D") ?? "", - HullItemLegacyId = entity.Hull?.Data?.ItemId.ToString("D") ?? "", + CorporationLegacyId = entity.Faction?.ID.ToString("D") ?? "", + HullItemDefinitionLegacyId = entity.Hull?.Data?.ItemId.ToString("D") ?? "", Equipment = ProjectEquippedSlots(entity.Equipment), CargoBays = ProjectEquippedSlots(entity.CargoBays), DockingBays = ProjectEquippedSlots(entity.DockingBays), diff --git a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeStateCommitLog.cs b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeStateCommitLog.cs index 8d51405ea..ad844501f 100644 --- a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeStateCommitLog.cs +++ b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeStateCommitLog.cs @@ -76,7 +76,7 @@ namespace GameCult.Aetheria.State.Unity { public string Name { get; set; } = ""; public string Kind { get; set; } = ""; - public string FactionLegacyId { get; set; } = ""; + public string CorporationLegacyId { get; set; } = ""; public AetheriaRuntimeLoadoutItemCommit Hull { get; set; } = new AetheriaRuntimeLoadoutItemCommit(); public IReadOnlyList Equipment { get; set; } = Array.Empty(); public IReadOnlyList CargoBays { get; set; } = Array.Empty(); @@ -90,7 +90,7 @@ namespace GameCult.Aetheria.State.Unity public sealed class AetheriaRuntimeLoadoutItemCommit { - public string ItemLegacyId { get; set; } = ""; + public string ItemDefinitionLegacyId { get; set; } = ""; public double Quality { get; set; } = 1.0; public double Durability { get; set; } = 1.0; public int Quantity { get; set; } = 1; @@ -142,8 +142,8 @@ namespace GameCult.Aetheria.State.Unity public double PositionZ { get; set; } public double DirectionX { get; set; } public double DirectionY { get; set; } - public string FactionLegacyId { get; set; } = ""; - public string HullItemLegacyId { get; set; } = ""; + public string CorporationLegacyId { get; set; } = ""; + public string HullItemDefinitionLegacyId { get; set; } = ""; public IReadOnlyList Equipment { get; set; } = Array.Empty(); public IReadOnlyList CargoBays { get; set; } = Array.Empty(); public IReadOnlyList DockingBays { get; set; } = Array.Empty(); @@ -301,7 +301,7 @@ namespace GameCult.Aetheria.State.Unity writer.WriteArrayHeader(12); writer.Write(entity.Name ?? ""); writer.Write(entity.Kind ?? ""); - writer.Write(entity.FactionLegacyId ?? ""); + writer.Write(entity.CorporationLegacyId ?? ""); WriteLoadoutItem(ref writer, entity.Hull); WriteItemSlots(ref writer, entity.Equipment); WriteItemSlots(ref writer, entity.CargoBays); @@ -316,7 +316,7 @@ namespace GameCult.Aetheria.State.Unity private static void WriteLoadoutItem(ref MessagePackWriter writer, AetheriaRuntimeLoadoutItemCommit item) { writer.WriteArrayHeader(4); - writer.Write(item.ItemLegacyId ?? ""); + writer.Write(item.ItemDefinitionLegacyId ?? ""); writer.Write(item.Quality); writer.Write(item.Durability); writer.Write(item.Quantity); @@ -397,8 +397,8 @@ namespace GameCult.Aetheria.State.Unity writer.Write(entity.PositionZ); writer.Write(entity.DirectionX); writer.Write(entity.DirectionY); - writer.Write(entity.FactionLegacyId ?? ""); - writer.Write(entity.HullItemLegacyId ?? ""); + writer.Write(entity.CorporationLegacyId ?? ""); + writer.Write(entity.HullItemDefinitionLegacyId ?? ""); WriteItemSlots(ref writer, entity.Equipment); WriteItemSlots(ref writer, entity.CargoBays); WriteItemSlots(ref writer, entity.DockingBays); diff --git a/docs/aetheria-perfect-machine-map.md b/docs/aetheria-perfect-machine-map.md index 2956726bc..fe5a754ca 100644 --- a/docs/aetheria-perfect-machine-map.md +++ b/docs/aetheria-perfect-machine-map.md @@ -252,6 +252,10 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. - The dead Unity `NameFile` projection class has been deleted. Runtime name generation reads `AetheriaRuntimeNameFile` records from the typed catalog facade; legacy `GameData/NameFile/*.msgpack` remains migration input only. +- Pending Unity runtime commit envelopes now name their source catalog IDs as + `CorporationLegacyId`, `ItemDefinitionLegacyId`, and + `HullItemDefinitionLegacyId`; the applier has always projected those fields + into typed corporation and item-definition record keys. - Entity restore and loadout manufacturer-distance weighting no longer read legacy `Faction` entries through `ItemManager`; they use `Galaxy.ResolveFaction` over the typed corporation projection.