diff --git a/1.4/Assemblies/RJW_Menstruation.dll b/1.4/Assemblies/RJW_Menstruation.dll index 2452c28..c94be92 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_Menstruation.cs b/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Menstruation.cs index 6791f86..fb79dd3 100644 --- a/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Menstruation.cs +++ b/1.4/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Menstruation.cs @@ -1143,7 +1143,7 @@ namespace RJW_Menstruation if (cums == null) cums = new List(); if (eggs == null) eggs = new List(); - Notify_UpdatedGenes(); + PreInitialize(); if (Props.infertile) { @@ -1180,6 +1180,11 @@ namespace RJW_Menstruation initError = false; } + protected virtual void PreInitialize() + { + Notify_UpdatedGenes(); + } + protected virtual void InitializeExtraValues() { } 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 eb1ac1a..247149c 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 @@ -21,10 +21,15 @@ namespace RJW_Menstruation public new CompProperties_PeriodicOvulator Props; + protected override void PreInitialize() + { + base.PreInitialize(); + Props = (CompProperties_PeriodicOvulator)props; + } + protected override void InitializeExtraValues() { - base.InitializeExtraValues(); - Props = (CompProperties_PeriodicOvulator)props; + base.InitializeExtraValues(); if (averageCycleIntervalTicks < 0) { averageCycleIntervalTicks = (int)(Props.cycleIntervalDays.RandomInRange * GenDate.TicksPerDay / cycleSpeed); @@ -40,8 +45,8 @@ namespace RJW_Menstruation protected override float RaceCyclesPerYear() { // Don't bother trying to work seasonal breeding into the math - // Due to the enormous variation in possible cycle gaps, cheat and base it off the individual - return averageCycleIntervalTicks * cycleSpeed / GenDate.TicksPerYear; // cancel out their cycleSpeed from initialization to get their "normal" speed + // Base it off of the shortest cycle interval of the vagina + return GenDate.DaysPerYear / (Props.cycleIntervalDays.TrueMin / Configurations.CycleAccelerationDefault); } protected override void BeforeSimulator() diff --git a/changelogs.txt b/changelogs.txt index 85e123c..f427a5b 100644 --- a/changelogs.txt +++ b/changelogs.txt @@ -2,6 +2,7 @@ Version 1.0.9.0 - Fix errors when opening the womb dialog of some low fertility pawns. - Updated Traditional Chinese translation by Hydrogen. - New options to update wombs more or less often, defaulting to every hour. + - More generous egg allocation for newly spawned periodic ovulators. - Menstruation-related genes will now stay on females during initial pawn setup. Version 1.0.8.9