From 50310988ca3836a9f31834578e6ab111c03a33dd Mon Sep 17 00:00:00 2001 From: lutepickle <28810-lutepickle@users.noreply.gitgud.io> Date: Sun, 11 Feb 2024 10:46:47 -0800 Subject: [PATCH] Be sure the periodic can go into anestrus if it initializes into ovulatory --- .../HediffComps/HediffComp_PeriodicOvulator.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_PeriodicOvulator.cs b/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_PeriodicOvulator.cs index eb344c3..e663ec2 100644 --- a/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_PeriodicOvulator.cs +++ b/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_PeriodicOvulator.cs @@ -29,14 +29,14 @@ namespace RJW_Menstruation protected override void InitializeExtraValues() { - base.InitializeExtraValues(); + base.InitializeExtraValues(); if (averageCycleIntervalTicks < 0) { averageCycleIntervalTicks = (int)(Props.cycleIntervalDays.RandomInRange * GenDate.TicksPerDay / cycleSpeed); if (ticksToNextCycle < -50000) ticksToNextCycle = Rand.Range(0, averageCycleIntervalTicks); // Make the cutoff halfway into cycle, just to be sure there isn't a double-cycle the first time - if ((curStage == Stage.Follicular || curStage == Stage.Luteal || curStage == Stage.Bleeding) + if ((curStage == Stage.Follicular || curStage == Stage.Ovulatory || curStage == Stage.Luteal || curStage == Stage.Bleeding) && (averageCycleIntervalTicks - ticksToNextCycle) / 2 >= GenDate.TicksPerDay * (Props.follicularIntervalDays + Props.lutealIntervalDays) / cycleSpeed) GoNextStage(Stage.Anestrus); }