public override int Use() { int used = base.Use(); if (used < 0) { return(used); } // Currently in a equip to collection? if (InventoryManager.IsEquipToCollection(itemCollection)) { bool unequipped = Unequip(); if (unequipped) { return(1); // Used from inside the character, move back to inventory. } return(0); // Couldn't un-unequip } var equipSlot = FindBestEquipSlot(); if (equipSlot == null) { return(-2); // No slot found } bool equipped = Equip(equipSlot, InventoryManager.instance.character); if (equipped) { return(1); } return(-2); }