mirror of
https://gitgud.io/lutepickle/rjw_menstruation.git
synced 2024-08-14 22:46:52 +00:00
Fix pregnancy progress in the womb gizmo again. Also have an undiscovered pregnancy look like a steady luteal progress.
This commit is contained in:
parent
f63a66efd0
commit
610bffeaa7
2 changed files with 12 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue