/// <summary> /// Applied after OnDiscover runs. /// </summary> internal static void Postfix(ref TreeFilterable __instance, ref Storage ___storage, Tag category_tag, Tag tag) { if (___storage.storageFilters.Contains(category_tag)) { __instance.RemoveTagFromFilter(tag); } }
/// <summary> /// Applied after OnDiscover runs. /// </summary> internal static void Postfix(TreeFilterable __instance, Storage ___storage, Tag category_tag, Tag tag) { // Check the value of the storage-specific accepts/rejects new materials bool accept = ___storage.gameObject.GetComponentSafe <NewMaterialsSettings>()?. AcceptsNewMaterials ?? false; if (!accept && ___storage.storageFilters.Contains(category_tag)) { __instance.RemoveTagFromFilter(tag); } }
/// <summary> /// Applied after OnDiscover runs. /// </summary> internal static void Postfix(TreeFilterable __instance, Storage ___storage, Tag category_tag, Tag tag) { GameObject obj; if ((obj = __instance.gameObject) != null) { // Ignore fridges and ration boxes if the check box is set bool isFood = obj.GetComponent <Refrigerator>() != null || obj. GetComponent <RationBox>() != null; if (obj != null && (!options.IgnoreFoodBoxes || !isFood) && ___storage. storageFilters.Contains(category_tag)) { __instance.RemoveTagFromFilter(tag); } } }