コード例 #1
0
 private static bool CanListAsAutoCapturable(Pawn p)
 {
     if (p.Downed && !p.mindState.WillJoinColonyIfRescued)
     {
         return(CaravanUtility.ShouldAutoCapture(p, Faction.OfPlayer));
     }
     return(false);
 }
コード例 #2
0
ファイル: CaravanUIUtility.cs プロジェクト: potsh/RimWorld
        public static void AddPawnsSections(TransferableOneWayWidget widget, List <TransferableOneWay> transferables)
        {
            IEnumerable <TransferableOneWay> source = from x in transferables
                                                      where x.ThingDef.category == ThingCategory.Pawn
                                                      select x;

            widget.AddSection("ColonistsSection".Translate(), from x in source
                              where ((Pawn)x.AnyThing).IsFreeColonist
                              select x);
            widget.AddSection("PrisonersSection".Translate(), from x in source
                              where ((Pawn)x.AnyThing).IsPrisoner
                              select x);
            widget.AddSection("CaptureSection".Translate(), from x in source
                              where ((Pawn)x.AnyThing).Downed && CaravanUtility.ShouldAutoCapture((Pawn)x.AnyThing, Faction.OfPlayer)
                              select x);
            widget.AddSection("AnimalsSection".Translate(), from x in source
                              where ((Pawn)x.AnyThing).RaceProps.Animal
                              select x);
        }
コード例 #3
0
 private bool ShouldAutoCapture(Pawn p)
 {
     return(CaravanUtility.ShouldAutoCapture(p, base.Faction));
 }
コード例 #4
0
 private static bool <AddPawnsSections> m__4(TransferableOneWay x)
 {
     return(((Pawn)x.AnyThing).Downed && CaravanUtility.ShouldAutoCapture((Pawn)x.AnyThing, Faction.OfPlayer));
 }