protected void ResetDisabledBodyParts(IEnumerable <BodyPartRecord> parts, CustomPawn pawn) { disabledBodyParts.Clear(); OptionsHealth healthOptions = PrepareCarefully.Instance.Providers.Health.GetOptions(pawn); foreach (var part in parts) { UniqueBodyPart uniquePart = healthOptions.FindBodyPartsForRecord(part); if (pawn.HasPartBeenReplaced(part) || pawn.HasAtLeastOnePartBeenReplaced(uniquePart.Ancestors.Select((UniqueBodyPart p) => { return(p.Record); }))) { disabledBodyParts.Add(part); } } }