From c6f08d76018d97828fa2fd264e112155873c4815 Mon Sep 17 00:00:00 2001 From: lutepickle <28810-lutepickle@users.noreply.gitgud.io> Date: Sat, 27 Aug 2022 12:42:35 -0700 Subject: [PATCH] Catch a womb with pregnancy set and not in the phase, which can happen when futzing with the debug actions. --- .../RJW_Menstruation/HediffComps/HediffComp_Menstruation.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/1.3/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Menstruation.cs b/1.3/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Menstruation.cs index c31efe3..bd62715 100644 --- a/1.3/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Menstruation.cs +++ b/1.3/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Menstruation.cs @@ -564,6 +564,12 @@ namespace RJW_Menstruation return; } + if (Pregnancy != null && curStage != Stage.Pregnant) + { + Log.Warning($"{Pawn}'s womb has a pregnancy, but was not in the pregnant stage"); + curStage = Stage.Pregnant; + } + CumOut(); if (pregnancy == null && Pawn.health.capacities.GetLevel(xxx.reproduction) <= 0) curStage = Stage.Young; switch (curStage)