mirror of
https://gitgud.io/lutepickle/rjw_menstruation.git
synced 2024-08-14 22:46:52 +00:00
For induced ovulators, use a variable instead of EggExist for estrus/dangerday in luteal.
This commit is contained in:
parent
3de006dbbf
commit
2e2e2a120c
2 changed files with 29 additions and 2 deletions
Binary file not shown.
|
@ -15,6 +15,14 @@ namespace RJW_Menstruation
|
|||
|
||||
public class HediffComp_InducedOvulator : HediffComp_Menstruation
|
||||
{
|
||||
protected bool hadOvulatoryStage = false; // Regardless of whether an egg was actually produced
|
||||
|
||||
protected override void InitializeExtraValues()
|
||||
{
|
||||
base.InitializeExtraValues();
|
||||
hadOvulatoryStage |= IsEggExist;
|
||||
}
|
||||
|
||||
public override string GetCurStageDesc
|
||||
{
|
||||
get
|
||||
|
@ -46,12 +54,31 @@ namespace RJW_Menstruation
|
|||
return Mathf.CeilToInt((Pawn.relations?.ChildrenCount ?? 0) / Configurations.ImplantationChanceDefault);
|
||||
}
|
||||
|
||||
public override void CompExposeData()
|
||||
{
|
||||
base.CompExposeData();
|
||||
Scribe_Values.Look(ref hadOvulatoryStage, "hadOvulatoryStage", false);
|
||||
}
|
||||
|
||||
protected override void GoOvulatoryStage()
|
||||
{
|
||||
estrusflag = false;
|
||||
hadOvulatoryStage = false;
|
||||
GoNextStage(Stage.Luteal);
|
||||
}
|
||||
|
||||
protected override void OvulatoryAction()
|
||||
{
|
||||
base.OvulatoryAction();
|
||||
hadOvulatoryStage = true;
|
||||
}
|
||||
|
||||
protected override void LutealAction()
|
||||
{
|
||||
base.LutealAction();
|
||||
if (curStage != Stage.Luteal) hadOvulatoryStage = false;
|
||||
}
|
||||
|
||||
protected override void AfterCumIn(Pawn cummer)
|
||||
{
|
||||
base.AfterCumIn(cummer);
|
||||
|
@ -70,7 +97,7 @@ namespace RJW_Menstruation
|
|||
case Stage.Ovulatory:
|
||||
return true;
|
||||
case Stage.Luteal:
|
||||
return IsEggExist && curStageTicks < EggLifespanTicks;
|
||||
return hadOvulatoryStage && curStageTicks < EggLifespanTicks;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
@ -88,7 +115,7 @@ namespace RJW_Menstruation
|
|||
case Stage.Ovulatory:
|
||||
return true;
|
||||
case Stage.Luteal:
|
||||
return IsEggExist && curStageTicks < EggLifespanTicks;
|
||||
return hadOvulatoryStage && curStageTicks < EggLifespanTicks;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue