コード例 #1
0
    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;
        }
    }
コード例 #2
0
    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);
    }
コード例 #3
0
    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);
    }
コード例 #4
0
 public static int ComputeItemCost(ACustomItem customItem)
 {
     return(ComputeItemCostFromType(customItem.GetType(), customItem.Complexity));
 }