mirror of
https://gitgud.io/lutepickle/rjw_menstruation.git
synced 2024-08-14 22:46:52 +00:00
Properly set the current interval hours on pregnancies. Again.
This commit is contained in:
parent
d1ceebb4e7
commit
f63a66efd0
1 changed files with 2 additions and 2 deletions
|
@ -1202,14 +1202,12 @@ namespace RJW_Menstruation
|
|||
PregnancyHelper.PregnancyDecider(parent.pawn, egg.fertilizer);
|
||||
// I hate having to do this, but it gets the newest pregnancy
|
||||
pregnancy = parent.pawn.health.hediffSet.GetHediffs<Hediff_BasePregnancy>().MaxBy(hediff => hediff.loadID);
|
||||
currentIntervalHours = (int)pregnancy?.GestationHours();
|
||||
pregnant = true;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
pregnancy = Hediff_BasePregnancy.Create<Hediff_MultiplePregnancy>(parent.pawn, egg.fertilizer);
|
||||
currentIntervalHours = (int)pregnancy?.GestationHours();
|
||||
pregnant = true;
|
||||
deadeggs.Add(egg);
|
||||
}
|
||||
|
@ -1695,6 +1693,8 @@ namespace RJW_Menstruation
|
|||
return (int)(Props.bleedingIntervalDays * 24 * (1 + Rand.Range(-cycleVariability, cycleVariability) * 0.5f * variabilityFactor) / (1 + (cycleSpeed - 1) * 0.5f));
|
||||
case Stage.Recover:
|
||||
return (int)(Props.recoveryIntervalDays * 24 * Rand.Range(-0.05f, 0.05f));
|
||||
case Stage.Pregnant:
|
||||
return (int)MenstruationUtility.GestationHours(pregnancy);
|
||||
default: // Often unused
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue