Cut ambient runtime catalog lookup
This commit is contained in:
parent
e7d33e5e43
commit
b3e91999be
14 changed files with 79 additions and 46 deletions
|
|
@ -99,7 +99,7 @@ public class ActionBarGearBinding : ActionBarBinding
|
|||
public ActionBarGearBinding(Entity entity, ActionBarSlot slot, EquippedItem item, IActivatedBehavior behavior) : base(entity, slot)
|
||||
{
|
||||
Item = item;
|
||||
var data = item.EquippableItem.Data.Value as EquippableItemData;
|
||||
var data = entity.ItemManager.GetData(item.EquippableItem);
|
||||
Behavior = behavior;
|
||||
Slot.QuantityRemaining.gameObject.SetActive(false);
|
||||
Slot.Icon.gameObject.SetActive(true);
|
||||
|
|
|
|||
|
|
@ -485,7 +485,6 @@ public class ActionGameManager : MonoBehaviour
|
|||
}
|
||||
|
||||
var runtimeItemCatalog = new AetheriaRuntimeItemCatalog(RuntimeCatalog);
|
||||
RuntimeCatalogLinkBase.BindRuntimeItemCatalog(runtimeItemCatalog);
|
||||
ItemManager = new ItemManager(
|
||||
runtimeItemCatalog,
|
||||
Settings.GameplaySettings,
|
||||
|
|
@ -666,7 +665,7 @@ public class ActionGameManager : MonoBehaviour
|
|||
slot.Binding = new ActionBarGearBinding(CurrentEntity, slot, equippedItemDragAction.EquippedItem, trigger);
|
||||
return true;
|
||||
case ItemInstanceDragObject itemInstanceDragAction:
|
||||
if (!(itemInstanceDragAction.Item.Data.Value is ConsumableItemData consumable)) return false;
|
||||
if (!(ItemManager.GetData(itemInstanceDragAction.Item) is ConsumableItemData consumable)) return false;
|
||||
slot.Binding = new ActionBarConsumableBinding(CurrentEntity, slot, consumable);
|
||||
return true;
|
||||
case WeaponGroupDragObject weaponGroupDragAction:
|
||||
|
|
|
|||
Loading…
Reference in a new issue