Пример #1
0
 public void CanStore(UnityAction onFailed, Socketable socketable, Socket socket)
 {
     //filter out what can and can't be socketed
     if (AllowedIds != null && AllowedIds.Length > 0)
     {
         var type = socketable.GetComponent <SocketableType>();
         if (type == null || HashedString.DoNotContain(AllowedIds, type.TypeName.Hash))
         {
             //let the inventory know that things are not well
             onFailed();
             return;
         }
     }
 }
Пример #2
0
        bool TestFilter(PGISlotItem item)
        {
            //filter out what can and can't be stored
            if (AllowedIds != null && AllowedIds.Length > 0)
            {
                var type = item.GetComponent <ItemType>();
                if (type == null)
                {
                    return(false);
                }

                if (HashedString.DoNotContain(AllowedIds, type.TypeName.Hash))
                {
                    return(false);
                }
            }

            return(true);
        }