mirror of
https://github.com/amevarashi/RJW-Sexperience.git
synced 2024-08-14 23:54:08 +00:00
32 lines
963 B
C#
32 lines
963 B
C#
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());
|
|
|
|
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");
|
|
}
|
|
}
|
|
}
|