Only do the pregnancy rechecks after a mech implant or insect egging

This commit is contained in:
lutepickle 2022-08-30 15:20:06 -07:00
parent 3ca018b0b6
commit 8d4d7e93c3

View file

@ -54,7 +54,9 @@ namespace RJW_Menstruation
{
Pawn pawn = props.partner;
// A pregnancy might have been destroyed by a mech or insect implantation, so double-check them all
if (props.sexType != xxx.rjwSextype.MechImplant && !pawn.health.hediffSet.GetHediffs<Hediff_InsectEgg>().Any()) return;
// The existing pregnancies might have been destroyed, so go through see if any new mech pregnancies need to be picked up
foreach (HediffComp_Menstruation comp in pawn.GetMenstruationComps())
{
_ = comp.Pregnancy; // get_Pregnancy will do any removals