diff --git a/Source/Genes/Breeding/ConditionalStatAffecters/ConditionalStatAffecter_ManyChildren.cs b/Source/Genes/Breeding/ConditionalStatAffecters/ConditionalStatAffecter_ManyChildren.cs index 3743889..c483eb3 100644 --- a/Source/Genes/Breeding/ConditionalStatAffecters/ConditionalStatAffecter_ManyChildren.cs +++ b/Source/Genes/Breeding/ConditionalStatAffecters/ConditionalStatAffecter_ManyChildren.cs @@ -20,6 +20,10 @@ namespace RJW_Genes if (req.Thing is Pawn pawn) { + // Do nothing if Pawn is Baby or Child (#25) + if (!pawn.ageTracker.Adult) + return false; + if (GeneUtility.HasGeneNullCheck(pawn, GeneDefOf.rjw_genes_hardwired_progenity)) { // This "middle" Conditional Stat Affecter only fires if the other one does not apply diff --git a/Source/Genes/Breeding/ConditionalStatAffecters/ConditionalStatAffecter_NoChildren.cs b/Source/Genes/Breeding/ConditionalStatAffecters/ConditionalStatAffecter_NoChildren.cs index eb63ff1..4f50994 100644 --- a/Source/Genes/Breeding/ConditionalStatAffecters/ConditionalStatAffecter_NoChildren.cs +++ b/Source/Genes/Breeding/ConditionalStatAffecters/ConditionalStatAffecter_NoChildren.cs @@ -25,6 +25,10 @@ namespace RJW_Genes if (req.Thing is Pawn pawn) { + // Do nothing if Pawn is Baby or Child (#25) + if (!pawn.ageTracker.Adult) + return false; + if (GeneUtility.HasGeneNullCheck(pawn, GeneDefOf.rjw_genes_hardwired_progenity)) { return pawn.relations.ChildrenCount == 0; diff --git a/Source/Genes/Breeding/ConditionalStatAffecters/ConditionalStatAffecter_VeryManyChildren.cs b/Source/Genes/Breeding/ConditionalStatAffecters/ConditionalStatAffecter_VeryManyChildren.cs index aea272b..e14d4f1 100644 --- a/Source/Genes/Breeding/ConditionalStatAffecters/ConditionalStatAffecter_VeryManyChildren.cs +++ b/Source/Genes/Breeding/ConditionalStatAffecters/ConditionalStatAffecter_VeryManyChildren.cs @@ -20,6 +20,10 @@ namespace RJW_Genes if (req.Thing is Pawn pawn) { + // Do nothing if Pawn is Baby or Child (#25) + if (!pawn.ageTracker.Adult) + return false; + if (GeneUtility.HasGeneNullCheck(pawn, GeneDefOf.rjw_genes_hardwired_progenity)) { return pawn.relations.ChildrenCount >= THRESHOLD_FOR_CHILDREN;