mirror of
https://gitgud.io/lutepickle/rjw_menstruation.git
synced 2024-08-14 22:46:52 +00:00
Add div/0 check to AfterSimulator just in case something goes weird and it thinks there are no comps
This commit is contained in:
parent
49db91ca4d
commit
0e8c025429
1 changed files with 1 additions and 1 deletions
|
@ -1101,7 +1101,7 @@ namespace RJW_Menstruation
|
||||||
if (EggHealth < 1f)
|
if (EggHealth < 1f)
|
||||||
{
|
{
|
||||||
if (sexNeed == null) sexNeed = Pawn.needs.TryGetNeed(VariousDefOf.SexNeed);
|
if (sexNeed == null) sexNeed = Pawn.needs.TryGetNeed(VariousDefOf.SexNeed);
|
||||||
if (sexNeed?.CurLevel < 0.5) sexNeed.CurLevel += 0.01f / Pawn.GetMenstruationComps().Count();
|
if (sexNeed?.CurLevel < 0.5) sexNeed.CurLevel += 0.01f / Math.Max(1, Pawn.GetMenstruationComps().Count());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue