コード例 #1
0
 private static void Postfix(Pawn pawn, ref bool __result)
 {
     if (!__result)
     {
         ResearchProjectDef project = Find.ResearchManager.currentProj;
         if (!RaceAddonTools.CheckResearch(pawn.def, project))
         {
             __result = true;
         }
     }
 }
コード例 #2
0
 private static void NoRaceWarning(ResearchProjectDef def)
 {
     if (!PawnsFinder.AllMaps_FreeColonistsSpawned.Any((Pawn x) => RaceAddonTools.CheckResearch(x.def, def)))
     {
         string text = "RaceAddonRestriction_Research".Translate(def.label);
         text += "\n\n";
         foreach (var thingDef in RaceAddonTools.AllRaceAddonThingDefs.FindAll(x => RaceAddonTools.CheckResearch(x, def)))
         {
             text += thingDef.label + "\n";
         }
         Find.WindowStack.Add(new Dialog_MessageBox(text, null, null, null, null, null, false, null, null));
     }
 }