static void AddDirectRelation_GiveLacrating(Pawn_RelationsTracker __instance, PawnRelationDef def, Pawn otherPawn) { if (def == PawnRelationDefOf.Parent) { Pawn pawn = (Pawn)PawnFI.GetValue(__instance); Pawn mother = pawn.GetMother(); //Log.Message("mother : " + pawn.LabelIndefinite()); if (pawn.ageTracker.CurLifeStageIndex == AgeStage.Baby && mother == otherPawn) { if (mother.RaceProps.Humanlike && !mother.health.hediffSet.HasHediff(HediffDef.Named("Lactating"))) { if (AnotherModCheck.RJW_On) { try { ((Action)(() => { if (Genital_Helper.has_breasts(mother)) { mother.health.AddHediff(HediffDef.Named("Lactating"), ChildrenUtility.GetPawnBodyPart(mother, "Chest"), null); } if (Genital_Helper.has_vagina(mother)) { mother.health.AddHediff(HediffDef.Named("BnC_RJW_PostPregnancy"), ChildrenUtility.GetPawnBodyPart(mother, "Genitals"), null); } }))(); } catch (TypeLoadException) { } } else { mother.health.AddHediff(HediffDef.Named("Lactating"), ChildrenUtility.GetPawnBodyPart(mother, "Torso"), null); } } } } }