mirror of
https://gitgud.io/lutepickle/rjw_menstruation.git
synced 2024-08-14 22:46:52 +00:00
Always attempt to ovulate at least one egg
This commit is contained in:
parent
bd39194fd1
commit
82dea0f425
1 changed files with 3 additions and 5 deletions
|
@ -681,10 +681,8 @@ namespace RJW_Menstruation
|
|||
opcache = -1;
|
||||
|
||||
if (Pawn.genes == null || !ModsConfig.BiotechActive) return;
|
||||
foreach (MenstruationModExtension extension in Pawn.genes.GenesListForReading.Select(gene => gene.def.GetModExtension<MenstruationModExtension>()))
|
||||
foreach (MenstruationModExtension extension in Pawn.genes.GenesListForReading.Select(gene => gene.def.GetModExtension<MenstruationModExtension>()).Where(ext => ext != null))
|
||||
{
|
||||
if (extension == null) continue;
|
||||
|
||||
eggLifeSpanTicks = (int)(eggLifeSpanTicks * extension.eggLifeTimeFactor);
|
||||
if (extension.alwaysEstrus) estrusLevel = EstrusLevel.Visible;
|
||||
else if (extension.neverEstrus) estrusLevel = EstrusLevel.None;
|
||||
|
@ -1656,7 +1654,7 @@ namespace RJW_Menstruation
|
|||
eggnum = 1f;
|
||||
}
|
||||
eggnum *= ovulationFactor;
|
||||
int toOvulate = (int)eggnum + eggstack;
|
||||
int toOvulate = Math.Max(1, (int)eggnum + eggstack);
|
||||
|
||||
int ovulated = 0;
|
||||
for (int i = 0; i < toOvulate; i++)
|
||||
|
@ -1667,7 +1665,7 @@ namespace RJW_Menstruation
|
|||
}
|
||||
ovarypower -= ovulated;
|
||||
eggstack = 0;
|
||||
if (Configurations.Debug && ovulated != toOvulate)
|
||||
if (Configurations.Debug && ovulated < toOvulate)
|
||||
Log.Message($"{Pawn} ovulated {ovulated}/{toOvulate} eggs ({OvulationChance.ToStringPercent()} chance)");
|
||||
|
||||
GoNextStage(Stage.Luteal);
|
||||
|
|
Loading…
Reference in a new issue