public bool IsRestricted(ContainerAction containerAction, InstancedItemInformation itemData)
 {
     if (containerAction == ContainerAction.remove)
     {
         Debug.LogWarning("Item Resticted for being removed from container because it has an Add-Only Restriction");
         return true;
     }
     else
         return false;
 }
 public bool IsSameItemAs(InstancedItemInformation other)
 {
     if (this == null || other == null)
     {
         return false;
     }
     if (Information.Id == other.Information.Id)
         return true;
     else return false;
 }
        public bool IsRestricted(ContainerAction containerAction, InstancedItemInformation itemData)
        {
            if (containerAction == ContainerAction.add)
            {
                if (RestrictedContainer.containerItems.Count >= ContainerItemLimit)
                {
                    Debug.LogWarning("Item Resticted for being added to container because it has a Item Limit Restriction");
                    return true;
                }
            }

            return false;
        }
Exemple #4
0
 public bool IsSameItemAs(InstancedItemInformation other)
 {
     if (this == null || other == null)
     {
         return(false);
     }
     if (Information.Id == other.Information.Id)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
        public bool IsRestricted(ContainerAction action, InstancedItemInformation itemData)
        {
            if (IsExcluded)
            {
                if (ItemIDList.Exists(x => x == itemData.Information.Id))
                {
                    Debug.LogWarning("Item Resticted for being added to container because it has a Item ID Restriction");
                    return true;
                }

                return false;
            }
            else
            {
                if (ItemIDList.Exists(x => x == itemData.Information.Id))
                    return false;

                Debug.LogWarning("Item Resticted for being added to container because it has a Item ID Restriction");
                return true;
            }
        }
        void RemovedItem(InstancedItemInformation data, int amount, bool isMoving)
        {
            if (!isMoving)
            {

            }
        }
 public bool IsRestricted(ContainerAction containerAction, InstancedItemInformation itemData)
 {
     Debug.LogWarning("Item Resticted for being added to or removed from container because it has a No Action Restriction");
     return true;
 }