mirror of
https://github.com/amevarashi/RJW-Sexperience.git
synced 2024-08-14 23:54:08 +00:00
Rename source folder
This commit is contained in:
parent
0a412a0060
commit
a4c046a841
55 changed files with 0 additions and 0 deletions
33
Source/RJWSexperience/Harmony.cs
Normal file
33
Source/RJWSexperience/Harmony.cs
Normal file
|
@ -0,0 +1,33 @@
|
|||
using HarmonyLib;
|
||||
using System.Reflection;
|
||||
using Verse;
|
||||
using rjw.Modules.Interactions.Internals.Implementation;
|
||||
using rjw.Modules.Interactions.Rules.PartKindUsageRules;
|
||||
using System.Collections.Generic;
|
||||
using rjw;
|
||||
using RJWSexperience.Logs;
|
||||
|
||||
namespace RJWSexperience
|
||||
{
|
||||
[StaticConstructorOnStartup]
|
||||
internal static class First
|
||||
{
|
||||
static First()
|
||||
{
|
||||
var har = new Harmony("RJW_Sexperience");
|
||||
har.PatchAll(Assembly.GetExecutingAssembly());
|
||||
Pawn_GetGizmos.DoConditionalPatch(har);
|
||||
|
||||
InjectIntoRjwInteractionServices();
|
||||
}
|
||||
|
||||
public static void InjectIntoRjwInteractionServices()
|
||||
{
|
||||
var log = LogManager.GetLogger("StaticConstructorOnStartup");
|
||||
|
||||
List<IPartPreferenceRule> partKindUsageRules = Unprivater.GetProtectedValue<List<IPartPreferenceRule>>("_partKindUsageRules", typeof(PartPreferenceDetectorService));
|
||||
partKindUsageRules.Add(new Cum.Interactions.CumAddictPartKindUsageRule());
|
||||
log.Message("Added 1 rule to PartPreferenceDetectorService._partKindUsageRules");
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue