mirror of
https://gitgud.io/lutepickle/rjw_menstruation.git
synced 2024-08-14 22:46:52 +00:00
Add a check for BabyHalfAge <= 0, just to be sure
This commit is contained in:
parent
2872d42f67
commit
1a452cb120
2 changed files with 6 additions and 4 deletions
Binary file not shown.
|
@ -67,14 +67,16 @@ namespace RJW_Menstruation
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
float res;
|
float res = 0;
|
||||||
List<LifeStageAge> ages = parent.pawn.RaceProps.lifeStageAges;
|
List<LifeStageAge> ages = parent.pawn.RaceProps.lifeStageAges;
|
||||||
if (ages.NullOrEmpty() || ages.Count == 1)
|
if (ages?.Count > 1)
|
||||||
res = 1.2f / 2; // Default to human
|
res = ages[1].minAge / 2;
|
||||||
else res = ages[1].minAge / 2;
|
|
||||||
|
if (res <= 0) res = 1.2f / 2; // Default to human
|
||||||
|
|
||||||
if (RJWPregnancySettings.phantasy_pregnancy)
|
if (RJWPregnancySettings.phantasy_pregnancy)
|
||||||
res /= GenDate.DaysPerYear;
|
res /= GenDate.DaysPerYear;
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue