Fix pregnancy progress in the womb gizmo again. Also have an undiscovered pregnancy look like a steady luteal progress.

This commit is contained in:
lutepickle 2022-08-12 09:54:55 -07:00
parent f63a66efd0
commit 610bffeaa7
2 changed files with 12 additions and 1 deletions

View File

@ -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);
}
}

View File

@ -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.