Reformat RandomOvulationChance

This commit is contained in:
lutepickle 2024-02-16 20:47:30 -08:00
parent f79050483d
commit ebb486179b
2 changed files with 3 additions and 9 deletions

View File

@ -110,9 +110,6 @@ namespace RJW_Menstruation
else return base.ShouldBeInEstrus(); else return base.ShouldBeInEstrus();
} }
protected override float RandomOvulationChance() protected override float RandomOvulationChance => 0;
{
return 0;
}
} }
} }

View File

@ -1896,16 +1896,13 @@ namespace RJW_Menstruation
else return Rand.Range(0.6f, 1.0f); else return Rand.Range(0.6f, 1.0f);
} }
protected virtual float RandomOvulationChance() protected virtual float RandomOvulationChance => (float)Props.ovulationIntervalHours / GenDate.HoursPerDay;
{
return (float)Props.ovulationIntervalHours / GenDate.HoursPerDay;
}
protected Stage RandomStage() protected Stage RandomStage()
{ {
Stage stage = Rand.ElementByWeight( Stage stage = Rand.ElementByWeight(
Stage.Follicular, Props.follicularIntervalDays - Props.bleedingIntervalDays, Stage.Follicular, Props.follicularIntervalDays - Props.bleedingIntervalDays,
Stage.Ovulatory, RandomOvulationChance(), Stage.Ovulatory, RandomOvulationChance,
Stage.Luteal, Props.lutealIntervalDays, Stage.Luteal, Props.lutealIntervalDays,
Stage.Bleeding, Props.bleedingIntervalDays); Stage.Bleeding, Props.bleedingIntervalDays);