Properly calculate the birth recovery time

This commit is contained in:
lutepickle 2022-08-31 15:29:31 -07:00
parent 9841aa145d
commit 1b10200953
4 changed files with 7 additions and 6 deletions

Binary file not shown.

View file

@ -1525,14 +1525,14 @@ namespace RJW_Menstruation
{
if (curStageHrs >= currentIntervalHours)
{
if (Configurations.EnableMenopause && ovarypower < OvaryPowerThreshold)
{
GoNextStage(Stage.ClimactericFollicular);
}
else if (Pawn.health.capacities.GetLevel(xxx.reproduction) == 0)
if (Pawn.health.capacities.GetLevel(xxx.reproduction) == 0)
{
GoNextStage(Stage.Young);
}
else if (Configurations.EnableMenopause && ovarypower < OvaryPowerThreshold)
{
GoNextStage(Stage.ClimactericFollicular);
}
else
{
GoNextStage(Stage.Follicular);
@ -1700,7 +1700,7 @@ namespace RJW_Menstruation
case Stage.ClimactericBleeding:
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));
return (int)(Props.recoveryIntervalDays * 24 * Rand.Range(0.95f, 1.05f));
case Stage.Pregnant:
return (int)MenstruationUtility.GestationHours(pregnancy);
default: // Often unused

View file

@ -1,6 +1,7 @@
Version 1.0.7.4
- Fix errors when using mods with bad HediffCompProperties.
- Fix egg appearing to be fertilized in womb display when it isn't.
- Fix post-birth recovery being instant or very short.
- Induced ovulators will start with a lower number of eggs, but reasonably enough for a long breeding life. IUDs or sex with poor fertility partners may result in early menopause.
- Pawns on caravans and in transport pods will still be simulated.
- Updated max size areola images by wruf.