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 fdb3c07..fc07cb6 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 @@ -500,7 +500,17 @@ namespace RJW_Menstruation { get { - return Mathf.Clamp01(curStageHrs / CurStageIntervalHours); + if (pregnancy == null) return Mathf.Clamp01(curStageHrs / CurStageIntervalHours); + if (pregnancy.is_discovered || Configurations.infoDetail == Configurations.DetailLevel.All) return pregnancy.Severity; + + // Luteal will appear to progress, hitting the end of the phase when the pregnancy is discovered + float discoveryTime = 0.5f; + if (parent.pawn.story?.bodyType == BodyTypeDefOf.Thin) discoveryTime = 0.25f; + else if (parent.pawn.story?.bodyType == BodyTypeDefOf.Female) discoveryTime = 0.35f; + // Estimated; there's no way to get the exact value after the fact without writing it into the save + float lutealProgressWhenImplanted = Math.Min(0.5f, maxImplantDelayHours / (Props.lutealIntervalDays * 24)); + + return GenMath.LerpDouble(0, discoveryTime, lutealProgressWhenImplanted, 1.0f, pregnancy.Severity); } } diff --git a/changelogs.txt b/changelogs.txt index afc00c4..9dbd28c 100644 --- a/changelogs.txt +++ b/changelogs.txt @@ -1,5 +1,6 @@ Version 1.0.7.1 - Null reference error fix for multiple wombs when one is pregnant. + - Fix the progress bar on pregnancy again. Also make undiscovered pregnancies a little more subtle. - Nipple size/transition system rewritten to be simpler under the hood. Should work with existing saves, but you might find sizes to be different, especially for very large or very small breasts. - Replaced HugsLib-based scheduler with normal ticking. This should reduce some 'phantom cycle' bugs. - Redone calculation to determine low eggs remaining. This should cause climacteric to be applied at a more appropriate time in the pawn's life, especially for those with very long cycles.