diff --git a/.voidbot/state/aetheria.cc b/.voidbot/state/aetheria.cc index 5eef8e44f..636d18fb1 100644 Binary files a/.voidbot/state/aetheria.cc and b/.voidbot/state/aetheria.cc differ diff --git a/Assets/Scripts/Gameplay/ActionGameManager.cs b/Assets/Scripts/Gameplay/ActionGameManager.cs index 901460412..e243bcd8b 100644 --- a/Assets/Scripts/Gameplay/ActionGameManager.cs +++ b/Assets/Scripts/Gameplay/ActionGameManager.cs @@ -729,6 +729,7 @@ public class ActionGameManager : MonoBehaviour slot.Binding = new ActionBarGearBinding(CurrentEntity, slot, equippedItemDragAction.EquippedItem, trigger); return true; case ItemInstanceDragObject itemInstanceDragAction: + if (!IsTypedConsumable(itemInstanceDragAction.Item)) return false; if (!(ItemManager.GetData(itemInstanceDragAction.Item) is ConsumableItemData consumable)) return false; slot.Binding = new ActionBarConsumableBinding(CurrentEntity, slot, consumable); return true; @@ -748,6 +749,21 @@ public class ActionGameManager : MonoBehaviour return slot; } + bool IsTypedConsumable(ItemInstance item) + { + var typedItem = FindTypedActionBarItem(item); + return typedItem == null || + string.Equals(typedItem.Category, nameof(ConsumableItemData), StringComparison.Ordinal); + } + + AetheriaRuntimeCatalogItem FindTypedActionBarItem(ItemInstance item) + { + var itemId = item?.Data?.ItemId ?? Guid.Empty; + return itemId == Guid.Empty + ? null + : RuntimeCatalog?.FindItemByLegacyId(itemId.ToString("D")); + } + var bindings = RuntimePlayerSettings.InputSettings.ActionBarInputs.OrderBy(i => i) .Select(createBinding).ToList(); diff --git a/docs/aetheria-perfect-machine-map.md b/docs/aetheria-perfect-machine-map.md index 5ddd65721..66791db88 100644 --- a/docs/aetheria-perfect-machine-map.md +++ b/docs/aetheria-perfect-machine-map.md @@ -77,9 +77,12 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. that calls Unity's InputSystem at the binding/action layer; Unity's generated `AetheriaInput` class is the edge consumer of typed binding overrides, not the durable owner. Binding drag/drop and action-bar remapping both queue the - same typed player-settings commit after mutating the runtime projection. - Unity boot reads typed player settings back through the package-owned - CultCache reader before falling back to defaults. + same typed player-settings commit after mutating the runtime projection. The + action bar also uses typed runtime catalog category rows to reject + non-consumable inventory drops before hydrating the legacy consumable DTO + still required by activation APIs. Unity boot reads typed player settings + back through the package-owned CultCache reader before falling back to + defaults. - `Aetheria.State` now exposes typed node put/get ports for run state, zone state, and entity snapshots. The state smoke writes a run referencing a zone, a zone referencing an entity snapshot, and an entity snapshot carrying