New cleaner method to obtain racegroupdefs and bugfix in Patch_OrgasmRush

This commit is contained in:
Shabakur 2022-12-19 20:48:56 +01:00
parent c500d4d3c5
commit b497b9cfc2
8 changed files with 80 additions and 168 deletions

View file

@ -21,7 +21,7 @@ namespace RJW_Genes
if (props.pawn == null || !props.hasPartner())
return;
if (props.pawn.genes.HasGene(GeneDefOf.rjw_genes_orgasm_rush))
if (props.pawn.genes != null && props.pawn.genes.HasGene(GeneDefOf.rjw_genes_orgasm_rush))
{
props.pawn.needs.rest.CurLevel += REST_INCREASE;
}