mirror of
https://gitgud.io/lutepickle/rjw_menstruation.git
synced 2024-08-14 22:46:52 +00:00
Let the pregnancy detector in the initialization pick up multiple pregnancies, just in case
This commit is contained in:
parent
3f3977b3c7
commit
52b0c3ab95
1 changed files with 12 additions and 6 deletions
|
@ -885,13 +885,19 @@ namespace RJW_Menstruation
|
|||
|
||||
InitOvary();
|
||||
|
||||
if (pregnancy == null && // If there's no pregnancy registered in this womb...
|
||||
PregnancyHelper.GetPregnancy(parent.pawn) is Hediff_BasePregnancy preg && // ...but the pawn is pregnant...
|
||||
preg.GetMenstruationComp() == null) // ...and another womb doesn't have it, then pick it up
|
||||
if (pregnancy == null)
|
||||
{
|
||||
currentIntervalHours = (int)preg.GestationHours();
|
||||
curStage = Stage.Pregnant;
|
||||
pregnancy = preg;
|
||||
// If this womb isn't marked pregnant, search for pregnancies that have no womb and claim one
|
||||
foreach (Hediff_BasePregnancy preg in parent.pawn.health.hediffSet.GetHediffs<Hediff_BasePregnancy>())
|
||||
{
|
||||
if (preg.GetMenstruationComp() == null)
|
||||
{
|
||||
currentIntervalHours = (int)preg.GestationHours();
|
||||
curStage = Stage.Pregnant;
|
||||
pregnancy = preg;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (parent.pawn.IsAnimal())
|
||||
|
|
Loading…
Reference in a new issue