private static bool CanListAsAutoCapturable(Pawn p) { if (p.Downed && !p.mindState.WillJoinColonyIfRescued) { return(CaravanUtility.ShouldAutoCapture(p, Faction.OfPlayer)); } return(false); }
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); }
private bool ShouldAutoCapture(Pawn p) { return(CaravanUtility.ShouldAutoCapture(p, base.Faction)); }
private static bool <AddPawnsSections> m__4(TransferableOneWay x) { return(((Pawn)x.AnyThing).Downed && CaravanUtility.ShouldAutoCapture((Pawn)x.AnyThing, Faction.OfPlayer)); }