Make breast growth handle body size changes

This commit is contained in:
lutepickle 2022-03-12 20:14:06 -08:00
parent 1290d289a8
commit e0b8f30e76
2 changed files with 20 additions and 1 deletions

View File

@ -143,7 +143,13 @@ namespace RJW_Menstruation
}
}
public float BreastSizeIncreased
{
get
{
return breastSizeIncreased;
}
}
public override void CompExposeData()
{

View File

@ -92,4 +92,17 @@ namespace RJW_Menstruation
}
}
[HarmonyPatch(typeof(CompHediffBodyPart), "updatesize")]
public static class updatesize_Patch
{
public static void Postfix(CompHediffBodyPart __instance)
{
HediffComp_Breast comp = __instance.parent.GetBreastComp();
if (comp != null)
{
__instance.parent.Severity += comp.BreastSizeIncreased;
}
}
}
}