diff --git a/.voidbot/state/aetheria.cc b/.voidbot/state/aetheria.cc index 16fea513c..9953bfc78 100644 Binary files a/.voidbot/state/aetheria.cc and b/.voidbot/state/aetheria.cc differ diff --git a/Aetheria.State.Unity.Smoke/Program.cs b/Aetheria.State.Unity.Smoke/Program.cs index c5c701f03..0db508e70 100644 --- a/Aetheria.State.Unity.Smoke/Program.cs +++ b/Aetheria.State.Unity.Smoke/Program.cs @@ -171,7 +171,6 @@ try CorporationLegacyId = "smoke:faction", Hull = new AetheriaRuntimeLoadoutItemCommit { - ItemDefinitionLegacyId = "stale:hull", ItemKey = "aetheria.item_definition:legacy:smoke:hull", Quality = 0.7, Durability = 0.6 @@ -184,7 +183,6 @@ try Y = 2, Item = new AetheriaRuntimeLoadoutItemCommit { - ItemDefinitionLegacyId = "stale:weapon", ItemKey = "aetheria.item_definition:legacy:smoke:weapon", Quality = 0.9, Durability = 0.8, @@ -204,7 +202,6 @@ try Y = 4, Item = new AetheriaRuntimeLoadoutItemCommit { - ItemDefinitionLegacyId = "stale:ore", ItemKey = "aetheria.item_definition:legacy:smoke:ore", Quantity = 5 } @@ -237,7 +234,6 @@ try { ControlPath = "/2", Kind = "gear", - ItemDefinitionLegacyId = "stale:weapon", ItemKey = "aetheria.item_definition:legacy:smoke:weapon", EquipmentIndex = 0, BehaviorIndex = 1 @@ -287,7 +283,6 @@ try { new AetheriaRuntimeBodyResourceCommit { - ItemDefinitionLegacyId = "stale:ore", ItemKey = "aetheria.item_definition:legacy:smoke:ore", Amount = 3.5 } @@ -339,7 +334,6 @@ try TractorPower = 12.5, Heatstroke = 0.25, Hypothermia = 0.125, - HullItemDefinitionLegacyId = "stale:hull", HullItemKey = "aetheria.item_definition:legacy:smoke:hull", Equipment = new[] { @@ -349,7 +343,6 @@ try Y = 0, Item = new AetheriaRuntimeLoadoutItemCommit { - ItemDefinitionLegacyId = "stale:weapon", ItemKey = "aetheria.item_definition:legacy:smoke:weapon", Quality = 0.9, Durability = 0.8, @@ -369,7 +362,6 @@ try Y = 3, Item = new AetheriaRuntimeLoadoutItemCommit { - ItemDefinitionLegacyId = "stale:ore", ItemKey = "aetheria.item_definition:legacy:smoke:ore", Quantity = 7 } @@ -395,7 +387,6 @@ try { new AetheriaRuntimeActiveConsumableCommit { - ItemDefinitionLegacyId = "stale:consumable", ItemKey = "aetheria.item_definition:legacy:smoke:consumable", Quality = 0.75, RemainingDuration = 3.0, diff --git a/Aetheria.State/AetheriaRuntimeCommitLogApplier.cs b/Aetheria.State/AetheriaRuntimeCommitLogApplier.cs index b18433531..f6b426279 100644 --- a/Aetheria.State/AetheriaRuntimeCommitLogApplier.cs +++ b/Aetheria.State/AetheriaRuntimeCommitLogApplier.cs @@ -164,7 +164,7 @@ public static class AetheriaRuntimeCommitLogApplier item ??= new AetheriaRuntimeLoadoutItemCommit(); return new AetheriaLoadoutItem { - ItemKey = ReferenceKey(item.ItemKey, "aetheria.item_definition", item.ItemDefinitionLegacyId ?? ""), + ItemKey = item.ItemKey ?? "", Quality = item.Quality, Durability = item.Durability, Quantity = item.Quantity, @@ -332,7 +332,7 @@ public static class AetheriaRuntimeCommitLogApplier return (resources ?? Array.Empty()) .Select(resource => new AetheriaBodyResource { - ItemKey = ReferenceKey(resource.ItemKey, "aetheria.item_definition", resource.ItemDefinitionLegacyId ?? ""), + ItemKey = resource.ItemKey ?? "", Amount = resource.Amount }) .ToArray(); @@ -464,7 +464,7 @@ public static class AetheriaRuntimeCommitLogApplier Heatstroke = entity.Heatstroke, Hypothermia = entity.Hypothermia, FactionKey = ReferenceKey("aetheria.corporation", entity.CorporationLegacyId ?? ""), - HullItemKey = ReferenceKey(entity.HullItemKey, "aetheria.item_definition", entity.HullItemDefinitionLegacyId ?? ""), + HullItemKey = entity.HullItemKey ?? "", Equipment = ToEntityItemSlots(entity.Equipment), CargoBays = ToEntityItemSlots(entity.CargoBays), DockingBays = ToEntityItemSlots(entity.DockingBays), @@ -624,7 +624,7 @@ public static class AetheriaRuntimeCommitLogApplier return (consumables ?? Array.Empty()) .Select(consumable => new AetheriaActiveConsumableSnapshot { - ItemKey = ReferenceKey(consumable.ItemKey, "aetheria.item_definition", consumable.ItemDefinitionLegacyId ?? ""), + ItemKey = consumable.ItemKey ?? "", Quality = consumable.Quality, RemainingDuration = consumable.RemainingDuration, Duration = consumable.Duration @@ -666,7 +666,7 @@ public static class AetheriaRuntimeCommitLogApplier { ControlPath = binding.ControlPath ?? "", Kind = binding.Kind ?? "", - TargetKey = ReferenceKey(binding.ItemKey, "aetheria.item_definition", binding.ItemDefinitionLegacyId ?? ""), + TargetKey = binding.ItemKey ?? "", EquipmentIndex = binding.EquipmentIndex, BehaviorIndex = binding.BehaviorIndex, WeaponGroup = binding.WeaponGroup diff --git a/Aetheria.State/README.md b/Aetheria.State/README.md index 622325cb4..a3bbf20ae 100644 --- a/Aetheria.State/README.md +++ b/Aetheria.State/README.md @@ -15,7 +15,7 @@ The typed runtime state model is split into player settings, loadout templates, run state, zone state, entity snapshots, item slots, weapon groups, action-bar bindings, stat grids, and runtime session documents. Runtime checkpoints include current action-bar bindings as stable typed targets: input control -path, binding kind, item definition reference, equipment index, behavior index, +path, binding kind, item key, equipment index, behavior index, 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 diff --git a/Assets/Scripts/Gameplay/ActionBarSlot.cs b/Assets/Scripts/Gameplay/ActionBarSlot.cs index ef942590b..c4b1b926d 100644 --- a/Assets/Scripts/Gameplay/ActionBarSlot.cs +++ b/Assets/Scripts/Gameplay/ActionBarSlot.cs @@ -97,8 +97,6 @@ public class ActionBarConsumableBinding : ActionBarBinding public string TargetItemKey => Guid.TryParse(Target?.LegacyId, out var legacyId) ? AetheriaRuntimeItemReference.FromLegacyId(legacyId) : ""; - public string TargetItemDefinitionLegacyId => Target?.LegacyId ?? ""; - } public class ActionBarGearBinding : ActionBarBinding @@ -112,16 +110,6 @@ public class ActionBarGearBinding : ActionBarBinding public int BehaviorIndex => Item?.Behaviors == null ? -1 : Array.IndexOf(Item.Behaviors, Behavior); - public string TargetItemDefinitionLegacyId - { - get - { - return AetheriaRuntimeItemReference.ToLegacyId(TargetItemKey) is var legacyId && legacyId != Guid.Empty - ? legacyId.ToString("D") - : ""; - } - } - public string TargetItemKey => Item?.EquippableItem?.ItemKey ?? ""; public ActionBarGearBinding(Entity entity, ActionBarSlot slot, EquippedItem item, IActivatedBehavior behavior) : base(entity, slot) diff --git a/Assets/Scripts/Gameplay/ActionGameManager.cs b/Assets/Scripts/Gameplay/ActionGameManager.cs index e3e8da81c..dc988d891 100644 --- a/Assets/Scripts/Gameplay/ActionGameManager.cs +++ b/Assets/Scripts/Gameplay/ActionGameManager.cs @@ -521,7 +521,6 @@ public class ActionGameManager : MonoBehaviour return new AetheriaRuntimeLoadoutItemCommit { - ItemDefinitionLegacyId = item.ItemId == Guid.Empty ? "" : item.ItemId.ToString("D"), ItemKey = item.ItemKey, Quality = item is CraftedItemInstance crafted ? crafted.Quality : 1.0, Durability = item is EquippableItem equippable ? equippable.Durability : 1.0, @@ -569,7 +568,6 @@ public class ActionGameManager : MonoBehaviour { ControlPath = slot.ControlPath ?? "", Kind = "consumable", - ItemDefinitionLegacyId = consumable.TargetItemDefinitionLegacyId, ItemKey = consumable.TargetItemKey }; case ActionBarGearBinding gear: @@ -577,7 +575,6 @@ public class ActionGameManager : MonoBehaviour { ControlPath = slot.ControlPath ?? "", Kind = "gear", - ItemDefinitionLegacyId = gear.TargetItemDefinitionLegacyId, ItemKey = gear.TargetItemKey, EquipmentIndex = gear.EquipmentIndex, BehaviorIndex = gear.BehaviorIndex @@ -677,7 +674,6 @@ public class ActionGameManager : MonoBehaviour .OrderBy(pair => pair.Key) .Select(pair => new AetheriaRuntimeBodyResourceCommit { - ItemDefinitionLegacyId = LegacyId(pair.Key), ItemKey = AetheriaRuntimeItemReference.FromLegacyId(pair.Key), Amount = pair.Value }) @@ -709,7 +705,6 @@ public class ActionGameManager : MonoBehaviour .OrderBy(pair => pair.Key) .Select(pair => new AetheriaRuntimeBodyResourceCommit { - ItemDefinitionLegacyId = LegacyId(pair.Key), ItemKey = AetheriaRuntimeItemReference.FromLegacyId(pair.Key), Amount = pair.Value }) @@ -824,7 +819,6 @@ public class ActionGameManager : MonoBehaviour Heatstroke = entity.Heatstroke, Hypothermia = entity.Hypothermia, CorporationLegacyId = entity.Faction?.ID.ToString("D") ?? "", - HullItemDefinitionLegacyId = entity.Hull?.ItemId == Guid.Empty ? "" : entity.Hull.ItemId.ToString("D"), HullItemKey = entity.Hull?.ItemKey ?? "", Equipment = ProjectEquippedSlots(entity.Equipment), CargoBays = ProjectEquippedSlots(entity.CargoBays), @@ -1187,7 +1181,6 @@ public class ActionGameManager : MonoBehaviour return entity.ActiveConsumables? .Select(effect => new AetheriaRuntimeActiveConsumableCommit { - ItemDefinitionLegacyId = effect.Item?.ItemId == Guid.Empty ? "" : effect.Item.ItemId.ToString("D"), ItemKey = effect.Item?.ItemKey ?? "", Quality = effect.Item?.Quality ?? 1.0, RemainingDuration = effect.RemainingDuration, @@ -1340,7 +1333,7 @@ public class ActionGameManager : MonoBehaviour { item ??= new AetheriaRuntimeLoadoutItemCommit(); return new AetheriaRuntimeLoadoutItemSnapshot( - ReferenceKey(item.ItemKey, "aetheria.item_definition", item.ItemDefinitionLegacyId ?? ""), + item.ItemKey ?? "", item.Quality, item.Durability, item.Quantity, diff --git a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeStateCommitDocument.cs b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeStateCommitDocument.cs index e001c76d7..892d5033b 100644 --- a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeStateCommitDocument.cs +++ b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeStateCommitDocument.cs @@ -173,9 +173,6 @@ namespace GameCult.Aetheria.State.Unity [MessagePackObject] public sealed class AetheriaRuntimeLoadoutItemCommit { - [Key(0)] - public string ItemDefinitionLegacyId { get; set; } = ""; - [Key(1)] public double Quality { get; set; } = 1.0; @@ -258,9 +255,6 @@ namespace GameCult.Aetheria.State.Unity [Key(1)] public string Kind { get; set; } = ""; - [Key(2)] - public string ItemDefinitionLegacyId { get; set; } = ""; - [Key(3)] public int EquipmentIndex { get; set; } = -1; @@ -389,9 +383,6 @@ namespace GameCult.Aetheria.State.Unity [MessagePackObject] public sealed class AetheriaRuntimeBodyResourceCommit { - [Key(0)] - public string ItemDefinitionLegacyId { get; set; } = ""; - [Key(1)] public double Amount { get; set; } @@ -542,9 +533,6 @@ namespace GameCult.Aetheria.State.Unity [Key(8)] public string CorporationLegacyId { get; set; } = ""; - [Key(9)] - public string HullItemDefinitionLegacyId { get; set; } = ""; - [Key(10)] public IReadOnlyList Equipment { get; set; } = Array.Empty(); @@ -659,9 +647,6 @@ namespace GameCult.Aetheria.State.Unity [MessagePackObject] public sealed class AetheriaRuntimeActiveConsumableCommit { - [Key(0)] - public string ItemDefinitionLegacyId { get; set; } = ""; - [Key(1)] public double Quality { get; set; } = 1.0; diff --git a/docs/aetheria-perfect-machine-map.md b/docs/aetheria-perfect-machine-map.md index 6055ec893..079a53ece 100644 --- a/docs/aetheria-perfect-machine-map.md +++ b/docs/aetheria-perfect-machine-map.md @@ -496,11 +496,11 @@ 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 carry typed item keys for loadout - items, action-bar targets, body resources, entity hulls, and active +- Pending Unity runtime commit envelopes now carry typed item keys only for + loadout items, action-bar targets, body resources, entity hulls, and active consumables. The older `ItemDefinitionLegacyId` and - `HullItemDefinitionLegacyId` fields remain compatibility import/export - fields; the applier prefers `ItemKey`/`HullItemKey` whenever present. + `HullItemDefinitionLegacyId` fields have been deleted from the pending commit + contract; the applier no longer reconstructs item keys from legacy item GUIDs. Corporation legacy IDs still translate to typed corporation record keys at the commit boundary. - Entity restore and loadout manufacturer-distance weighting no longer read