private static void Postfix(uGUI_BlueprintsTab __instance) { if (Core.BlueprintHideList == null) { GenerateList(__instance); } foreach (KeyValuePair <TechCategory, List <TechType> > keyValuePair in Core.BlueprintHideList) { foreach (TechType techType in keyValuePair.Value) { if (__instance.entries.ContainsKey(keyValuePair.Key) && __instance.entries[keyValuePair.Key].entries.ContainsKey(techType)) { uGUI_BlueprintsTab.CategoryEntry categoryEntry = __instance.entries[keyValuePair.Key]; uGUI_BlueprintEntry entry = __instance.entries[keyValuePair.Key].entries[techType]; NotificationManager.main.UnregisterTarget(entry); categoryEntry.entries.Remove(techType); Object.Destroy(entry.gameObject); if (categoryEntry.entries.Count == 0) { Object.Destroy(categoryEntry.title.gameObject); Object.Destroy(categoryEntry.canvas.gameObject); __instance.entries.Remove(keyValuePair.Key); } } } } }
private static void Postfix(uGUI_BlueprintEntry __instance, TechType techType) { var techData = CraftData.Get(techType); if (techData != null && techData.ingredientCount > 0) { __instance.gameObject.AddComponent <BlueprintTrackerPdaEntry>().techType = techType; } }