/// <summary> /// When pressing the equip/use button, we determine which of the two methods to call /// </summary> public virtual void EquipOrUse() { if (CurrentlySelectedInventorySlot.Equippable()) { CurrentlySelectedInventorySlot.Equip(); } if (CurrentlySelectedInventorySlot.Usable()) { CurrentlySelectedInventorySlot.Use(); } }
/// <summary> /// When pressing the equip/use button, we determine which of the two methods to call /// </summary> public virtual void EquipOrUse() { if (CurrentlySelectedInventorySlot.Equippable()) { CurrentlySelectedInventorySlot.Equip(); } if (CurrentlySelectedInventorySlot.Usable()) { //CurrentlySelectedInventorySlot.Use(); MMInventoryEvent.Trigger(MMInventoryEventType.PickTarget, CurrentlySelectedInventorySlot, TargetInventoryDisplay.TargetInventoryName, TargetInventoryDisplay.TargetInventory.Content[CurrentlySelectedInventorySlot.Index], 0, 0); CloseInventory(); } }