Skip to content
Snippets Groups Projects
Commit be1e5c5d authored by amevarashi's avatar amevarashi
Browse files

Replaced manual sexperience patch with the Prepare method

parent 7e30ebe6
No related branches found
No related tags found
No related merge requests found
using HarmonyLib;
using RJWSexperience.Ideology.Patches;
using System.Reflection;
using System.Reflection;
using Verse;
namespace RJWSexperience.Ideology
{
[StaticConstructorOnStartup]
internal static class First
internal static class Harmony
{
static First()
static Harmony()
{
var harmony = new Harmony("RJW_Sexperience.Ideology");
harmony.PatchAll(Assembly.GetExecutingAssembly());
if (ModLister.HasActiveModWithName("RJW Sexperience"))
{
harmony.Patch(AccessTools.Method("RJWSexperience.RJWUtility:ThrowVirginHistoryEvent"),
prefix: null,
postfix: new HarmonyMethod(typeof(Sexperience_Patch_ThrowVirginHistoryEvent), nameof(Sexperience_Patch_ThrowVirginHistoryEvent.Postfix))
);
}
new HarmonyLib.Harmony("RJW_Sexperience.Ideology").PatchAll(Assembly.GetExecutingAssembly());
}
}
}
using rjw;
using HarmonyLib;
using rjw;
using RJWSexperience.Ideology.HistoryEvents;
using Verse;
namespace RJWSexperience.Ideology.Patches
{
[HarmonyPatch("RJWSexperience.RJWUtility", "ThrowVirginHistoryEvent")]
public static class Sexperience_Patch_ThrowVirginHistoryEvent
{
public static bool Prepare() => ModsConfig.IsActive("rjw.sexperience");
public static void Postfix(Pawn exVirgin, Pawn partner, SexProps props, int degree)
{
const int femaleAfterSurgery = 1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment