public static List <Pawn> GetTrainers(this PawnKindDef pawnkind, Map map, MasterMode mode) { return(pawnkind.GetMasterOptions(map, mode).Where(p => // skill high enough to handle (copied from StatWorker_MinimumHandlingSkill) // NOTE: This does NOT apply postprocessing, so scenario and other offsets DO NOT apply. // we can't actually use StatRequests because they're hardcoded for either Things or BuildableDefs. p.skills.GetSkill(SkillDefOf.Animals).Level >= Mathf.Clamp(GenMath.LerpDouble(0.3f, 1f, 0f, 9f, pawnkind.RaceProps.wildness), 0f, 20f)) .ToList()); }