public override void AssignSlot(ACustomItem item) { System.Type interactibleType = System.Type.GetType(_interactibleItemTypeString); if (item.GetType() == interactibleType) { item.Slot = this; IsOccupied = true; } else { item.Slot = null; } }
public bool Interact(ACustomItem item) { CustomYokaiMask yokaiMask; if (item.GetType() != typeof(CustomYokaiMask)) { return(false); } yokaiMask = (CustomYokaiMask)item; // Mix potion only if it already has a slot assigned or if a slot is assigned successfully if (!yokaiMask.HasSlotAssigned()) { if (yokaiMask._itemSlotManager.AssignFirstSlotAvailable(item, false)) { return(MixPaint(yokaiMask)); } } else { return(MixPaint(yokaiMask)); } return(false); }
public bool Interact(ACustomItem item) { CustomPotion potion; if (item.GetType() != typeof(CustomPotion)) { return(false); } potion = (CustomPotion)item; // Mix potion only if it already has a slot assigned or if a slot is assigned successfully if (!potion.HasSlotAssigned()) { if (potion._itemSlotManager.AssignFirstSlotAvailable(item, false)) { return(MixPotion(potion)); } } else { return(MixPotion(potion)); } return(false); }
public static int ComputeItemCost(ACustomItem customItem) { return(ComputeItemCostFromType(customItem.GetType(), customItem.Complexity)); }