mirror of
https://gitgud.io/lutepickle/rjw_menstruation.git
synced 2024-08-14 22:46:52 +00:00
Some input sanitization for the egg life span and ovulation genes
This commit is contained in:
parent
fcbc19825e
commit
02b0045fb3
1 changed files with 3 additions and 2 deletions
|
@ -681,7 +681,6 @@ namespace RJW_Menstruation
|
||||||
opcache = -1;
|
opcache = -1;
|
||||||
|
|
||||||
if (Pawn.genes == null || !ModsConfig.BiotechActive) return;
|
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>()))
|
||||||
{
|
{
|
||||||
if (extension == null) continue;
|
if (extension == null) continue;
|
||||||
|
@ -692,6 +691,8 @@ namespace RJW_Menstruation
|
||||||
ovulationFactor *= extension.ovulationFactor;
|
ovulationFactor *= extension.ovulationFactor;
|
||||||
if (extension.noBleeding) noBleeding = true;
|
if (extension.noBleeding) noBleeding = true;
|
||||||
}
|
}
|
||||||
|
if (eggLifeSpanTicks < 0) eggLifeSpanTicks = 0;
|
||||||
|
if (ovulationFactor < 0f) ovulationFactor = 0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool ShouldSimulate()
|
public bool ShouldSimulate()
|
||||||
|
|
Loading…
Reference in a new issue