示例#1
0
 public static IEnumerable <Pawn> Pawns(MainTabWindow mainTabWindow)
 {
     foreach (var p in Find.VisibleMap.mapPawns.FreeColonists)
     {
         yield return(p);
     }
     if (mainTabWindow is MainTabWindow_Work || mainTabWindow is MainTabWindow_Restrict ||
         mainTabWindow.GetType().ToString().Contains("MainTabWindow_WorkTab"))
     {
         foreach (var pawn in Find.VisibleMap.mapPawns.PrisonersOfColony)
         {
             if (PrisonLaborUtility.LaborEnabled(pawn))
             {
                 WorkSettings.InitWorkSettings(pawn);
                 yield return(pawn);
             }
         }
     }
 }
示例#2
0
 private static void Prefix(MainTabWindow __instance) => State.ResizePane = State.Active && __instance.GetType() == typeof(MainTabWindow_Inspect) && State.SelectedPawn != null;