Might as well refactor RecoveryAction out to match the rest

This commit is contained in:
lutepickle 2022-05-31 08:25:12 -07:00
parent 32ae526b0f
commit e29c7a732a
3 changed files with 27 additions and 24 deletions

Binary file not shown.

View file

@ -1464,6 +1464,31 @@ namespace RJW_Menstruation
}
}
protected virtual void RecoverAction()
{
if (curStageHrs >= recoveryIntervalhours)
{
if (Configurations.EnableMenopause && ovarypower < OvaryPowerThreshold)
{
GoNextStage(Stage.ClimactericFollicular);
}
else if (parent.pawn.health.capacities.GetLevel(xxx.reproduction) == 0)
{
GoNextStage(Stage.Young);
}
else
{
follicularIntervalhours = PeriodRandomizer(follicularIntervalhours, Props.deviationFactor);
GoNextStage(Stage.Follicular);
}
}
else
{
curStageHrs += Configurations.CycleAcceleration;
StayCurrentStage();
}
}
protected virtual void YoungAction()
{
if (!Configurations.EnableMenopause && ovarypower < 0 && ovarypower > -10000)
@ -1662,30 +1687,7 @@ namespace RJW_Menstruation
action = PregnantAction;
break;
case Stage.Recover:
action = delegate
{
if (curStageHrs >= recoveryIntervalhours)
{
if (Configurations.EnableMenopause && ovarypower < OvaryPowerThreshold)
{
GoNextStage(Stage.ClimactericFollicular);
}
else if (parent.pawn.health.capacities.GetLevel(xxx.reproduction) == 0)
{
GoNextStage(Stage.Young);
}
else
{
follicularIntervalhours = PeriodRandomizer(follicularIntervalhours, Props.deviationFactor);
GoNextStage(Stage.Follicular);
}
}
else
{
curStageHrs += Configurations.CycleAcceleration;
StayCurrentStage();
}
};
action = RecoverAction;
break;
case Stage.None:
action = delegate

View file

@ -1,4 +1,5 @@
Version 1.0.6.5
- Handle climacteric induced ovulators a bit better.
- Add a brief description when mousing over the current phase in the womb dialog.
Version 1.0.6.4