Require typed consumable rows for action bar binding

This commit is contained in:
Meta Vens 2026-06-14 01:09:31 +01:00
commit d5330348e2
3 changed files with 10 additions and 8 deletions

Binary file not shown.

View file

@ -729,7 +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 (!IsRuntimeConsumableItem(itemInstanceDragAction.Item)) return false;
if (!(ItemManager.GetData(itemInstanceDragAction.Item) is ConsumableItemData consumable)) return false;
slot.Binding = new ActionBarConsumableBinding(CurrentEntity, slot, consumable);
return true;
@ -749,10 +749,10 @@ public class ActionGameManager : MonoBehaviour
return slot;
}
bool IsTypedConsumable(ItemInstance item)
bool IsRuntimeConsumableItem(ItemInstance item)
{
var typedItem = FindTypedActionBarItem(item);
return typedItem == null ||
return typedItem != null &&
string.Equals(typedItem.Category, nameof(ConsumableItemData), StringComparison.Ordinal);
}

View file

@ -80,11 +80,13 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted.
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. Gear action-bar bindings use typed weapon
and hardpoint facets for fallback icon selection instead of hydrating item
DTOs to classify the icon; legacy custom action-bar icon paths remain fallback
projection data. Unity boot reads typed player settings back through the
package-owned CultCache reader before falling back to defaults.
still required by activation APIs. Missing typed rows are rejected for
consumable binding instead of falling through to legacy DTO classification.
Gear action-bar bindings use typed weapon and hardpoint facets for fallback
icon selection instead of hydrating item DTOs to classify the icon; legacy
custom action-bar icon paths remain fallback projection data. Unity boot reads
typed player settings back through the package-owned CultCache reader before
falling back to defaults.
- The combat schematic HUD uses typed runtime catalog weapon facets for its
static weapon icon strip before falling back to legacy `WeaponItemData`.
Runtime weapon behavior still owns ammo counts, active range, cooldowns,