diff --git a/1.4/Assemblies/RJW_Menstruation.dll b/1.4/Assemblies/RJW_Menstruation.dll index 24fccb9..24345de 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 ca34673..2f43120 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 @@ -1577,7 +1577,7 @@ namespace RJW_Menstruation } else if (curStageHrs >= currentIntervalHours) { - GoOvulatoryStage(); + GoNextStage(Stage.Ovulatory); } else { 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 df6584b..2ffe8b3 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 @@ -26,28 +26,33 @@ namespace RJW_Menstruation public static void Postfix(Hediff_Pregnant __instance) { HediffComp_Menstruation comp = __instance.GetMenstruationCompFromPregnancy(); + if (Configurations.Debug) Log.Message($"{comp.Pawn}'s labor starting, menstruation comp is {comp}"); if (comp == null) return; comp.Pregnancy = __instance.pawn.health.hediffSet.GetFirstHediffOfDef(HediffDefOf.PregnancyLabor); + if (Configurations.Debug) Log.Message($"New pregnancy Hediff is {comp.Pregnancy}"); } } [HarmonyPatch(typeof(Hediff_Labor), nameof(Hediff_Labor.PreRemoved))] public class Labor_PreRemoved_Patch { - public static void Postfix(Hediff_Labor __instance) + public static void PostFix(Hediff_Labor __instance) { HediffComp_Menstruation comp = __instance.GetMenstruationCompFromPregnancy(); + if (Configurations.Debug) Log.Message($"{comp.Pawn}'s initial labor ending, menstruation comp is {comp}"); if (comp == null) return; comp.Pregnancy = __instance.pawn.health.hediffSet.GetFirstHediffOfDef(HediffDefOf.PregnancyLaborPushing); + if (Configurations.Debug) Log.Message($"New pregnancy Hediff is {comp.Pregnancy}"); } } [HarmonyPatch(typeof(Hediff_LaborPushing), nameof(Hediff_LaborPushing.PreRemoved))] public class LaborPushing_PreRemoved_Patch { - public static void Postfix(Hediff_LaborPushing __instance) + public static void PostFix(Hediff_LaborPushing __instance) { HediffComp_Menstruation comp = __instance.GetMenstruationCompFromPregnancy(); + if (Configurations.Debug) Log.Message($"{comp.Pawn}'s labor pushing ending, menstruation comp is {comp}"); if (comp == null) return; comp.Pregnancy = null; } @@ -57,7 +62,7 @@ namespace RJW_Menstruation [HarmonyPatch(typeof(Hediff_Pregnant), nameof(Hediff_Pregnant.GestationProgress), MethodType.Getter)] public class Hediff_Pregnant_GestationProgess_Patch { - public static void Postfix(Hediff_Pregnant __instance, ref float __result) + public static void PostFix(Hediff_Pregnant __instance, ref float __result) { if (__result < 1f) return; Pawn pawn = __instance.pawn; @@ -69,7 +74,7 @@ namespace RJW_Menstruation [HarmonyPatch(typeof(Recipe_ExtractOvum), nameof(Recipe_ExtractOvum.AvailableReport))] public class ExtractOvum_AvailableReport_Patch { - public static void Postfix(Thing thing, ref AcceptanceReport __result) + public static void PostFix(Thing thing, ref AcceptanceReport __result) { if (!__result.Accepted) return; Pawn pawn = (Pawn)thing; @@ -92,7 +97,7 @@ namespace RJW_Menstruation [HarmonyPatch(typeof(Recipe_ExtractOvum), "OnSurgerySuccess")] public class ExtractOvum_OnSurgerySuccess_Patch { - public static void Postfix(Pawn pawn) + public static void PostFix(Pawn pawn) { List comps = pawn.GetMenstruationComps().ToList(); if (!comps.Any()) return; @@ -105,7 +110,7 @@ namespace RJW_Menstruation [HarmonyPatch(typeof(Recipe_ImplantEmbryo), nameof(Recipe_ImplantEmbryo.ApplyOnPawn))] public class ImplantEmbryo_ApplyOnPawn_Patch { - public static void Postfix(Pawn pawn) + public static void PostFix(Pawn pawn) { foreach (HediffComp_Menstruation comp in pawn.GetMenstruationComps()) comp.TakeLoosePregnancy(); @@ -115,7 +120,7 @@ namespace RJW_Menstruation [HarmonyPatch(typeof(PregnancyUtility), nameof(PregnancyUtility.ApplyBirthOutcome))] public class ApplyBirthOutcome_Breast_Patch { - public static void Postfix(Thing birtherThing) + public static void PostFix(Thing birtherThing) { if (birtherThing is Pawn pawn && !pawn.health.Dead) pawn.GetBreastComp()?.GaveBirth(); diff --git a/changelogs.txt b/changelogs.txt index 222a0e8..0037925 100644 --- a/changelogs.txt +++ b/changelogs.txt @@ -1,7 +1,6 @@ Version 1.0.8.8 - Fix pawns skipping straight to menopause instead of going through climacteric stages. - Fix father appearing as "Null" in womb dialog for some Biotech pregnancies. - - Other bug fixes - Rework ovulation mechanics. A pawn's implantation chance is now dependent only on their age. - All other fertility-altering effects instead change the odds of ovulation occuring, rolled per-egg. This chance appears in the womb dialog. - If the chance of ovulation goes above 100%, the implantation chance is increased.