private void ConsumeFuel() { if (fuelSlot.item.Id != -1) { fuelObject = (FuelObject)fuelSlot.ItemObject; } if (fuelSlot.amount > 0 && fuelSlot.CanPlaceInSlot(fuelSlot.ItemObject) && fuel <= 0) { if (inventory.ConsumeItems(fuelSlot, 1)) { fuel += fuelObject.fuelPower; fuelSlot.UpdateSlot(fuelSlot.item, fuelSlot.amount--); fuelSlot.UpdateSlot(); animator.SetBool("IsWorking", true); isWorking = true; } } }