Fix Props not being initialized yet when calculating periodic ovulator race cycles
This commit is contained in:
parent
2dd9147afc
commit
8718cca299
Binary file not shown.
|
@ -1143,7 +1143,7 @@ namespace RJW_Menstruation
|
||||||
if (cums == null) cums = new List<Cum>();
|
if (cums == null) cums = new List<Cum>();
|
||||||
if (eggs == null) eggs = new List<Egg>();
|
if (eggs == null) eggs = new List<Egg>();
|
||||||
|
|
||||||
Notify_UpdatedGenes();
|
PreInitialize();
|
||||||
|
|
||||||
if (Props.infertile)
|
if (Props.infertile)
|
||||||
{
|
{
|
||||||
|
@ -1180,6 +1180,11 @@ namespace RJW_Menstruation
|
||||||
initError = false;
|
initError = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected virtual void PreInitialize()
|
||||||
|
{
|
||||||
|
Notify_UpdatedGenes();
|
||||||
|
}
|
||||||
|
|
||||||
protected virtual void InitializeExtraValues()
|
protected virtual void InitializeExtraValues()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,10 +21,15 @@ namespace RJW_Menstruation
|
||||||
|
|
||||||
public new CompProperties_PeriodicOvulator Props;
|
public new CompProperties_PeriodicOvulator Props;
|
||||||
|
|
||||||
|
protected override void PreInitialize()
|
||||||
|
{
|
||||||
|
base.PreInitialize();
|
||||||
|
Props = (CompProperties_PeriodicOvulator)props;
|
||||||
|
}
|
||||||
|
|
||||||
protected override void InitializeExtraValues()
|
protected override void InitializeExtraValues()
|
||||||
{
|
{
|
||||||
base.InitializeExtraValues();
|
base.InitializeExtraValues();
|
||||||
Props = (CompProperties_PeriodicOvulator)props;
|
|
||||||
if (averageCycleIntervalTicks < 0)
|
if (averageCycleIntervalTicks < 0)
|
||||||
{
|
{
|
||||||
averageCycleIntervalTicks = (int)(Props.cycleIntervalDays.RandomInRange * GenDate.TicksPerDay / cycleSpeed);
|
averageCycleIntervalTicks = (int)(Props.cycleIntervalDays.RandomInRange * GenDate.TicksPerDay / cycleSpeed);
|
||||||
|
|
Loading…
Reference in New Issue