2022-04-03 17:20:14 +00:00
|
|
|
|
using HarmonyLib;
|
2021-07-27 14:28:31 +00:00
|
|
|
|
using System.Reflection;
|
|
|
|
|
using Verse;
|
2022-04-26 15:19:11 +00:00
|
|
|
|
using rjw.Modules.Interactions.Internals.Implementation;
|
|
|
|
|
using rjw.Modules.Interactions.Rules.PartKindUsageRules;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using rjw;
|
|
|
|
|
using RJWSexperience.Logs;
|
2021-07-27 14:28:31 +00:00
|
|
|
|
|
|
|
|
|
namespace RJWSexperience
|
|
|
|
|
{
|
2022-04-03 17:20:14 +00:00
|
|
|
|
[StaticConstructorOnStartup]
|
|
|
|
|
internal static class First
|
|
|
|
|
{
|
|
|
|
|
static First()
|
|
|
|
|
{
|
|
|
|
|
var har = new Harmony("RJW_Sexperience");
|
|
|
|
|
har.PatchAll(Assembly.GetExecutingAssembly());
|
2022-04-26 15:19:11 +00:00
|
|
|
|
|
|
|
|
|
InjectIntoRjwInteractionServices();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static void InjectIntoRjwInteractionServices()
|
|
|
|
|
{
|
|
|
|
|
var log = LogManager.GetLogger("StaticConstructorOnStartup");
|
|
|
|
|
|
|
|
|
|
List<IPartPreferenceRule> partKindUsageRules = Unprivater.GetProtectedValue<List<IPartPreferenceRule>>("_partKindUsageRules", typeof(PartPreferenceDetectorService));
|
2022-04-27 10:56:16 +00:00
|
|
|
|
partKindUsageRules.Add(new Cum.Interactions.CumAddictPartKindUsageRule());
|
2022-04-26 15:19:11 +00:00
|
|
|
|
log.Message("Added 1 rule to PartPreferenceDetectorService._partKindUsageRules");
|
2022-04-03 17:20:14 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2021-07-27 14:28:31 +00:00
|
|
|
|
}
|