From 3498caf3a2855be8d5fbf6f0b5306211b6027b2e Mon Sep 17 00:00:00 2001 From: lutepickle <28810-lutepickle@users.noreply.gitgud.io> Date: Tue, 5 Dec 2023 16:23:23 -0800 Subject: [PATCH] Let <= 0 age fertility stay in the patches --- .../RJW_Menstruation/RJW_Menstruation/Patch/Biotech_Patch.cs | 1 + .../RJW_Menstruation/RJW_Menstruation/Patch/RJW_Patch.cs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) 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 6950552..aaf24de 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 @@ -224,6 +224,7 @@ namespace RJW_Menstruation { public static void Postfix(ref float __result, Pawn pawn) { + if (__result <= 0.0f) return; if (pawn.GetMenstruationComps().Any(comp => comp.CalculatingOvulationChance)) __result = 1.0f; } diff --git a/1.4/source/RJW_Menstruation/RJW_Menstruation/Patch/RJW_Patch.cs b/1.4/source/RJW_Menstruation/RJW_Menstruation/Patch/RJW_Patch.cs index 5176542..3f84b26 100644 --- a/1.4/source/RJW_Menstruation/RJW_Menstruation/Patch/RJW_Patch.cs +++ b/1.4/source/RJW_Menstruation/RJW_Menstruation/Patch/RJW_Patch.cs @@ -379,8 +379,9 @@ namespace RJW_Menstruation { public static void Postfix(ref float __result, Pawn pawn) { + if (__result <= 0.0f) return; if (pawn.GetMenstruationComps().Any(comp => comp.CalculatingOvulationChance)) - __result = 1f; + __result = 1.0f; } } }