mirror of
https://gitgud.io/LonelyRain/rjw-quirks.git
synced 2024-08-15 00:03:31 +00:00
be5f2bdf9a
Updated to parity with quirk removal updates that added helper functions
35 lines
1,010 B
C#
35 lines
1,010 B
C#
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;
|
|
}
|
|
}
|
|
}
|