private static IEnumerable <BodyPartRecord> cacheValueRace_BodyPartRecords(Pawn pawn) { IEnumerable <BodyPartDef> hairyParts = BodyHairHelper.WhatSkinCanGetHairy(pawn); IEnumerable <BodyPartRecord> validParts = pawn.RaceProps.body.AllParts.Where(x => hairyParts.Contains(x.def)); return(validParts); }
public static BodyPartRecord Where(this Pawn pawn, BodyPartDef where) { if (where == BodyPartDefOf.Chest) { return(BodyCache.Chest(pawn)); } else if (where == BodyPartDefOf.Groin) { return(BodyCache.Groin(pawn)); } else if (where == BodyPartDefOf.LifeStages_ReproductiveOrgans) { return(BodyCache.LifeStages_ReproductiveOrgans(pawn)); } else { return(BodyHairHelper.WhatPart(pawn)); } }