Track birth counts with the pregenerated babies

This commit is contained in:
lutepickle 2023-03-17 09:34:45 -07:00
parent f7348ccee8
commit 5924c73b2f
3 changed files with 8 additions and 0 deletions

Binary file not shown.

View File

@ -214,6 +214,10 @@ namespace RJW_Menstruation
PregnancyUtility.ApplyBirthOutcome(thisOutcome, quality, ritual, genes, geneticMother, birtherThing, thisFather, doctor, lordJobRitual, assignments);
// No more babies if mom dies halfway through. Unrealistic maybe, but saves a lot of headache in ApplyBirthOutcome
if (mother.health.Dead) break;
if (xxx.is_human(baby))
mother.records.Increment(xxx.CountOfBirthHuman);
else if (xxx.is_animal(baby))
mother.records.Increment(xxx.CountOfBirthAnimal);
thisOutcome = ((RitualOutcomeEffectWorker_ChildBirth)precept_Ritual.outcomeEffect).GetOutcome(birthQuality, null);
} while (comp.HasBaby);
@ -263,6 +267,10 @@ namespace RJW_Menstruation
PregnancyUtility.ApplyBirthOutcome(outcome, quality, ritual, genes, geneticMother, birtherThing, thisFather, doctor, lordJobRitual, assignments);
if (mother.health.Dead) break;
if (xxx.is_human(baby))
mother.records.Increment(xxx.CountOfBirthHuman);
else if (xxx.is_animal(baby))
mother.records.Increment(xxx.CountOfBirthAnimal);
} while (comp.HasBaby);
// The ritual version doesn't use the return value, either