diff --git a/1.4/Assemblies/RJW_Menstruation.dll b/1.4/Assemblies/RJW_Menstruation.dll index 85e2d73..97337d7 100644 Binary files a/1.4/Assemblies/RJW_Menstruation.dll and b/1.4/Assemblies/RJW_Menstruation.dll differ diff --git a/1.4/MilkModule/Assemblies/MilkModule.dll b/1.4/MilkModule/Assemblies/MilkModule.dll index c56319f..1881466 100644 Binary files a/1.4/MilkModule/Assemblies/MilkModule.dll and b/1.4/MilkModule/Assemblies/MilkModule.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 2bdf2bd..d015752 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 @@ -1610,6 +1610,8 @@ namespace RJW_Menstruation eggs.Add(new Egg((int)(EggLifespanHours / CycleFactor))); ++ovulated; } + if(ovulated > ovarypower) ovulated = Math.Min(ovarypower, eggstack); + ovarypower -= ovulated; eggstack = 0; if (Configurations.Debug && ovulated != toOvulate) diff --git a/1.4/source/RJW_Menstruation/RJW_Menstruation/Patch/Biotech_Patch.cs b/1.4/source/RJW_Menstruation/RJW_Menstruation/Patch/Biotech_Patch.cs index 6a75e94..df6584b 100644 --- a/1.4/source/RJW_Menstruation/RJW_Menstruation/Patch/Biotech_Patch.cs +++ b/1.4/source/RJW_Menstruation/RJW_Menstruation/Patch/Biotech_Patch.cs @@ -192,27 +192,21 @@ namespace RJW_Menstruation } } - [HarmonyPatch(typeof(Pawn_GeneTracker), "AddGene", new Type[] { typeof(Gene), typeof(bool) })] + [HarmonyPatch(typeof(Pawn_GeneTracker), "AddGene", new Type[] {typeof(Gene), typeof(bool)})] public class AddGene_Patch { public static bool Prefix(ref Gene __result, Gene gene, Pawn ___pawn) { - if (!VariousDefOf.WombGenes.Contains(gene.def)) return true; - bool keepGene; - if (PawnGenerator.IsBeingGenerated(___pawn)) + if(VariousDefOf.WombGenes.Contains(gene.def) && !___pawn.GetMenstruationComps().Any()) { - // During pawn generation, the vagina hediff doesn't exist yet - // So use gender to decide instead - // Not the most accurate, but close enough - keepGene = ___pawn.gender == Gender.Female; + __result = null; + return false; } - else keepGene = ___pawn.GetMenstruationComps().Any(); - if (!keepGene) __result = null; - return keepGene; + else return true; } } - [HarmonyPatch(typeof(Pawn_GeneTracker), "Notify_GenesChanged")] + [HarmonyPatch(typeof(Pawn_GeneTracker), "Notify_GenesChanged")] public class Notify_GenesChanged_Patch { public static void Postfix(Pawn_GeneTracker __instance) diff --git a/About/Manifest.xml b/About/Manifest.xml index 3299391..fc6edef 100644 --- a/About/Manifest.xml +++ b/About/Manifest.xml @@ -1,7 +1,7 @@ RJW Menstruation - 1.0.9.0 + 1.0.8.9 diff --git a/changelogs.txt b/changelogs.txt index 16390f2..f68bbbe 100644 --- a/changelogs.txt +++ b/changelogs.txt @@ -1,6 +1,3 @@ -Version 1.0.9.0 - - Menstruation-related genes will now stay on females during initial pawn setup. - Version 1.0.8.9 - Fix bug that sent pawns into menopause very early. Please use the recalculate ovary power dev action to restore lost eggs.