diff --git a/1.4/Assemblies/RJW_Menstruation.dll b/1.4/Assemblies/RJW_Menstruation.dll index 0e76721..89490e2 100644 Binary files a/1.4/Assemblies/RJW_Menstruation.dll and b/1.4/Assemblies/RJW_Menstruation.dll differ diff --git a/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_InducedOvulator.cs b/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_InducedOvulator.cs index 0bea073..ccc5b34 100644 --- a/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_InducedOvulator.cs +++ b/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_InducedOvulator.cs @@ -15,6 +15,14 @@ namespace RJW_Menstruation public class HediffComp_InducedOvulator : HediffComp_Menstruation { + protected bool hadOvulatoryStage = false; // Regardless of whether an egg was actually produced + + protected override void InitializeExtraValues() + { + base.InitializeExtraValues(); + hadOvulatoryStage |= IsEggExist; + } + public override string GetCurStageDesc { get @@ -46,12 +54,31 @@ namespace RJW_Menstruation return Mathf.CeilToInt((Pawn.relations?.ChildrenCount ?? 0) / Configurations.ImplantationChanceDefault); } + public override void CompExposeData() + { + base.CompExposeData(); + Scribe_Values.Look(ref hadOvulatoryStage, "hadOvulatoryStage", false); + } + protected override void GoOvulatoryStage() { estrusflag = false; + hadOvulatoryStage = false; GoNextStage(Stage.Luteal); } + protected override void OvulatoryAction() + { + base.OvulatoryAction(); + hadOvulatoryStage = true; + } + + protected override void LutealAction() + { + base.LutealAction(); + if (curStage != Stage.Luteal) hadOvulatoryStage = false; + } + protected override void AfterCumIn(Pawn cummer) { base.AfterCumIn(cummer); @@ -70,7 +97,7 @@ namespace RJW_Menstruation case Stage.Ovulatory: return true; case Stage.Luteal: - return IsEggExist && curStageTicks < EggLifespanTicks; + return hadOvulatoryStage && curStageTicks < EggLifespanTicks; default: return false; } @@ -88,7 +115,7 @@ namespace RJW_Menstruation case Stage.Ovulatory: return true; case Stage.Luteal: - return IsEggExist && curStageTicks < EggLifespanTicks; + return hadOvulatoryStage && curStageTicks < EggLifespanTicks; default: return false; }