diff --git a/CHANGELOG.md b/CHANGELOG.md index 1230d15..629613f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,7 +31,7 @@ - Pawns with "rjw_genes_no_sexneed" wont go raping (or atleast way less, #100) - Extra Nullcheck for Genes in Orgasmic Mytosis (#95) - Orgasmic Mytosis Pawns *should* inherit the Xenotypename and favorite colour now - +- Babies should not have "SexChangeThoughts" anymore when they had a (fe)male-only gene (#103) **Changes**: diff --git a/Source/Genes/Gender/GenderUtility.cs b/Source/Genes/Gender/GenderUtility.cs index 88aa063..15c7c02 100644 --- a/Source/Genes/Gender/GenderUtility.cs +++ b/Source/Genes/Gender/GenderUtility.cs @@ -101,5 +101,20 @@ namespace RJW_Genes pawn.health.RemoveHediff(hediff); } } + + /// + /// This check helps to get babies after birth, if the pawn was born with the gene it does not need to have thoughts. + /// There are very different ways to do the life stages, and there are also HAR people still around, + /// so instead of checking for stages I intentionally check for the biological ticks to be very low (that they can only exist basically if they are born right before). + /// Issue is tracked in #103. + /// + /// + public static void RemoveSexChangeThoughtsIfTooYoung(Pawn pawn) + { + if (pawn.ageTracker.AgeBiologicalTicks < 1000) + { + GenderUtility.RemoveAllSexChangeThoughts(pawn); + } + } } } diff --git a/Source/Genes/Gender/Gene_FemaleOnly.cs b/Source/Genes/Gender/Gene_FemaleOnly.cs index df48328..c3d5ef6 100644 --- a/Source/Genes/Gender/Gene_FemaleOnly.cs +++ b/Source/Genes/Gender/Gene_FemaleOnly.cs @@ -14,12 +14,15 @@ namespace RJW_Genes // Here we call Sexualization after the Sex-Change if (GenitaliaUtility.PawnStillNeedsGenitalia(pawn)) Sexualizer.sexualize_pawn(pawn); + + GenderUtility.RemoveSexChangeThoughtsIfTooYoung(this.pawn); } public override void PostAdd() { base.PostMake(); AdjustPawnToFemale(); + GenderUtility.RemoveSexChangeThoughtsIfTooYoung(this.pawn); } private void AdjustPawnToFemale() diff --git a/Source/Genes/Gender/Gene_MaleOnly.cs b/Source/Genes/Gender/Gene_MaleOnly.cs index d99652a..daca649 100644 --- a/Source/Genes/Gender/Gene_MaleOnly.cs +++ b/Source/Genes/Gender/Gene_MaleOnly.cs @@ -14,12 +14,15 @@ namespace RJW_Genes // Here we call Sexualization after the Sex-Change if (GenitaliaUtility.PawnStillNeedsGenitalia(pawn)) Sexualizer.sexualize_pawn(pawn); + + GenderUtility.RemoveSexChangeThoughtsIfTooYoung(this.pawn); } public override void PostAdd() { base.PostMake(); AdjustPawnToMale(); + GenderUtility.RemoveSexChangeThoughtsIfTooYoung(this.pawn); } private void AdjustPawnToMale()