Add basic search

This commit is contained in:
Zeffuro
2025-12-20 10:19:16 +01:00
parent 592fa392bf
commit d18f4483bb
5 changed files with 99 additions and 43 deletions
+4 -2
View File
@@ -35,9 +35,11 @@ public static unsafe class InventoryState
public static bool Contains(this List<InventoryType> inventoryTypes, GameInventoryType type)
=> inventoryTypes.Contains((InventoryType)type);
public static List<CategorizedInventory> GetInventoryItemCategories()
public static List<CategorizedInventory> GetInventoryItemCategories(string filterString = "", bool invert = false)
{
var items = GetInventoryItems();
var items = string.IsNullOrEmpty(filterString)
? GetInventoryItems()
: GetInventoryItems(filterString, invert);
return items
.GroupBy(GetItemUiCategoryKey)