Added infectious version of masturbation block, moved masturbation block to reproduction from breeding

This commit is contained in:
Vegapnk 2024-07-11 12:59:08 +02:00
parent 32774ca3be
commit ef73a80728
5 changed files with 41 additions and 3 deletions

View file

@ -14,10 +14,11 @@ namespace RJW_Genes
{
public void PostFix(Pawn pawn, ref bool __result)
{
// Simply check if the pawn has genes, and if so, if they have the active gene for blocked masturbation
if (pawn.genes != null)
if (pawn != null && !pawn.IsAnimal() && pawn.genes != null)
{
__result = __result && !pawn.genes.HasActiveGene(GeneDefOf.rjw_genes_blocked_masturbation);
__result = __result
&& !pawn.genes.HasActiveGene(GeneDefOf.rjw_genes_blocked_masturbation)
&& !pawn.genes.HasActiveGene(GeneDefOf.rjw_genes_infectious_blocked_masturbation);
}
}