mirror of
https://github.com/vegapnk/RJW-Genes.git
synced 2024-08-15 00:23:31 +00:00
Added Elasticity Gene and Zoophile Trait Gene
This commit is contained in:
parent
f17da08394
commit
84c0ab012e
15 changed files with 227 additions and 19 deletions
|
@ -1,6 +1,6 @@
|
|||
using Verse;
|
||||
using HarmonyLib;
|
||||
|
||||
using System;
|
||||
|
||||
namespace RJW_Genes
|
||||
{
|
||||
|
@ -11,6 +11,25 @@ namespace RJW_Genes
|
|||
{
|
||||
Harmony harmony = new Harmony("rjw_genes");
|
||||
harmony.PatchAll();
|
||||
|
||||
// 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)
|
||||
try
|
||||
{
|
||||
((Action)(() =>
|
||||
{
|
||||
if (ModsConfig.IsActive("LustLicentia.RJWLabs"))
|
||||
{
|
||||
// Gene: Cumflation Immunity
|
||||
harmony.Patch(AccessTools.Method(typeof(LicentiaLabs.CumflationHelper), nameof(LicentiaLabs.CumflationHelper.Cumflation)),
|
||||
prefix: new HarmonyMethod(typeof(Patch_Cumflation), nameof(Patch_Cumflation.Prefix)));
|
||||
}
|
||||
}))();
|
||||
}
|
||||
catch (TypeLoadException ex) {
|
||||
// To be expected for people without Licentia Labs
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue