Skip to content
Snippets Groups Projects
Commit 6171ec02 authored by Ed86's avatar Ed86
Browse files

description/memo to fertility-lifestage code

parent 562e2037
No related branches found
No related tags found
No related merge requests found
......@@ -65,16 +65,19 @@ namespace rjw
}
else
{
foreach (LifeStageAge lifestage in race.lifeStageAges) {
foreach (LifeStageAge lifestage in race.lifeStageAges)
{
if (lifestage.def.reproductive)
//presumably teen stage
if (startAge == 0f && startMaxAge == 0f) {
if (startAge == 0f && startMaxAge == 0f)
{
startAge = lifestage.minAge;
startMaxAge = (Mathf.Max(startAge + (startAge + endAge) * 0.08f, startAge));
}
//presumably adult stage
else {
if (startMaxAge > lifestage.minAge)
else
{
if (startMaxAge > lifestage.minAge) // ensure peak fertility stays at start or a bit before adult stage
startMaxAge = lifestage.minAge;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment