Ejemplo n.º 1
0
        private static IEnumerable <Pawn> GetValidCandidatesToRedress(PawnGenerationRequest request)
        {
            IEnumerable <Pawn> enumerable = Find.WorldPawns.GetPawnsBySituation(WorldPawnSituation.Free);

            if (request.KindDef.factionLeader)
            {
                enumerable = enumerable.Concat(Find.WorldPawns.GetPawnsBySituation(WorldPawnSituation.FactionLeader));
            }
            return(from x in enumerable
                   where PawnGenerator.IsValidCandidateToRedress(x, request)
                   select x);
        }