2022-11-20 19:53:05 +00:00
|
|
|
|
using Verse;
|
|
|
|
|
using HarmonyLib;
|
2022-11-26 20:32:32 +00:00
|
|
|
|
using System;
|
2024-05-26 19:51:09 +00:00
|
|
|
|
using rjw;
|
2024-05-26 23:27:10 +00:00
|
|
|
|
using RJWLoveFeeding;
|
2022-11-20 19:53:05 +00:00
|
|
|
|
|
|
|
|
|
namespace RJW_Genes
|
|
|
|
|
{
|
|
|
|
|
[StaticConstructorOnStartup]
|
|
|
|
|
internal static class HarmonyInit
|
|
|
|
|
{
|
|
|
|
|
static HarmonyInit()
|
|
|
|
|
{
|
|
|
|
|
Harmony harmony = new Harmony("rjw_genes");
|
2024-05-26 19:51:09 +00:00
|
|
|
|
|
|
|
|
|
var original = typeof(Hediff_Pregnant).GetMethod("Tick");
|
|
|
|
|
harmony.Unpatch(original, HarmonyPatchType.Prefix, "rjw");
|
|
|
|
|
|
2022-11-20 19:53:05 +00:00
|
|
|
|
harmony.PatchAll();
|
2024-05-26 23:27:10 +00:00
|
|
|
|
if (ModsConfig.BiotechActive)
|
|
|
|
|
{
|
|
|
|
|
harmony.Patch(typeof(SexUtility).GetMethod("ProcessSex"), new HarmonyMethod(typeof(LustFeeding), "Postfix", null));
|
|
|
|
|
}
|
2022-11-26 20:32:32 +00:00
|
|
|
|
|
|
|
|
|
// Patch Licentia, if Licentia exists
|
|
|
|
|
// Logic & Explanation taken from https://rimworldwiki.com/wiki/Modding_Tutorials/Compatibility_with_DLLs
|
|
|
|
|
// Adjusted to use ModsConfig (which makes it work, the example above does not run out of the box)
|
2024-05-26 19:51:09 +00:00
|
|
|
|
|
2022-11-20 19:53:05 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|