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
|
@ -680,8 +680,7 @@ namespace RJW_Menstruation
|
|||
noBleeding = false;
|
||||
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>()))
|
||||
{
|
||||
if (extension == null) continue;
|
||||
|
@ -692,6 +691,8 @@ namespace RJW_Menstruation
|
|||
ovulationFactor *= extension.ovulationFactor;
|
||||
if (extension.noBleeding) noBleeding = true;
|
||||
}
|
||||
if (eggLifeSpanTicks < 0) eggLifeSpanTicks = 0;
|
||||
if (ovulationFactor < 0f) ovulationFactor = 0f;
|
||||
}
|
||||
|
||||
public bool ShouldSimulate()
|
||||
|
|
Loading…
Reference in a new issue