Added check for animals in orgasm rush, should fix #15

This commit is contained in:
Vegapnk 2023-01-22 09:06:02 +01:00
parent a72dc01d73
commit ac1fdc99be
1 changed files with 6 additions and 2 deletions

View File

@ -19,8 +19,12 @@ namespace RJW_Genes
public static void Postfix(SexProps props)
{
// ShortCuts: Exit Early if Pawn or Partner are null (can happen with Animals or Masturbation)
if (props.pawn == null || !props.hasPartner())
// ShortCuts: Exit Early if Pawn or Partner are null (can happen with Masturbation or other nieche-cases)
if (props == null || props.pawn == null || !props.hasPartner())
return;
// Exit for Animals - Animals can't get or trigger Orgasm Rushes. Fixes #15
if (props.pawn.IsAnimal() || props.partner.IsAnimal())
return;
if (props.pawn.genes != null && props.pawn.genes.HasGene(GeneDefOf.rjw_genes_orgasm_rush))