using HarmonyLib; using rjw; using rjwquirks.Modules.Quirks; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Verse; namespace rjwquirks.HarmonyPatches { // Skips condom code entirely if they have pregnation fetish or similar. RJW used to do this with the same quirk. [HarmonyPatch(typeof(CondomUtility))] public class Patch_CondomUtility { [HarmonyPrefix] [HarmonyPatch(nameof(CondomUtility.TryUseCondom))] public static bool UseCondomPrefix(Pawn pawn) { if (xxx.is_human(pawn) && pawn.HasQuirk(QuirkDefOf.ImpregnationFetish)) return false; return true; } [HarmonyPrefix] [HarmonyPatch(nameof(CondomUtility.GetCondomFromRoom))] public static bool GetCondomPrefix(Pawn pawn) { if (xxx.is_human(pawn) && pawn.HasQuirk(QuirkDefOf.ImpregnationFetish)) return false; return true; } } }