Facial Animation animation patch for lovin

This commit is contained in:
Platinum 2020-04-22 15:52:11 -07:00
parent 0318a1c1d4
commit 1d8d17edbc
2 changed files with 46 additions and 0 deletions

View file

@ -1,4 +1,5 @@
using HarmonyLib;
using RimWorld;
using System;
using System.Collections.Generic;
using System.Linq;
@ -19,6 +20,13 @@ namespace Rimworld_Animations {
if (LoadedModManager.RunningModsListForReading.Any(x => x.Name == "[NL] Facial Animation - WIP")) {
(new Harmony("rjw")).Patch(AccessTools.Method(AccessTools.TypeByName("FacialAnimation.DrawFaceGraphicsComp"), "DrawGraphics"),
prefix: new HarmonyMethod(AccessTools.Method(typeof(Patch_FacialAnimation), "Prefix")));
(new Harmony("rjw")).Patch(AccessTools.Method(AccessTools.TypeByName("FacialAnimation.FaceAnimationDef"), "IsSame", new Type[] { typeof(JobDef) }),
prefix: new HarmonyMethod(AccessTools.Method(typeof(Patch_FacialAnimation), "Prefix_IsSameA")));
(new Harmony("rjw")).Patch(AccessTools.Method(AccessTools.TypeByName("FacialAnimation.FaceAnimationDef"), "IsSame", new Type[] { typeof(string) }),
prefix: new HarmonyMethod(AccessTools.Method(typeof(Patch_FacialAnimation), "Prefix_IsSameB")));
}
}))();
}
@ -40,5 +48,43 @@ namespace Rimworld_Animations {
return true;
}
public static List<string> rjwLovinDefNames = new List<string>{
"JoinInBed",
"GettinLoved",
"GettinLicked",
"GettinSucked",
"GettinRaped",
"ViolateCorpse",
"Masturbate_Bed",
"Masturbate_Quick",
"GettinBred",
"Bestiality",
"BestialityForFemale",
"StruggleInBondageGear",
"WhoreIsServingVisitors",
"UseFM"
};
public static bool Prefix_IsSameA(JobDef job, string ___jobDef, ref bool __result) {
if(___jobDef == "Lovin" && rjwLovinDefNames.Contains(job.ToString())) {
__result = true;
return false;
}
return true;
}
public static bool Prefix_IsSameB(string jobName, string ___jobDef, ref bool __result) {
if (___jobDef == "Lovin" && rjwLovinDefNames.Contains(jobName)) {
__result = true;
return false;
}
return true;
}
}
}