public bool IsMatch(SearchableItem entry)
        {
            var item = entry.Item;
            var obj  = item as Object;
            var key  = Utils.Helpers.GetItemUniqueKey(item);

            if (UniqueKey.Any() && UniqueKey.Contains(key))
            {
                return(true);
            }

            if (Class.Any() && GetClassFullNames(item).Any(className => Class.Contains(className)))
            {
                return(true);
            }

            if (ObjCategory.Any() && ObjCategory.Contains(item.Category))
            {
                return(true);
            }

            if (ObjType.Any() && obj != null && ObjType.Contains(obj.Type))
            {
                return(true);
            }

            if (ItemId.Any() && ItemId.Contains($"{entry.Type}:{item.ParentSheetIndex}"))
            {
                return(true);
            }

            return(false);
        }
 public SearchableItem(SearchableItem item)
 {
     Type       = item.Type;
     ID         = item.ID;
     CreateItem = item.CreateItem;
     Item       = item.Item;
 }
Esempio n. 3
0
 public SpawnableItem(SearchableItem item, string category, int categoryPrice, int progressionLimit) : base(item)
 {
     Category          = category;
     CategoryPrice     = categoryPrice;
     _progressionLimit = progressionLimit;
 }