diff --git a/FilterExtension/Core.cs b/FilterExtension/Core.cs index 39965785..7c47ef67 100644 --- a/FilterExtension/Core.cs +++ b/FilterExtension/Core.cs @@ -42,8 +42,8 @@ public class Core : MonoBehaviour public bool debug = false; public bool setAdvanced = true; public bool replaceFbM = true; - public string categoryDefault; - public string subCategoryDefault; + public string categoryDefault = ""; + public string subCategoryDefault = ""; const string fallbackIcon = "stockIcon_fallback"; diff --git a/FilterExtension/Utility/PartType.cs b/FilterExtension/Utility/PartType.cs index c84a4b4b..71d28028 100644 --- a/FilterExtension/Utility/PartType.cs +++ b/FilterExtension/Utility/PartType.cs @@ -21,7 +21,7 @@ public static bool checkSubcategory(AvailablePart part, string value, int depth) foreach (string s in value.Split(',').Select(str => str.Trim())) { FilterExtensions.ConfigNodes.customSubCategory subcategory; - if (Core.Instance.subCategoriesDict.TryGetValue(s, out subcategory) && subcategory.checkFilters(part, depth)) + if (Core.Instance.subCategoriesDict.TryGetValue(s, out subcategory) && subcategory.checkFilters(part, depth + 1)) return true; } return false; @@ -90,7 +90,6 @@ public static bool checkCategory(AvailablePart part, string value) break; } } - return false; } diff --git a/GameData/000_FilterExtensions/FilterExtensions.dll b/GameData/000_FilterExtensions/FilterExtensions.dll index f0b57300..5d4ed8ad 100644 Binary files a/GameData/000_FilterExtensions/FilterExtensions.dll and b/GameData/000_FilterExtensions/FilterExtensions.dll differ