mirror of
https://gitgud.io/lutepickle/rjw_menstruation.git
synced 2024-08-14 22:46:52 +00:00
Fix Props not being initialized yet when calculating periodic ovulator race cycles
This commit is contained in:
parent
2dd9147afc
commit
8718cca299
3 changed files with 13 additions and 3 deletions
Binary file not shown.
|
@ -1143,7 +1143,7 @@ namespace RJW_Menstruation
|
|||
if (cums == null) cums = new List<Cum>();
|
||||
if (eggs == null) eggs = new List<Egg>();
|
||||
|
||||
Notify_UpdatedGenes();
|
||||
PreInitialize();
|
||||
|
||||
if (Props.infertile)
|
||||
{
|
||||
|
@ -1180,6 +1180,11 @@ namespace RJW_Menstruation
|
|||
initError = false;
|
||||
}
|
||||
|
||||
protected virtual void PreInitialize()
|
||||
{
|
||||
Notify_UpdatedGenes();
|
||||
}
|
||||
|
||||
protected virtual void InitializeExtraValues()
|
||||
{
|
||||
}
|
||||
|
|
|
@ -21,10 +21,15 @@ namespace RJW_Menstruation
|
|||
|
||||
public new CompProperties_PeriodicOvulator Props;
|
||||
|
||||
protected override void PreInitialize()
|
||||
{
|
||||
base.PreInitialize();
|
||||
Props = (CompProperties_PeriodicOvulator)props;
|
||||
}
|
||||
|
||||
protected override void InitializeExtraValues()
|
||||
{
|
||||
base.InitializeExtraValues();
|
||||
Props = (CompProperties_PeriodicOvulator)props;
|
||||
base.InitializeExtraValues();
|
||||
if (averageCycleIntervalTicks < 0)
|
||||
{
|
||||
averageCycleIntervalTicks = (int)(Props.cycleIntervalDays.RandomInRange * GenDate.TicksPerDay / cycleSpeed);
|
||||
|
|
Loading…
Reference in a new issue