public static bool OnTabOrActiveSubTab(ResearchTabDef defTab, ResearchTabDef CurTab, ResearchProjectDef def) { if (CurTab == null || defTab == null) { return(false); } if (CurTab == AdeptusResearchTabDefOf.OGAMA_RTab) { if (defTab != CurSubTab) { if (def.HasTag(ResearchSubTabUtility.CurSubTabTag)) { return(true); } if (def.HasTag(AdeptusResearchTagDefOf.OG_Common_Tech)) { return(true); } return(false); } else { return(true); } /* * if (defTab is ResearchSubTabDef subTabDef) * { * // Log.Message(defTab + " is subTab of " + subTabDef.parentTab); * } * if (defTab != CurTab) * { * * // Log.Message("OGAMA_RTab defTab != CurTab CurSubTabTag: "+ ResearchSubTabUtility.CurSubTabTag); * return def != null && (def.HasTag(ResearchSubTabUtility.CurSubTabTag) || def.HasTag(AdeptusResearchTagDefOf.OG_Common_Tech)); * } * else * { * // Log.Message("OGAMA_RTab defTab == CurTab"); * return def != null && (def.HasTag(ResearchSubTabUtility.CurSubTabTag) || def.HasTag(AdeptusResearchTagDefOf.OG_Common_Tech)); * } */ } return(defTab == CurTab); }
public static bool OnTabOrActiveSubTab(ResearchTabDef defTab, ResearchTabDef CurTab, ResearchProjectDef def) { if (CurTab == null || defTab == null) { return(false); } if (CurTab == AdeptusResearchTabDefOf.OGAMA_RTab) { if (defTab != CurTab) { return(defTab == CurSubTab || (def == null && def.HasTag(ResearchSubTabUtility.CurSubTabTag) || def.HasTag(AdeptusResearchTagDefOf.OG_Common_Tech))); } else { return(def != null && (def.HasTag(ResearchSubTabUtility.CurSubTabTag) || def.HasTag(AdeptusResearchTagDefOf.OG_Common_Tech))); } } return(defTab == CurTab); }
public static bool OnSubTab(ResearchProjectDef def, ResearchTabDef CurTab) { if (CurTab == null || CurTab != AdeptusResearchTabDefOf.OGAMA_RTab) { return(true); } if (def == null) { return(true); } if (def.HasTag(ResearchSubTabUtility.CurSubTabTag)) { ; return(true); } if (def.HasTag(AdeptusResearchTagDefOf.OG_Common_Tech)) { return(true); } return(false); }
public static bool SameSubTab(ResearchProjectDef defA, ResearchProjectDef defB) { if (defA.tab == AdeptusResearchTabDefOf.OGAMA_RTab && defB.tab == AdeptusResearchTabDefOf.OGAMA_RTab) { foreach (var item in ResearchSubTabUtility.SubTabs) { // Log.Message("checking for " + item.label.CapitalizeFirst()); if (defA.HasTag(item.subTagDef) && !defB.HasTag(item.subTagDef)) { return(false); } } } return(true); }
private static bool <FactionDialogFor> m__0(ResearchProjectDef rp) { return(rp.HasTag(ResearchProjectTagDefOf.ShipRelated) && rp.IsFinished); }