2024-07-11 10:54:04 +00:00
|
|
|
|
using HarmonyLib;
|
|
|
|
|
using rjw;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using Verse;
|
|
|
|
|
|
|
|
|
|
namespace RJW_Genes
|
|
|
|
|
{
|
|
|
|
|
[HarmonyPatch(typeof(xxx), "can_masturbate")]
|
|
|
|
|
public class Patch_BlockedMasturbation
|
|
|
|
|
{
|
|
|
|
|
public void PostFix(Pawn pawn, ref bool __result)
|
|
|
|
|
{
|
2024-07-11 10:59:08 +00:00
|
|
|
|
if (pawn != null && !pawn.IsAnimal() && pawn.genes != null)
|
2024-07-11 10:54:04 +00:00
|
|
|
|
{
|
2024-07-11 10:59:08 +00:00
|
|
|
|
__result = __result
|
|
|
|
|
&& !pawn.genes.HasActiveGene(GeneDefOf.rjw_genes_blocked_masturbation)
|
|
|
|
|
&& !pawn.genes.HasActiveGene(GeneDefOf.rjw_genes_infectious_blocked_masturbation);
|
2024-07-11 10:54:04 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|