Decompiled source of NPCAppearanceMod v4.2.0
angelaboobs.dll
Decompiled 2 months ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using HarmonyLib; using Microsoft.CodeAnalysis; using Nessie.ATLYSS.EasySettings; using Nessie.ATLYSS.EasySettings.UIElements; using UnityEngine; using UnityEngine.Events; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: IgnoresAccessChecksTo("Assembly-CSharp")] [assembly: AssemblyCompany("angelaboobs")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+48d1288b9ee8d06a85b5373db46c5899d822da4e")] [assembly: AssemblyProduct("angelaboobs")] [assembly: AssemblyTitle("angelaboobs")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } internal static class LCMPluginInfo { public const string PLUGIN_GUID = "angelaboobs"; public const string PLUGIN_NAME = "angelaboobs"; public const string PLUGIN_VERSION = "1.0.0"; } namespace angelaboobs { public class AmmagonSliderBase : MonoBehaviour { [HarmonyPatch(typeof(NetNPC), "Start")] public static class AddNetNPCPatch { [HarmonyPostfix] public static void NetNPCAwakePatch(NetNPC __instance) { //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Expected O, but got Unknown try { if (((object)__instance).ToString().Contains("_npc_ammagon")) { NPCPatcherBase.Log.LogInfo((object)"Ammagon located"); AmmagonSliderController = ((Component)__instance).gameObject.AddComponent<AmmagonSliderController>(); Transform val = ((Component)__instance).transform.Find("_visual").Find("ammagon_fbx"); SkinnedMeshRenderer component = ((Component)val.Find("_ammagon_cloth")).GetComponent<SkinnedMeshRenderer>(); component.sharedMesh = _newCloth; SkinnedMeshRenderer component2 = ((Component)val.Find("_ammagon_base")).GetComponent<SkinnedMeshRenderer>(); component2.sharedMesh = _newTorso; MeshRenderer component3 = ((Component)((Component)__instance).transform.Find("_visual").Find("_shadowProjection").GetChild(0)).GetComponent<MeshRenderer>(); Transform child = val.Find("Armature_ammagon").GetChild(0).GetChild(0) .GetChild(0); MeshRenderer component4 = ((Component)child.Find("_greatsword01_alt00")).GetComponent<MeshRenderer>(); MeshRenderer component5 = ((Component)child.Find("_shield02")).GetComponent<MeshRenderer>(); GameObject val2 = new GameObject("_ammagon_buttplug"); val2.transform.SetParent(val); SkinnedMeshRenderer val3 = val2.AddComponent<SkinnedMeshRenderer>(); val3.bones = component2.bones; ((Renderer)val3).material = ((Renderer)component2).material; val3.sharedMesh = _buttplug; GameObject val4 = Object.Instantiate<GameObject>(CockObject, val); SkinnedMeshRenderer component6 = ((Component)val4.transform.GetChild(0)).gameObject.GetComponent<SkinnedMeshRenderer>(); ((Renderer)component6).material = ((Renderer)component2).material; Transform rootBone = component6.rootBone; rootBone.SetParent(val.Find("Armature_ammagon").GetChild(0)); AmmagonSliderController.cloth = component; AmmagonSliderController.torso = component2; AmmagonSliderController.sword = component4; AmmagonSliderController.shield = component5; AmmagonSliderController.shadow = component3; AmmagonSliderController.dickObject = CockObject; AmmagonSliderController.dick = component6; AmmagonSliderController.buttplug = val3; AmmagonSliderController.ApplySettings(); NPCPatcherBase.Log.LogInfo((object)"Ammagon body patched!"); } } catch (Exception ex) { NPCPatcherBase.Log.LogError((object)ex); } } } private const string NPC_NAME = "Ammagon"; public static GameObject CockObject; private static Mesh _newCloth; private static Mesh _newTorso; private static Mesh _buttplug; public static AnimationCurve dickAnimationCurve; public static AnimationCurve clothAnimationCurve; public ConfigFile config; public PluginInfo info; internal static ConfigEntry<int> textureSelector; internal static ConfigEntry<KeyCode> dickErect; internal static ConfigEntry<bool> clothGone; internal static ConfigEntry<bool> buttplugEnable; internal static ConfigEntry<float> bodyAssSize; private static AtlyssDropdown textureDropdown; public static AmmagonSliderController AmmagonSliderController; public static List<string> textureFolderNames = new List<string>(); public static int selectedTexture; public static List<Mesh> dicksMeshList = new List<Mesh>(); private void Start() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_0212: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_0221: Expected O, but got Unknown InitConfig(); Settings.OnApplySettings.AddListener((UnityAction)delegate { if (textureSelector.Value != selectedTexture) { textureSelector.Value = selectedTexture; AmmagonSliderController.textureChanged = true; } config.Save(); if ((Object)(object)AmmagonSliderController != (Object)null) { AmmagonSliderController.ApplySettings(); } }); try { DirectoryInfo[] directories = new DirectoryInfo(Path.Combine(NPCPatcherBase.texturePath, "Ammagon")).GetDirectories(); for (int i = 0; i < directories.Length; i++) { textureFolderNames.Add(directories[i].Name); if (NPCPatcherBase.VerboseLogging) { NPCPatcherBase.Log.LogInfo((object)("Loaded " + textureFolderNames[i] + " texture group")); } } if (selectedTexture > directories.Length - 1) { selectedTexture = directories.Length - 1; } } catch (Exception ex) { NPCPatcherBase.Log.LogError((object)("Unable to find textures in path " + NPCPatcherBase.texturePath + ". Continuing.")); NPCPatcherBase.Log.LogError((object)ex.ToString()); } try { _newCloth = NPCPatcherBase.bundle.LoadAsset<Mesh>("_ammagon_cloth"); _newTorso = NPCPatcherBase.bundle.LoadAsset<Mesh>("_ammagon_base"); _buttplug = NPCPatcherBase.bundle.LoadAsset<Mesh>("_ammagon_buttplug"); CockObject = NPCPatcherBase.bundle.LoadAsset<GameObject>("ammagon_dick"); dicksMeshList.Add(((Component)CockObject.transform.GetChild(0)).gameObject.GetComponent<SkinnedMeshRenderer>().sharedMesh); } catch (Exception ex2) { NPCPatcherBase.Log.LogError((object)("Unable to load angelaboobs.unity3d in " + info.Location + ". Patcher will not run correctly.")); NPCPatcherBase.Log.LogError((object)ex2.ToString()); } AddSettings(); Keyframe val = default(Keyframe); ((Keyframe)(ref val))..ctor(0f, 0f); ((Keyframe)(ref val)).inTangent = 2.25f; ((Keyframe)(ref val)).outTangent = 2.25f; ((Keyframe)(ref val)).outWeight = 0.015f; Keyframe val2 = default(Keyframe); ((Keyframe)(ref val2))..ctor(1f, 1f); dickAnimationCurve = AnimationCurve.EaseInOut(0f, 0f, 1f, 1f); dickAnimationCurve.preWrapMode = (WrapMode)1; dickAnimationCurve.postWrapMode = (WrapMode)1; clothAnimationCurve = new AnimationCurve((Keyframe[])(object)new Keyframe[2] { val, val2 }); clothAnimationCurve.preWrapMode = (WrapMode)1; clothAnimationCurve.postWrapMode = (WrapMode)1; } private void InitConfig() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Expected O, but got Unknown //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Expected O, but got Unknown //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Expected O, but got Unknown //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Expected O, but got Unknown //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Expected O, but got Unknown //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Expected O, but got Unknown //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Expected O, but got Unknown ConfigDefinition val = new ConfigDefinition("AmmagonSlider", "TextureSelection"); ConfigDescription val2 = new ConfigDescription("TextureSelection", (AcceptableValueBase)null, Array.Empty<object>()); textureSelector = config.Bind<int>(val, 0, val2); selectedTexture = textureSelector.Value; ConfigDefinition val3 = new ConfigDefinition("AmmagonSlider", "Clothless"); ConfigDescription val4 = new ConfigDescription("Clothless", (AcceptableValueBase)null, Array.Empty<object>()); clothGone = config.Bind<bool>(val3, false, val4); ConfigDefinition val5 = new ConfigDefinition("AmmagonSlider", "Buttplug"); ConfigDescription val6 = new ConfigDescription("Buttplug", (AcceptableValueBase)null, Array.Empty<object>()); buttplugEnable = config.Bind<bool>(val5, false, val6); ConfigDefinition val7 = new ConfigDefinition("AmmagonSlider", "BodyAssSize"); ConfigDescription val8 = new ConfigDescription("Ass Size", (AcceptableValueBase)null, Array.Empty<object>()); bodyAssSize = config.Bind<float>(val7, 0f, val8); ConfigDefinition val9 = new ConfigDefinition("AmmagonSlider", "DickErect"); ConfigDescription val10 = new ConfigDescription("Erection hotkey", (AcceptableValueBase)null, Array.Empty<object>()); dickErect = config.Bind<KeyCode>(val9, (KeyCode)46, val10); } private void AddSettings() { SettingsTab modTab = Settings.ModTab; modTab.AddHeader("Ammagon Appearance Mod"); textureDropdown = modTab.AddDropdown("Texture", textureFolderNames, selectedTexture); textureDropdown.OnValueChanged.AddListener((UnityAction<int>)delegate(int x) { selectedTexture = x; }); modTab.AddToggle("Bottomless", clothGone); modTab.AddToggle("Buttplug", buttplugEnable); modTab.AddSlider("Bigger ass", bodyAssSize, false); modTab.AddKeyButton("Erection shortcut", dickErect); } } public class AmmagonSliderController : MonoBehaviour { private float _arousalTarget; private float _arousalCurrent; public float bodyAssSize; public bool textureChanged = true; public SkinnedMeshRenderer cloth; public SkinnedMeshRenderer torso; public SkinnedMeshRenderer dick; public SkinnedMeshRenderer buttplug; public GameObject dickObject; public MeshRenderer sword; public MeshRenderer shield; public MeshRenderer shadow; private int _dickTexture; private int _buttplugTexture; private void Awake() { _dickTexture = NPCPatcherBase.customTextures.Count; NPCPatcherBase.customTextures.Add(NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Ammagon, TexturesEnum.Base, AmmagonSliderBase.textureFolderNames[AmmagonSliderBase.selectedTexture], "ammagonTex_dick")); _buttplugTexture = NPCPatcherBase.customTextures.Count; NPCPatcherBase.customTextures.Add(NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Ammagon, TexturesEnum.Base, AmmagonSliderBase.textureFolderNames[AmmagonSliderBase.selectedTexture], "ammagonTex_buttplug")); } public void ApplyBones(GameObject go) { if (!((Object)go).name.Contains("masterBone")) { DynamicBone val = go.AddComponent<DynamicBone>(); val.m_Root = go.transform; val.m_Stiffness = 0.85f; val.m_Damping = 0.33f; val.m_Inert = 0.37f; if (((Object)go).name.Contains("Balls")) { val.m_Stiffness = 0.4f; val.m_Damping = 0.2f; val.m_Inert = 0.15f; } } } public void ApplySettings() { //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) float num = AmmagonSliderBase.dickAnimationCurve.Evaluate(_arousalCurrent) * 100f; float num2 = AmmagonSliderBase.clothAnimationCurve.Evaluate(_arousalCurrent) * 100f; bodyAssSize = AmmagonSliderBase.bodyAssSize.Value * 100f; dick.SetBlendShapeWeight(dick.sharedMesh.GetBlendShapeIndex("key_erect"), num); cloth.SetBlendShapeWeight(cloth.sharedMesh.GetBlendShapeIndex("key_erect"), num2); cloth.SetBlendShapeWeight(cloth.sharedMesh.GetBlendShapeIndex("key_penisBase"), 100f - num); torso.SetBlendShapeWeight(torso.sharedMesh.GetBlendShapeIndex("key_assSize"), bodyAssSize); buttplug.SetBlendShapeWeight(buttplug.sharedMesh.GetBlendShapeIndex("key_assSize"), bodyAssSize); if (textureChanged) { NPCPatcherBase.textureDictionary[NPCEnum.Ammagon][TexturesEnum.Base] = NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Ammagon, TexturesEnum.Base, AmmagonSliderBase.textureFolderNames[AmmagonSliderBase.selectedTexture]); ((Renderer)torso).material.mainTexture = (Texture)(object)NPCPatcherBase.textureDictionary[NPCEnum.Ammagon][TexturesEnum.Base]; NPCPatcherBase.customTextures[_dickTexture] = NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Ammagon, TexturesEnum.Base, AmmagonSliderBase.textureFolderNames[AmmagonSliderBase.selectedTexture], "ammagonTex_dick"); ((Renderer)dick).material.mainTexture = (Texture)(object)NPCPatcherBase.customTextures[_dickTexture]; ((Renderer)dick).material.mainTexture.filterMode = ((Texture)NPCPatcherBase.textureDictionary[NPCEnum.Ammagon][TexturesEnum.Base]).filterMode; NPCPatcherBase.customTextures[_buttplugTexture] = NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Ammagon, TexturesEnum.Base, AmmagonSliderBase.textureFolderNames[AmmagonSliderBase.selectedTexture], "ammagonTex_buttplug"); ((Renderer)buttplug).material.mainTexture.filterMode = ((Texture)NPCPatcherBase.textureDictionary[NPCEnum.Ammagon][TexturesEnum.Base]).filterMode; NPCPatcherBase.textureDictionary[NPCEnum.Ammagon][TexturesEnum.Shadow] = NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Ammagon, TexturesEnum.Shadow, AmmagonSliderBase.textureFolderNames[AmmagonSliderBase.selectedTexture]); ((Renderer)shadow).material.mainTexture = (Texture)(object)NPCPatcherBase.textureDictionary[NPCEnum.Ammagon][TexturesEnum.Shadow]; NPCPatcherBase.textureDictionary[NPCEnum.Ammagon][TexturesEnum.Sword] = NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Ammagon, TexturesEnum.Sword, AmmagonSliderBase.textureFolderNames[AmmagonSliderBase.selectedTexture]); ((Renderer)sword).material.mainTexture = (Texture)(object)NPCPatcherBase.textureDictionary[NPCEnum.Ammagon][TexturesEnum.Sword]; NPCPatcherBase.textureDictionary[NPCEnum.Ammagon][TexturesEnum.Shield] = NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Ammagon, TexturesEnum.Shield, AmmagonSliderBase.textureFolderNames[AmmagonSliderBase.selectedTexture]); ((Renderer)shield).material.mainTexture = (Texture)(object)NPCPatcherBase.textureDictionary[NPCEnum.Ammagon][TexturesEnum.Shield]; textureChanged = false; } ((Renderer)cloth).material.mainTexture = (Texture)(AmmagonSliderBase.clothGone.Value ? ((object)Texture2D.blackTexture) : ((object)NPCPatcherBase.textureDictionary[NPCEnum.Ammagon][TexturesEnum.Base])); ((Renderer)buttplug).material.mainTexture = (Texture)(AmmagonSliderBase.buttplugEnable.Value ? ((object)NPCPatcherBase.customTextures[_buttplugTexture]) : ((object)Texture2D.blackTexture)); } private void Update() { //IL_012e: Unknown result type (might be due to invalid IL or missing references) if (Mathf.Approximately(_arousalTarget, 1f)) { if (_arousalCurrent < _arousalTarget) { _arousalCurrent += 0.1f * Time.deltaTime; } else { _arousalCurrent = _arousalTarget; } } else if (_arousalCurrent > _arousalTarget) { _arousalCurrent -= 0.1f * Time.deltaTime; } else { _arousalCurrent = _arousalTarget; } if (!Mathf.Approximately(_arousalCurrent, _arousalTarget)) { float num = AmmagonSliderBase.dickAnimationCurve.Evaluate(_arousalCurrent) * 100f; float num2 = AmmagonSliderBase.clothAnimationCurve.Evaluate(_arousalCurrent) * 100f; dick.SetBlendShapeWeight(dick.sharedMesh.GetBlendShapeIndex("key_erect"), num); cloth.SetBlendShapeWeight(cloth.sharedMesh.GetBlendShapeIndex("key_erect"), num2); cloth.SetBlendShapeWeight(cloth.sharedMesh.GetBlendShapeIndex("key_penisBase"), 100f - num); } if (Input.GetKeyDown(AmmagonSliderBase.dickErect.Value)) { _arousalTarget = ((_arousalTarget == 0f) ? 1f : 0f); } } } public class AngelaSliderBase : MonoBehaviour { [HarmonyPatch(typeof(NetNPC), "Start")] public static class AddNetNPCPatch { [HarmonyPostfix] public static void NetNPCAwakePatch(NetNPC __instance) { //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) try { if (!((object)__instance).ToString().Contains("_npc_Angela")) { return; } NPCPatcherBase.Log.LogInfo((object)"Angela located"); AngelaSliderController = ((Component)__instance).gameObject.AddComponent<AngelaSliderController>(); eyeController = ((Component)((Component)__instance).transform.Find("_visual")).GetComponent<TextureChangeAnimEvent>(); ApplyEyeTexturesToEyeController(); DialogTrigger component = ((Component)((Component)__instance).transform.Find("_dialogTrigger")).GetComponent<DialogTrigger>(); DialogBranch[] dialogBranches = component._scriptDialogData._dialogBranches; foreach (DialogBranch val in dialogBranches) { Dialog[] dialogs = val.dialogs; foreach (Dialog val2 in dialogs) { DialogList.Add(val2); if (((Object)val2.facepic).name == "facepic_angela01") { facepic1Sprite = Sprite.Create(NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Angela, TexturesEnum.FacePic1, textureFolderNames[selectedTexture]), val2.facepic.rect, val2.facepic.pivot, val2.facepic.pixelsPerUnit, 0u); val2.facepic = facepic1Sprite; } else if (((Object)val2.facepic).name == "facepic_angela02") { facepic2Sprite = Sprite.Create(NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Angela, TexturesEnum.FacePic2, textureFolderNames[selectedTexture]), val2.facepic.rect, val2.facepic.pivot, val2.facepic.pixelsPerUnit, 0u); val2.facepic = facepic2Sprite; } else if (((Object)val2.facepic).name == "facepic_angela03") { facepic3Sprite = Sprite.Create(NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Angela, TexturesEnum.FacePic3, textureFolderNames[selectedTexture]), val2.facepic.rect, val2.facepic.pivot, val2.facepic.pixelsPerUnit, 0u); val2.facepic = facepic3Sprite; } } } Transform val3 = ((Component)__instance).transform.Find("_visual").Find("angela_mesh"); SkinnedMeshRenderer component2 = ((Component)val3.Find("angela_boobs")).GetComponent<SkinnedMeshRenderer>(); component2.sharedMesh = _newBoobs; SkinnedMeshRenderer component3 = ((Component)val3.Find("angela_base")).GetComponent<SkinnedMeshRenderer>(); component3.sharedMesh = _newBody; SkinnedMeshRenderer component4 = ((Component)val3.Find("angela_robeSkirt")).GetComponent<SkinnedMeshRenderer>(); component4.sharedMesh = _newSkirt; SkinnedMeshRenderer component5 = ((Component)val3.Find("angela_arms")).GetComponent<SkinnedMeshRenderer>(); SkinnedMeshRenderer component6 = ((Component)val3.Find("angela_ears")).GetComponent<SkinnedMeshRenderer>(); SkinnedMeshRenderer component7 = ((Component)val3.Find("angela_eyes")).GetComponent<SkinnedMeshRenderer>(); SkinnedMeshRenderer component8 = ((Component)val3.Find("angela_feet")).GetComponent<SkinnedMeshRenderer>(); SkinnedMeshRenderer component9 = ((Component)val3.Find("angela_hairTuft")).GetComponent<SkinnedMeshRenderer>(); SkinnedMeshRenderer component10 = ((Component)val3.Find("angela_horns")).GetComponent<SkinnedMeshRenderer>(); SkinnedMeshRenderer component11 = ((Component)val3.Find("angela_necklace")).GetComponent<SkinnedMeshRenderer>(); SkinnedMeshRenderer component12 = ((Component)val3.Find("angela_tail")).GetComponent<SkinnedMeshRenderer>(); MeshRenderer component13 = ((Component)val3.Find("Armature_character").Find("masterBone").Find("Quad") .Find("Quad_01")).GetComponent<MeshRenderer>(); Transform val4 = val3.Find("Armature_character").Find("masterBone").Find("hipCtrl") .Find("hip") .Find("lowBody") .Find("midBody") .Find("torso") .Find("shoulder.l") .GetChild(0) .GetChild(0) .GetChild(0) .GetChild(0) .Find("bookProp_01"); MeshRenderer component14 = ((Component)val4.Find("prop_book_L")).GetComponent<MeshRenderer>(); MeshRenderer component15 = ((Component)val4.Find("prop_book_R")).GetComponent<MeshRenderer>(); MeshRenderer component16 = ((Component)((Component)__instance).transform.Find("_visual").Find("_shadowProjection").GetChild(0)).GetComponent<MeshRenderer>(); DynamicBone val5 = __instance._jiggleBones[2]; DynamicBone val6 = __instance._jiggleBones[3]; AngelaSliderController.boobs = component2; AngelaSliderController.torso = component3; AngelaSliderController.skirt = component4; AngelaSliderController.arms = component5; AngelaSliderController.ears = component6; AngelaSliderController.eyes = component7; AngelaSliderController.feet = component8; AngelaSliderController.hairTuft = component9; AngelaSliderController.horns = component10; AngelaSliderController.necklace = component11; AngelaSliderController.tail = component12; AngelaSliderController.glyph = component13; AngelaSliderController.bookL = component14; AngelaSliderController.bookR = component15; AngelaSliderController.shadow = component16; AngelaSliderController.boobBoneL = val5; AngelaSliderController.boobBoneR = val6; AngelaSliderController.boobBoneLOrig = val5; AngelaSliderController.boobBoneROrig = val6; AngelaSliderController.ApplySettings(); NPCPatcherBase.Log.LogInfo((object)"Angela body patched!"); } catch (Exception ex) { NPCPatcherBase.Log.LogError((object)ex); } } } private const string NPC_NAME = "Angela"; private static Mesh _newBoobs; private static Mesh _newBody; private static Mesh _newSkirt; public static Sprite facepic1Sprite; public static Sprite facepic2Sprite; public static Sprite facepic3Sprite; public ConfigFile config; public PluginInfo info; internal static ConfigEntry<int> textureSelector; internal static ConfigEntry<float> nippleInnie; internal static ConfigEntry<float> nippleSize; internal static ConfigEntry<float> boobSmall; internal static ConfigEntry<float> boobLarge; internal static ConfigEntry<float> nippleGone; internal static ConfigEntry<bool> topless; internal static ConfigEntry<bool> bottomless; internal static ConfigEntry<bool> nippleInnieWhenClothed; internal static ConfigEntry<bool> nippleGoneWhenClothed; internal static ConfigEntry<float> assLarge; internal static ConfigEntry<float> thighsThick; private static AtlyssDropdown textureDropdown; public static AngelaSliderController AngelaSliderController; public static TextureChangeAnimEvent eyeController; public static List<string> textureFolderNames = new List<string>(); public static int selectedTexture; internal static List<Dialog> DialogList = new List<Dialog>(); private void Start() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown InitConfig(); Settings.OnApplySettings.AddListener((UnityAction)delegate { if (textureSelector.Value != selectedTexture) { textureSelector.Value = selectedTexture; AngelaSliderController.textureChanged = true; } config.Save(); if ((Object)(object)AngelaSliderController != (Object)null) { AngelaSliderController.ApplySettings(); } if ((Object)(object)eyeController != (Object)null) { ApplyEyeTexturesToEyeController(); } }); try { DirectoryInfo[] directories = new DirectoryInfo(Path.Combine(NPCPatcherBase.texturePath, "Angela")).GetDirectories(); for (int i = 0; i < directories.Length; i++) { textureFolderNames.Add(directories[i].Name); if (NPCPatcherBase.VerboseLogging) { NPCPatcherBase.Log.LogInfo((object)("Loaded " + textureFolderNames[i] + " texture group")); } } if (selectedTexture > directories.Length - 1) { selectedTexture = directories.Length - 1; } } catch (Exception ex) { NPCPatcherBase.Log.LogError((object)("Unable to find textures in path " + NPCPatcherBase.texturePath + ". Continuing.")); NPCPatcherBase.Log.LogError((object)ex.ToString()); } AddSettings(); try { _newBoobs = NPCPatcherBase.bundle.LoadAsset<Mesh>("angela_boobs"); _newBody = NPCPatcherBase.bundle.LoadAsset<Mesh>("angela_base"); _newSkirt = NPCPatcherBase.bundle.LoadAsset<Mesh>("angela_robeSkirt"); } catch (Exception ex2) { NPCPatcherBase.Log.LogError((object)("Unable to find angelaboobs.unity3d in " + info.Location + ". Patcher will not run correctly.")); NPCPatcherBase.Log.LogError((object)ex2.ToString()); } } private static void ApplyEyeTexturesToEyeController() { eyeController._textureStructs[0]._texture = (Texture)(object)NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Angela, TexturesEnum.Eye, textureFolderNames[selectedTexture]); eyeController._textureStructs[1]._texture = (Texture)(object)NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Angela, TexturesEnum.EyeLeft, textureFolderNames[selectedTexture]); eyeController._textureStructs[2]._texture = (Texture)(object)NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Angela, TexturesEnum.EyeRight, textureFolderNames[selectedTexture]); eyeController._textureStructs[3]._texture = (Texture)(object)NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Angela, TexturesEnum.EyeDown, textureFolderNames[selectedTexture]); eyeController._textureStructs[4]._texture = (Texture)(object)NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Angela, TexturesEnum.Eye3, textureFolderNames[selectedTexture]); eyeController._textureStructs[5]._texture = (Texture)(object)NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Angela, TexturesEnum.Eye2, textureFolderNames[selectedTexture]); eyeController._textureStructs[6]._texture = (Texture)(object)NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Angela, TexturesEnum.EyePissed, textureFolderNames[selectedTexture]); eyeController._textureStructs[7]._texture = (Texture)(object)NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Angela, TexturesEnum.Eye4, textureFolderNames[selectedTexture]); eyeController._textureStructs[8]._texture = (Texture)(object)NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Angela, TexturesEnum.Eye5, textureFolderNames[selectedTexture]); } private void InitConfig() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Expected O, but got Unknown //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Expected O, but got Unknown //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Expected O, but got Unknown //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Expected O, but got Unknown //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Expected O, but got Unknown //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Expected O, but got Unknown //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Expected O, but got Unknown //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Expected O, but got Unknown //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Expected O, but got Unknown //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Expected O, but got Unknown //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Expected O, but got Unknown //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Expected O, but got Unknown //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Expected O, but got Unknown //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Expected O, but got Unknown //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Expected O, but got Unknown //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Expected O, but got Unknown //IL_0219: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Expected O, but got Unknown //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Expected O, but got Unknown //IL_0255: Unknown result type (might be due to invalid IL or missing references) //IL_025c: Expected O, but got Unknown //IL_0267: Unknown result type (might be due to invalid IL or missing references) //IL_026e: Expected O, but got Unknown //IL_0291: Unknown result type (might be due to invalid IL or missing references) //IL_0298: Expected O, but got Unknown //IL_02a3: Unknown result type (might be due to invalid IL or missing references) //IL_02aa: Expected O, but got Unknown ConfigDefinition val = new ConfigDefinition("AngelaBoobs", "TextureSelection"); ConfigDescription val2 = new ConfigDescription("TextureSelection", (AcceptableValueBase)null, Array.Empty<object>()); textureSelector = config.Bind<int>(val, 0, val2); selectedTexture = textureSelector.Value; ConfigDefinition val3 = new ConfigDefinition("AngelaBoobs", "Topless"); ConfigDescription val4 = new ConfigDescription("Topless", (AcceptableValueBase)null, Array.Empty<object>()); topless = config.Bind<bool>(val3, false, val4); ConfigDefinition val5 = new ConfigDefinition("AngelaBoobs", "Bottomless"); ConfigDescription val6 = new ConfigDescription("Bottomless", (AcceptableValueBase)null, Array.Empty<object>()); bottomless = config.Bind<bool>(val5, false, val6); ConfigDefinition val7 = new ConfigDefinition("AngelaBoobs", "NippleInnieWhenClothed"); ConfigDescription val8 = new ConfigDescription("Nipples flat when clothed", (AcceptableValueBase)null, Array.Empty<object>()); nippleInnieWhenClothed = config.Bind<bool>(val7, true, val8); ConfigDefinition val9 = new ConfigDefinition("AngelaBoobs", "NippleGoneWhenClothed"); ConfigDescription val10 = new ConfigDescription("Nipples gone when clothed", (AcceptableValueBase)null, Array.Empty<object>()); nippleGoneWhenClothed = config.Bind<bool>(val9, false, val10); ConfigDefinition val11 = new ConfigDefinition("AngelaBoobs", "NippleInnie"); ConfigDescription val12 = new ConfigDescription("Flat nipple tips", (AcceptableValueBase)null, Array.Empty<object>()); nippleInnie = config.Bind<float>(val11, 0f, val12); ConfigDefinition val13 = new ConfigDefinition("AngelaBoobs", "NippleSize"); ConfigDescription val14 = new ConfigDescription("Nipple size", (AcceptableValueBase)null, Array.Empty<object>()); nippleSize = config.Bind<float>(val13, 0f, val14); ConfigDefinition val15 = new ConfigDefinition("AngelaBoobs", "BreastSmall"); ConfigDescription val16 = new ConfigDescription("Smaller breasts", (AcceptableValueBase)null, Array.Empty<object>()); boobSmall = config.Bind<float>(val15, 0f, val16); ConfigDefinition val17 = new ConfigDefinition("AngelaBoobs", "BreastLarge"); ConfigDescription val18 = new ConfigDescription("Larger breasts", (AcceptableValueBase)null, Array.Empty<object>()); boobLarge = config.Bind<float>(val17, 0f, val18); ConfigDefinition val19 = new ConfigDefinition("AngelaBoobs", "NippleGone"); ConfigDescription val20 = new ConfigDescription("Make nipples go away", (AcceptableValueBase)null, Array.Empty<object>()); nippleGone = config.Bind<float>(val19, 0f, val20); ConfigDefinition val21 = new ConfigDefinition("AngelaBoobs", "AssLarge"); ConfigDescription val22 = new ConfigDescription("Make ass bigger", (AcceptableValueBase)null, Array.Empty<object>()); assLarge = config.Bind<float>(val21, 0f, val22); ConfigDefinition val23 = new ConfigDefinition("AngelaBoobs", "ThighsThick"); ConfigDescription val24 = new ConfigDescription("Make thighs thicker", (AcceptableValueBase)null, Array.Empty<object>()); thighsThick = config.Bind<float>(val23, 0f, val24); } private void AddSettings() { SettingsTab modTab = Settings.ModTab; modTab.AddHeader("Angela Appearance Mod"); textureDropdown = modTab.AddDropdown("Texture", textureFolderNames, selectedTexture); textureDropdown.OnValueChanged.AddListener((UnityAction<int>)delegate(int x) { selectedTexture = x; }); modTab.AddToggle("Topless", topless); modTab.AddToggle("Bottomless", bottomless); modTab.AddSlider("Larger Breasts", boobLarge, false); modTab.AddSlider("Smaller Breasts", boobSmall, false); modTab.AddSlider("Nipple Size", nippleSize, false); modTab.AddSlider("Nipple Innie", nippleInnie, false); modTab.AddSlider("Larger Ass", assLarge, false); modTab.AddSlider("Thicker Thighs", thighsThick, false); modTab.AddToggle("Nipples flat when clothed", nippleInnieWhenClothed); modTab.AddToggle("Nipples gone when clothed", nippleGoneWhenClothed); } } public class AngelaSliderController : MonoBehaviour { public float nippleInnie; public float nippleSize; public float boobSmall; public float boobLarge; public float nippleGone; public float boobSag; public float assSize; public float thighsThick; public bool textureChanged = true; public SkinnedMeshRenderer boobs; public SkinnedMeshRenderer torso; public SkinnedMeshRenderer skirt; public SkinnedMeshRenderer eyes; public SkinnedMeshRenderer feet; public SkinnedMeshRenderer hairTuft; public SkinnedMeshRenderer horns; public SkinnedMeshRenderer necklace; public SkinnedMeshRenderer arms; public SkinnedMeshRenderer ears; public SkinnedMeshRenderer tail; public MeshRenderer glyph; public MeshRenderer bookL; public MeshRenderer bookR; public MeshRenderer shadow; public DynamicBone boobBoneL; public DynamicBone boobBoneR; public DynamicBone boobBoneLOrig; public DynamicBone boobBoneROrig; public void ApplySettings() { //IL_0cd8: Unknown result type (might be due to invalid IL or missing references) //IL_0ce2: Unknown result type (might be due to invalid IL or missing references) //IL_0d13: Unknown result type (might be due to invalid IL or missing references) //IL_0d1d: Unknown result type (might be due to invalid IL or missing references) //IL_0d4e: Unknown result type (might be due to invalid IL or missing references) //IL_0d58: Unknown result type (might be due to invalid IL or missing references) nippleGone = ((AngelaSliderBase.nippleGoneWhenClothed.Value && !AngelaSliderBase.topless.Value) ? 100f : (AngelaSliderBase.nippleGone.Value * 100f)); nippleInnie = ((AngelaSliderBase.nippleInnieWhenClothed.Value && !AngelaSliderBase.topless.Value) ? 100f : (AngelaSliderBase.nippleInnie.Value * 100f)); boobSmall = AngelaSliderBase.boobSmall.Value * 100f; boobLarge = AngelaSliderBase.boobLarge.Value * 100f; nippleSize = AngelaSliderBase.nippleSize.Value * 100f; boobSag = (AngelaSliderBase.topless.Value ? (100f - boobSmall + boobLarge / 2f) : 0f); assSize = AngelaSliderBase.assLarge.Value * 100f; thighsThick = AngelaSliderBase.thighsThick.Value * 100f; boobs.SetBlendShapeWeight(boobs.sharedMesh.GetBlendShapeIndex("key_nippleInnie"), nippleInnie); boobs.SetBlendShapeWeight(boobs.sharedMesh.GetBlendShapeIndex("key_boobSmall"), boobSmall); boobs.SetBlendShapeWeight(boobs.sharedMesh.GetBlendShapeIndex("key_boobSize"), boobLarge); boobs.SetBlendShapeWeight(boobs.sharedMesh.GetBlendShapeIndex("key_nippleSize"), nippleSize); boobs.SetBlendShapeWeight(boobs.sharedMesh.GetBlendShapeIndex("key_nippleGone"), nippleGone); boobs.SetBlendShapeWeight(boobs.sharedMesh.GetBlendShapeIndex("key_boobSag"), boobSag); torso.SetBlendShapeWeight(torso.sharedMesh.GetBlendShapeIndex("key_assSize"), assSize); torso.SetBlendShapeWeight(torso.sharedMesh.GetBlendShapeIndex("key_thighSize"), thighsThick); skirt.SetBlendShapeWeight(skirt.sharedMesh.GetBlendShapeIndex("key_thighSize"), thighsThick); if (AngelaSliderBase.topless.Value) { if (AngelaSliderBase.bottomless.Value) { NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.Base] = NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Angela, TexturesEnum.Base, AngelaSliderBase.textureFolderNames[AngelaSliderBase.selectedTexture], "angelaTex_01_nude"); } else { NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.Base] = NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Angela, TexturesEnum.Base, AngelaSliderBase.textureFolderNames[AngelaSliderBase.selectedTexture], "angelaTex_01_topless"); } } else if (AngelaSliderBase.bottomless.Value) { NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.Base] = NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Angela, TexturesEnum.Base, AngelaSliderBase.textureFolderNames[AngelaSliderBase.selectedTexture], "angelaTex_01_bottomless"); } else { NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.Base] = NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Angela, TexturesEnum.Base, AngelaSliderBase.textureFolderNames[AngelaSliderBase.selectedTexture], "angelaTex_01_base"); } ((Renderer)boobs).material.mainTexture = (Texture)(object)NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.Base]; ((Renderer)torso).materials[0].mainTexture = (Texture)(object)NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.Base]; ((Renderer)arms).materials[0].mainTexture = (Texture)(object)NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.Base]; ((Renderer)hairTuft).material.mainTexture = (Texture)(object)NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.Base]; if (textureChanged) { NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.Face] = NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Angela, TexturesEnum.Face, AngelaSliderBase.textureFolderNames[AngelaSliderBase.selectedTexture]); ((Renderer)torso).materials[1].mainTexture = (Texture)(object)NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.Face]; NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.Skirt] = NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Angela, TexturesEnum.Skirt, AngelaSliderBase.textureFolderNames[AngelaSliderBase.selectedTexture]); NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.Blue3] = NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Angela, TexturesEnum.Blue3, AngelaSliderBase.textureFolderNames[AngelaSliderBase.selectedTexture]); ((Renderer)horns).material.mainTexture = (Texture)(object)NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.Blue3]; ((Renderer)arms).materials[1].mainTexture = (Texture)(object)NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.Blue3]; NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.Tail] = NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Angela, TexturesEnum.Tail, AngelaSliderBase.textureFolderNames[AngelaSliderBase.selectedTexture]); ((Renderer)tail).materials[0].mainTexture = (Texture)(object)NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.Tail]; ((Renderer)tail).materials[1].mainTexture = (Texture)(object)NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.Blue3]; ((Renderer)ears).materials[0].mainTexture = (Texture)(object)NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.Tail]; NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.Bell] = NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Angela, TexturesEnum.Bell, AngelaSliderBase.textureFolderNames[AngelaSliderBase.selectedTexture]); ((Renderer)ears).materials[1].mainTexture = (Texture)(object)NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.Bell]; NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.Eye] = NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Angela, TexturesEnum.Eye, AngelaSliderBase.textureFolderNames[AngelaSliderBase.selectedTexture]); NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.Eye2] = NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Angela, TexturesEnum.Eye2, AngelaSliderBase.textureFolderNames[AngelaSliderBase.selectedTexture]); NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.Eye3] = NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Angela, TexturesEnum.Eye3, AngelaSliderBase.textureFolderNames[AngelaSliderBase.selectedTexture]); NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.Eye4] = NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Angela, TexturesEnum.Eye4, AngelaSliderBase.textureFolderNames[AngelaSliderBase.selectedTexture]); NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.Eye5] = NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Angela, TexturesEnum.Eye5, AngelaSliderBase.textureFolderNames[AngelaSliderBase.selectedTexture]); NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.EyeDown] = NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Angela, TexturesEnum.EyeDown, AngelaSliderBase.textureFolderNames[AngelaSliderBase.selectedTexture]); NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.EyeLeft] = NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Angela, TexturesEnum.EyeLeft, AngelaSliderBase.textureFolderNames[AngelaSliderBase.selectedTexture]); NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.EyeRight] = NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Angela, TexturesEnum.EyeRight, AngelaSliderBase.textureFolderNames[AngelaSliderBase.selectedTexture]); NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.EyePissed] = NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Angela, TexturesEnum.EyePissed, AngelaSliderBase.textureFolderNames[AngelaSliderBase.selectedTexture]); switch (((Object)((Renderer)eyes).material.mainTexture).name) { case "angelaEyeTex.png": ((Renderer)eyes).material.mainTexture = (Texture)(object)NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.Eye]; break; case "angelaEyeTex2.png": ((Renderer)eyes).material.mainTexture = (Texture)(object)NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.Eye2]; break; case "angelaEyeTex3.png": ((Renderer)eyes).material.mainTexture = (Texture)(object)NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.Eye3]; break; case "angelaEyeTex4.png": ((Renderer)eyes).material.mainTexture = (Texture)(object)NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.Eye4]; break; case "angelaEyeTex_5.png": ((Renderer)eyes).material.mainTexture = (Texture)(object)NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.Eye5]; break; case "angelaEyeTex_down.png": ((Renderer)eyes).material.mainTexture = (Texture)(object)NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.EyeDown]; break; case "angelaEyeTex_L.png": ((Renderer)eyes).material.mainTexture = (Texture)(object)NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.EyeLeft]; break; case "angelaEyeTex_R.png": ((Renderer)eyes).material.mainTexture = (Texture)(object)NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.EyeRight]; break; case "angelaEyeTex_pissed.png": ((Renderer)eyes).material.mainTexture = (Texture)(object)NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.EyePissed]; break; } NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.Red] = NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Angela, TexturesEnum.Red, AngelaSliderBase.textureFolderNames[AngelaSliderBase.selectedTexture]); ((Renderer)eyes).materials[1].mainTexture = (Texture)(object)NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.Red]; NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.Blui2] = NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Angela, TexturesEnum.Blui2, AngelaSliderBase.textureFolderNames[AngelaSliderBase.selectedTexture]); ((Renderer)feet).materials[0].mainTexture = (Texture)(object)NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.Blui2]; ((Renderer)feet).materials[1].mainTexture = (Texture)(object)NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.Blui2]; NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.Blu] = NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Angela, TexturesEnum.Blu, AngelaSliderBase.textureFolderNames[AngelaSliderBase.selectedTexture]); ((Renderer)necklace).materials[0].mainTexture = (Texture)(object)NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.Blue3]; ((Renderer)necklace).materials[1].mainTexture = (Texture)(object)NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.Bell]; NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.Glyph] = NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Angela, TexturesEnum.Glyph, AngelaSliderBase.textureFolderNames[AngelaSliderBase.selectedTexture], "tomeGlyph"); ((Renderer)glyph).material.mainTexture = (Texture)(object)NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.Glyph]; NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.BookSpine] = NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Angela, TexturesEnum.BookSpine, AngelaSliderBase.textureFolderNames[AngelaSliderBase.selectedTexture]); NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.BookCover] = NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Angela, TexturesEnum.BookCover, AngelaSliderBase.textureFolderNames[AngelaSliderBase.selectedTexture]); ((Renderer)bookL).materials[0].mainTexture = (Texture)(object)NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.BookSpine]; ((Renderer)bookL).materials[1].mainTexture = (Texture)(object)NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.BookCover]; ((Renderer)bookR).materials[0].mainTexture = (Texture)(object)NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.BookSpine]; ((Renderer)bookR).materials[1].mainTexture = (Texture)(object)NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.BookCover]; NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.Shadow] = NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Angela, TexturesEnum.Shadow, AngelaSliderBase.textureFolderNames[AngelaSliderBase.selectedTexture]); ((Renderer)shadow).material.mainTexture = (Texture)(object)NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.Shadow]; NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.FacePic1] = NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Angela, TexturesEnum.FacePic1, AngelaSliderBase.textureFolderNames[AngelaSliderBase.selectedTexture]); NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.FacePic2] = NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Angela, TexturesEnum.FacePic2, AngelaSliderBase.textureFolderNames[AngelaSliderBase.selectedTexture]); NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.FacePic3] = NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Angela, TexturesEnum.FacePic3, AngelaSliderBase.textureFolderNames[AngelaSliderBase.selectedTexture]); AngelaSliderBase.facepic1Sprite = Sprite.Create(NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.FacePic1], AngelaSliderBase.facepic1Sprite.rect, AngelaSliderBase.facepic1Sprite.pivot, AngelaSliderBase.facepic1Sprite.pixelsPerUnit, 0u); AngelaSliderBase.facepic2Sprite = Sprite.Create(NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.FacePic2], AngelaSliderBase.facepic2Sprite.rect, AngelaSliderBase.facepic2Sprite.pivot, AngelaSliderBase.facepic2Sprite.pixelsPerUnit, 0u); AngelaSliderBase.facepic3Sprite = Sprite.Create(NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.FacePic3], AngelaSliderBase.facepic3Sprite.rect, AngelaSliderBase.facepic3Sprite.pivot, AngelaSliderBase.facepic3Sprite.pixelsPerUnit, 0u); for (int i = 0; i < AngelaSliderBase.DialogList.Count; i++) { if (((Object)AngelaSliderBase.DialogList[i].facepic.texture).name == "facepic_angela01") { AngelaSliderBase.DialogList[i].facepic = AngelaSliderBase.facepic1Sprite; } else if (((Object)AngelaSliderBase.DialogList[i].facepic.texture).name == "facepic_angela02") { AngelaSliderBase.DialogList[i].facepic = AngelaSliderBase.facepic2Sprite; } else if (((Object)AngelaSliderBase.DialogList[i].facepic.texture).name == "facepic_angela03") { AngelaSliderBase.DialogList[i].facepic = AngelaSliderBase.facepic3Sprite; } } textureChanged = false; } ((Renderer)skirt).material.mainTexture = (Texture)(AngelaSliderBase.bottomless.Value ? ((object)Texture2D.blackTexture) : ((object)NPCPatcherBase.textureDictionary[NPCEnum.Angela][TexturesEnum.Skirt])); boobBoneL = boobBoneLOrig; boobBoneR = boobBoneROrig; if (!(boobSmall > 0f)) { return; } float stiffness = Mathf.Min(1f, boobBoneL.m_Stiffness + boobSmall / 100f); foreach (Particle particle in boobBoneL.m_Particles) { particle.m_Stiffness = stiffness; } foreach (Particle particle2 in boobBoneR.m_Particles) { particle2.m_Stiffness = stiffness; } boobBoneL.m_Stiffness = stiffness; boobBoneR.m_Stiffness = stiffness; } } public class EnokSliderBase : MonoBehaviour { [HarmonyPatch(typeof(NetNPC), "Start")] public static class AddNetNPCPatch { [HarmonyPostfix] public static void NetNPCAwakePatch(NetNPC __instance) { //IL_0274: Unknown result type (might be due to invalid IL or missing references) //IL_027b: Expected O, but got Unknown //IL_02c1: Unknown result type (might be due to invalid IL or missing references) //IL_02c8: Expected O, but got Unknown //IL_030e: Unknown result type (might be due to invalid IL or missing references) //IL_0315: Expected O, but got Unknown //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) try { if (!((object)__instance).ToString().Contains("_npc_Enok")) { return; } NPCPatcherBase.Log.LogInfo((object)"Enok located"); EnokSliderController = ((Component)__instance).gameObject.AddComponent<EnokSliderController>(); DialogTrigger component = ((Component)((Component)__instance).transform.Find("_dialogTrigger_01")).GetComponent<DialogTrigger>(); DialogBranch[] dialogBranches = component._scriptDialogData._dialogBranches; foreach (DialogBranch val in dialogBranches) { Dialog[] dialogs = val.dialogs; foreach (Dialog val2 in dialogs) { DialogList.Add(val2); facepic1Sprite = Sprite.Create(NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Enok, TexturesEnum.FacePic1, textureFolderNames[selectedTexture]), val2.facepic.rect, val2.facepic.pivot, val2.facepic.pixelsPerUnit, 0u); val2.facepic = facepic1Sprite; } } Transform val3 = ((Component)__instance).transform.Find("_visual").Find("enok_fbx"); SkinnedMeshRenderer component2 = ((Component)val3.Find("_enok_cloth")).GetComponent<SkinnedMeshRenderer>(); component2.sharedMesh = _newCloth; SkinnedMeshRenderer component3 = ((Component)val3.Find("_enok_base")).GetComponent<SkinnedMeshRenderer>(); component3.sharedMesh = _newTorso; SkinnedMeshRenderer component4 = ((Component)val3.Find("_enok_belt")).GetComponent<SkinnedMeshRenderer>(); component4.sharedMesh = _newBelt; SkinnedMeshRenderer component5 = ((Component)val3.Find("_enok_arms")).GetComponent<SkinnedMeshRenderer>(); component5.sharedMesh = _newArms; SkinnedMeshRenderer component6 = ((Component)val3.Find("_enok_ears")).GetComponent<SkinnedMeshRenderer>(); SkinnedMeshRenderer component7 = ((Component)val3.Find("_enok_neckbrace")).GetComponent<SkinnedMeshRenderer>(); SkinnedMeshRenderer component8 = ((Component)val3.Find("_enok_feet")).GetComponent<SkinnedMeshRenderer>(); component8.sharedMesh = _newFeet; SkinnedMeshRenderer component9 = ((Component)val3.Find("_enok_horns")).GetComponent<SkinnedMeshRenderer>(); SkinnedMeshRenderer component10 = ((Component)val3.Find("_enok_tail")).GetComponent<SkinnedMeshRenderer>(); MeshRenderer component11 = ((Component)((Component)__instance).transform.Find("_visual").Find("_shadowProjection").GetChild(0)).GetComponent<MeshRenderer>(); Transform child = val3.Find("Armature_character").GetChild(0).GetChild(0) .GetChild(0) .Find("lowBody") .GetChild(0) .GetChild(0); MeshRenderer component12 = ((Component)child.Find("heavyAxe_01")).GetComponent<MeshRenderer>(); MeshRenderer component13 = ((Component)child.Find("heavyAxe_02")).GetComponent<MeshRenderer>(); GameObject val4 = new GameObject("_enok_nipples"); val4.transform.SetParent(val3); SkinnedMeshRenderer val5 = val4.gameObject.AddComponent<SkinnedMeshRenderer>(); val5.bones = component3.bones; ((Renderer)val5).material = ((Renderer)component3).material; val5.sharedMesh = _nipples; GameObject val6 = new GameObject("_enok_beard"); val6.transform.SetParent(val3); SkinnedMeshRenderer val7 = val6.gameObject.AddComponent<SkinnedMeshRenderer>(); val7.bones = component3.bones; ((Renderer)val7).material = ((Renderer)component3).material; val7.sharedMesh = _beard; GameObject val8 = new GameObject("_enok_eyes"); val8.transform.SetParent(val3); SkinnedMeshRenderer val9 = val8.gameObject.AddComponent<SkinnedMeshRenderer>(); val9.bones = component3.bones; ((Renderer)val9).material = ((Renderer)component3).material; val9.sharedMesh = _eyes; GameObject val10 = Object.Instantiate<GameObject>(CockObject, val3); SkinnedMeshRenderer component14 = ((Component)val10.transform.GetChild(0)).gameObject.GetComponent<SkinnedMeshRenderer>(); component14.sharedMesh = dicksMeshList[selectedDick]; ((Renderer)component14).material = ((Renderer)component3).material; Transform rootBone = component14.rootBone; rootBone.SetParent(val3.Find("Armature_character").GetChild(0).GetChild(0)); EnokSliderController.cloth = component2; EnokSliderController.torso = component3; EnokSliderController.belt = component4; EnokSliderController.arms = component5; EnokSliderController.ears = component6; EnokSliderController.feet = component8; EnokSliderController.neckbrace = component7; EnokSliderController.horns = component9; EnokSliderController.tail = component10; EnokSliderController.axe1 = component12; EnokSliderController.axe2 = component13; EnokSliderController.shadow = component11; EnokSliderController.dickObject = CockObject; EnokSliderController.dick = component14; EnokSliderController.nipples = val5; EnokSliderController.beard = val7; EnokSliderController.eyes = val9; EnokSliderController.ApplySettings(); NPCPatcherBase.Log.LogInfo((object)"Enok body patched!"); } catch (Exception ex) { NPCPatcherBase.Log.LogError((object)ex); } } } private const string NPC_NAME = "Enok"; public static GameObject CockObject; public static GameObject SheathCockObject; private static Mesh _newCloth; private static Mesh _newTorso; private static Mesh _newArms; private static Mesh _newFeet; private static Mesh _newBelt; private static Mesh _nipples; private static Mesh _beard; private static Mesh _eyes; public static AnimationCurve dickAnimationCurve; public static AnimationCurve clothAnimationCurve; public static Sprite facepic1Sprite; public ConfigFile config; public PluginInfo info; internal static ConfigEntry<int> textureSelector; internal static ConfigEntry<int> dickType; internal static ConfigEntry<float> dickSize; internal static ConfigEntry<float> ballsSize; internal static ConfigEntry<float> ballsDivot; internal static ConfigEntry<KeyCode> dickErect; internal static ConfigEntry<bool> clothGone; internal static ConfigEntry<bool> helmetOff; internal static ConfigEntry<bool> beardToggle; internal static ConfigEntry<float> bodyFemboy; internal static ConfigEntry<float> bodyMuscular; internal static ConfigEntry<float> bodyAssSize; internal static ConfigEntry<float> bodyBellySize; private static AtlyssDropdown textureDropdown; private static AtlyssDropdown dickDropdown; public static EnokSliderController EnokSliderController; public static List<string> textureFolderNames = new List<string>(); public static int selectedTexture; public static List<string> dickNames = new List<string>(); public static int selectedDick; private static bool _helmetOffPrevious; public static List<Mesh> dicksMeshList = new List<Mesh>(); internal static List<Dialog> DialogList = new List<Dialog>(); private void Start() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_02d3: Unknown result type (might be due to invalid IL or missing references) //IL_02da: Unknown result type (might be due to invalid IL or missing references) //IL_02db: Unknown result type (might be due to invalid IL or missing references) //IL_02e0: Unknown result type (might be due to invalid IL or missing references) //IL_02ea: Expected O, but got Unknown InitConfig(); Settings.OnApplySettings.AddListener((UnityAction)delegate { if (textureSelector.Value != selectedTexture) { textureSelector.Value = selectedTexture; EnokSliderController.textureChanged = true; } if (helmetOff.Value != _helmetOffPrevious) { EnokSliderController.textureChanged = true; _helmetOffPrevious = helmetOff.Value; } if (dickType.Value != selectedDick) { dickType.Value = selectedDick; } config.Save(); if ((Object)(object)EnokSliderController != (Object)null) { EnokSliderController.ApplySettings(); } }); try { DirectoryInfo[] directories = new DirectoryInfo(Path.Combine(NPCPatcherBase.texturePath, "Enok")).GetDirectories(); for (int i = 0; i < directories.Length; i++) { textureFolderNames.Add(directories[i].Name); if (NPCPatcherBase.VerboseLogging) { NPCPatcherBase.Log.LogInfo((object)("Loaded " + textureFolderNames[i] + " texture group")); } } if (selectedTexture > directories.Length - 1) { selectedTexture = directories.Length - 1; } } catch (Exception ex) { NPCPatcherBase.Log.LogError((object)("Unable to find textures in path " + NPCPatcherBase.texturePath + ". Continuing.")); NPCPatcherBase.Log.LogError((object)ex.ToString()); } try { _newCloth = NPCPatcherBase.bundle.LoadAsset<Mesh>("_enok_cloth"); _nipples = NPCPatcherBase.bundle.LoadAsset<Mesh>("_enok_nipples"); _beard = NPCPatcherBase.bundle.LoadAsset<Mesh>("_enok_beard"); _eyes = NPCPatcherBase.bundle.LoadAsset<Mesh>("_enok_eyes"); _newTorso = NPCPatcherBase.bundle.LoadAsset<Mesh>("_enok_base"); _newArms = NPCPatcherBase.bundle.LoadAsset<Mesh>("_enok_arms"); _newBelt = NPCPatcherBase.bundle.LoadAsset<Mesh>("_enok_belt"); _newFeet = NPCPatcherBase.bundle.LoadAsset<Mesh>("_enok_feet"); CockObject = NPCPatcherBase.bundle.LoadAsset<GameObject>("enok_cock"); SheathCockObject = NPCPatcherBase.bundle.LoadAsset<GameObject>("enok_sheathcock"); dickNames.Add(((Object)CockObject).name); dickNames.Add(((Object)SheathCockObject).name); dicksMeshList.Add(((Component)CockObject.transform.GetChild(0)).gameObject.GetComponent<SkinnedMeshRenderer>().sharedMesh); dicksMeshList.Add(((Component)SheathCockObject.transform.GetChild(0)).gameObject.GetComponent<SkinnedMeshRenderer>().sharedMesh); } catch (Exception ex2) { NPCPatcherBase.Log.LogError((object)("Unable to load angelaboobs.unity3d in " + info.Location + ". Patcher will not run correctly.")); NPCPatcherBase.Log.LogError((object)ex2.ToString()); } AddSettings(); Keyframe val = default(Keyframe); ((Keyframe)(ref val))..ctor(0f, 0f); ((Keyframe)(ref val)).inTangent = 2.25f; ((Keyframe)(ref val)).outTangent = 2.25f; ((Keyframe)(ref val)).outWeight = 0.015f; Keyframe val2 = default(Keyframe); ((Keyframe)(ref val2))..ctor(1f, 1f); dickAnimationCurve = AnimationCurve.EaseInOut(0f, 0f, 1f, 1f); dickAnimationCurve.preWrapMode = (WrapMode)1; dickAnimationCurve.postWrapMode = (WrapMode)1; clothAnimationCurve = new AnimationCurve((Keyframe[])(object)new Keyframe[2] { val, val2 }); clothAnimationCurve.preWrapMode = (WrapMode)1; clothAnimationCurve.postWrapMode = (WrapMode)1; } private void InitConfig() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Expected O, but got Unknown //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Expected O, but got Unknown //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Expected O, but got Unknown //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Expected O, but got Unknown //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Expected O, but got Unknown //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Expected O, but got Unknown //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Expected O, but got Unknown //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Expected O, but got Unknown //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Expected O, but got Unknown //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Expected O, but got Unknown //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Expected O, but got Unknown //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Expected O, but got Unknown //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Expected O, but got Unknown //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Expected O, but got Unknown //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Expected O, but got Unknown //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Expected O, but got Unknown //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_023e: Expected O, but got Unknown //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Expected O, but got Unknown //IL_0273: Unknown result type (might be due to invalid IL or missing references) //IL_027a: Expected O, but got Unknown //IL_0285: Unknown result type (might be due to invalid IL or missing references) //IL_028c: Expected O, but got Unknown //IL_02af: Unknown result type (might be due to invalid IL or missing references) //IL_02b6: Expected O, but got Unknown //IL_02c1: Unknown result type (might be due to invalid IL or missing references) //IL_02c8: Expected O, but got Unknown //IL_02eb: Unknown result type (might be due to invalid IL or missing references) //IL_02f2: Expected O, but got Unknown //IL_02fd: Unknown result type (might be due to invalid IL or missing references) //IL_0304: Expected O, but got Unknown ConfigDefinition val = new ConfigDefinition("EnokSlider", "TextureSelection"); ConfigDescription val2 = new ConfigDescription("TextureSelection", (AcceptableValueBase)null, Array.Empty<object>()); textureSelector = config.Bind<int>(val, 0, val2); selectedTexture = textureSelector.Value; ConfigDefinition val3 = new ConfigDefinition("EnokSlider", "DickType"); ConfigDescription val4 = new ConfigDescription("DickType", (AcceptableValueBase)null, Array.Empty<object>()); dickType = config.Bind<int>(val3, 0, val4); selectedDick = dickType.Value; ConfigDefinition val5 = new ConfigDefinition("EnokSlider", "Clothless"); ConfigDescription val6 = new ConfigDescription("Clothless", (AcceptableValueBase)null, Array.Empty<object>()); clothGone = config.Bind<bool>(val5, false, val6); ConfigDefinition val7 = new ConfigDefinition("EnokSlider", "HelmetOff"); ConfigDescription val8 = new ConfigDescription("HelmetOff", (AcceptableValueBase)null, Array.Empty<object>()); helmetOff = config.Bind<bool>(val7, false, val8); _helmetOffPrevious = helmetOff.Value; ConfigDefinition val9 = new ConfigDefinition("EnokSlider", "BeardToggle"); ConfigDescription val10 = new ConfigDescription("BeardToggle", (AcceptableValueBase)null, Array.Empty<object>()); beardToggle = config.Bind<bool>(val9, true, val10); ConfigDefinition val11 = new ConfigDefinition("EnokSlider", "DickSize"); ConfigDescription val12 = new ConfigDescription("Dick size", (AcceptableValueBase)null, Array.Empty<object>()); dickSize = config.Bind<float>(val11, 0f, val12); ConfigDefinition val13 = new ConfigDefinition("EnokSlider", "BallsSize"); ConfigDescription val14 = new ConfigDescription("Balls size", (AcceptableValueBase)null, Array.Empty<object>()); ballsSize = config.Bind<float>(val13, 0f, val14); ConfigDefinition val15 = new ConfigDefinition("EnokSlider", "BallsDivot"); ConfigDescription val16 = new ConfigDescription("Balls separation", (AcceptableValueBase)null, Array.Empty<object>()); ballsDivot = config.Bind<float>(val15, 0f, val16); ConfigDefinition val17 = new ConfigDefinition("EnokSlider", "BodyMuscular"); ConfigDescription val18 = new ConfigDescription("Add muscles", (AcceptableValueBase)null, Array.Empty<object>()); bodyMuscular = config.Bind<float>(val17, 0f, val18); ConfigDefinition val19 = new ConfigDefinition("EnokSlider", "BodyMuscular"); ConfigDescription val20 = new ConfigDescription("Femboy bodytype", (AcceptableValueBase)null, Array.Empty<object>()); bodyFemboy = config.Bind<float>(val19, 0f, val20); ConfigDefinition val21 = new ConfigDefinition("EnokSlider", "BodyBellySize"); ConfigDescription val22 = new ConfigDescription("Belly Size", (AcceptableValueBase)null, Array.Empty<object>()); bodyBellySize = config.Bind<float>(val21, 0f, val22); ConfigDefinition val23 = new ConfigDefinition("EnokSlider", "BodyAssSize"); ConfigDescription val24 = new ConfigDescription("Ass Size", (AcceptableValueBase)null, Array.Empty<object>()); bodyAssSize = config.Bind<float>(val23, 0f, val24); ConfigDefinition val25 = new ConfigDefinition("EnokSlider", "DickErect"); ConfigDescription val26 = new ConfigDescription("Erection hotkey", (AcceptableValueBase)null, Array.Empty<object>()); dickErect = config.Bind<KeyCode>(val25, (KeyCode)46, val26); } private void AddSettings() { SettingsTab modTab = Settings.ModTab; modTab.AddHeader("Enok Appearance Mod"); textureDropdown = modTab.AddDropdown("Texture", textureFolderNames, selectedTexture); textureDropdown.OnValueChanged.AddListener((UnityAction<int>)delegate(int x) { selectedTexture = x; }); dickDropdown = modTab.AddDropdown("Dick Type", dickNames, selectedDick); dickDropdown.OnValueChanged.AddListener((UnityAction<int>)delegate(int x) { selectedDick = x; }); modTab.AddToggle("Bottomless", clothGone); modTab.AddToggle("Helmet off (unfinished)", helmetOff); modTab.AddToggle("Beard", beardToggle); modTab.AddSlider("Dick size", dickSize, false); modTab.AddSlider("Balls size", ballsSize, false); modTab.AddSlider("Balls separation", ballsDivot, false); modTab.AddSlider("More muscular", bodyMuscular, false); modTab.AddSlider("Bigger ass", bodyAssSize, false); modTab.AddSlider("Femboy body", bodyFemboy, false); modTab.AddSlider("Belly size", bodyBellySize, false); modTab.AddKeyButton("Erection shortcut", dickErect); } } public class EnokSliderController : MonoBehaviour { private float _arousalTarget; private float _arousalCurrent; public float dickSize; public float ballsSize; public float bodyFemboy; public float bodyMuscular; public float bodyBellySize; public float bodyAssSize; public float ballsDivot; public float helmetOff; private float _dickSizeSheathForCloth; public bool textureChanged = true; public SkinnedMeshRenderer cloth; public SkinnedMeshRenderer torso; public SkinnedMeshRenderer belt; public SkinnedMeshRenderer feet; public SkinnedMeshRenderer horns; public SkinnedMeshRenderer neckbrace; public SkinnedMeshRenderer arms; public SkinnedMeshRenderer ears; public SkinnedMeshRenderer tail; public SkinnedMeshRenderer dick; public GameObject dickObject; public SkinnedMeshRenderer nipples; public SkinnedMeshRenderer beard; public SkinnedMeshRenderer eyes; public MeshRenderer axe1; public MeshRenderer axe2; public MeshRenderer shadow; private int _dickTexture; private int _beardTexture; private int _eyesTexture; private void Awake() { _dickTexture = NPCPatcherBase.customTextures.Count; NPCPatcherBase.customTextures.Add(NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Enok, TexturesEnum.Tex3, EnokSliderBase.textureFolderNames[EnokSliderBase.selectedTexture], "enokTex_dick")); _beardTexture = NPCPatcherBase.customTextures.Count; NPCPatcherBase.customTextures.Add(NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Enok, TexturesEnum.Tex3, EnokSliderBase.textureFolderNames[EnokSliderBase.selectedTexture], "enok_beardTex")); _eyesTexture = NPCPatcherBase.customTextures.Count; NPCPatcherBase.customTextures.Add(NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Enok, TexturesEnum.Tex3, EnokSliderBase.textureFolderNames[EnokSliderBase.selectedTexture], "enokTex_eyes")); } public void ApplyBones(GameObject go) { if (!((Object)go).name.Contains("masterBone")) { DynamicBone val = go.AddComponent<DynamicBone>(); val.m_Root = go.transform; val.m_Stiffness = 0.85f; val.m_Damping = 0.33f; val.m_Inert = 0.37f; if (((Object)go).name.Contains("Balls")) { val.m_Stiffness = 0.4f; val.m_Damping = 0.2f; val.m_Inert = 0.15f; } } } public void ApplySettings() { //IL_0731: Unknown result type (might be due to invalid IL or missing references) //IL_0789: Unknown result type (might be due to invalid IL or missing references) //IL_07e1: Unknown result type (might be due to invalid IL or missing references) //IL_08e3: Unknown result type (might be due to invalid IL or missing references) //IL_08ed: Unknown result type (might be due to invalid IL or missing references) dick.sharedMesh = EnokSliderBase.dicksMeshList[EnokSliderBase.selectedDick]; float num = EnokSliderBase.dickAnimationCurve.Evaluate(_arousalCurrent) * 100f; float num2 = EnokSliderBase.clothAnimationCurve.Evaluate(_arousalCurrent) * 100f; dickSize = EnokSliderBase.dickSize.Value * 100f; ballsSize = EnokSliderBase.ballsSize.Value * 100f; ballsDivot = EnokSliderBase.ballsDivot.Value * 100f; _dickSizeSheathForCloth = ((((Object)dick.sharedMesh).name == "_" + ((Object)EnokSliderBase.SheathCockObject).name) ? (MathF.Max(EnokSliderBase.dickSize.Value - num2 / 100f, 0f) * 100f) : 0f); bodyFemboy = EnokSliderBase.bodyFemboy.Value * 100f; bodyMuscular = EnokSliderBase.bodyMuscular.Value * 100f; bodyBellySize = EnokSliderBase.bodyBellySize.Value * 100f; bodyAssSize = EnokSliderBase.bodyAssSize.Value * 100f; helmetOff = (EnokSliderBase.helmetOff.Value ? 100f : 0f); dick.SetBlendShapeWeight(dick.sharedMesh.GetBlendShapeIndex("key_erect"), num); dick.SetBlendShapeWeight(dick.sharedMesh.GetBlendShapeIndex("key_dickSizeErect"), num * (dickSize / 100f)); cloth.SetBlendShapeWeight(cloth.sharedMesh.GetBlendShapeIndex("key_erect"), num2); cloth.SetBlendShapeWeight(cloth.sharedMesh.GetBlendShapeIndex("key_dickSizeErect"), num2 * (dickSize / 100f)); dick.SetBlendShapeWeight(dick.sharedMesh.GetBlendShapeIndex("key_dickSize"), dickSize); dick.SetBlendShapeWeight(dick.sharedMesh.GetBlendShapeIndex("key_ballSize"), ballsSize); dick.SetBlendShapeWeight(dick.sharedMesh.GetBlendShapeIndex("key_ballDivot"), ballsDivot); cloth.SetBlendShapeWeight(cloth.sharedMesh.GetBlendShapeIndex("key_dickSize"), Mathf.Min(dickSize * 1.5f, 100f)); cloth.SetBlendShapeWeight(cloth.sharedMesh.GetBlendShapeIndex("key_dickSizeSheath"), _dickSizeSheathForCloth); cloth.SetBlendShapeWeight(cloth.sharedMesh.GetBlendShapeIndex("key_bellySize"), bodyBellySize); cloth.SetBlendShapeWeight(cloth.sharedMesh.GetBlendShapeIndex("key_muscles"), bodyMuscular); belt.SetBlendShapeWeight(belt.sharedMesh.GetBlendShapeIndex("key_muscles"), bodyMuscular); belt.SetBlendShapeWeight(belt.sharedMesh.GetBlendShapeIndex("key_bellySize"), bodyBellySize); belt.SetBlendShapeWeight(belt.sharedMesh.GetBlendShapeIndex("key_femboy"), bodyFemboy); torso.SetBlendShapeWeight(torso.sharedMesh.GetBlendShapeIndex("key_muscles"), bodyMuscular); torso.SetBlendShapeWeight(torso.sharedMesh.GetBlendShapeIndex("key_bellySize"), bodyBellySize); torso.SetBlendShapeWeight(torso.sharedMesh.GetBlendShapeIndex("key_femboy"), bodyFemboy); torso.SetBlendShapeWeight(torso.sharedMesh.GetBlendShapeIndex("key_assSize"), bodyAssSize); torso.SetBlendShapeWeight(torso.sharedMesh.GetBlendShapeIndex("key_helmOff"), helmetOff); nipples.SetBlendShapeWeight(nipples.sharedMesh.GetBlendShapeIndex("key_muscles"), bodyMuscular); nipples.SetBlendShapeWeight(nipples.sharedMesh.GetBlendShapeIndex("key_femboy"), bodyFemboy); arms.SetBlendShapeWeight(arms.sharedMesh.GetBlendShapeIndex("key_muscles"), bodyMuscular); arms.SetBlendShapeWeight(arms.sharedMesh.GetBlendShapeIndex("key_femboy"), bodyFemboy); if (textureChanged) { NPCPatcherBase.textureDictionary[NPCEnum.Enok][TexturesEnum.Tex1] = (EnokSliderBase.helmetOff.Value ? NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Enok, TexturesEnum.Tex1, EnokSliderBase.textureFolderNames[EnokSliderBase.selectedTexture], "enokTex_01_helmetOff") : NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Enok, TexturesEnum.Tex1, EnokSliderBase.textureFolderNames[EnokSliderBase.selectedTexture])); ((Renderer)torso).material.mainTexture = (Texture)(object)NPCPatcherBase.textureDictionary[NPCEnum.Enok][TexturesEnum.Tex1]; ((Renderer)nipples).material.mainTexture = (Texture)(object)NPCPatcherBase.textureDictionary[NPCEnum.Enok][TexturesEnum.Tex1]; ((Renderer)feet).material.mainTexture = (Texture)(object)NPCPatcherBase.textureDictionary[NPCEnum.Enok][TexturesEnum.Tex1]; NPCPatcherBase.textureDictionary[NPCEnum.Enok][TexturesEnum.Red] = NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Enok, TexturesEnum.Red, EnokSliderBase.textureFolderNames[EnokSliderBase.selectedTexture]); ((Renderer)horns).material.mainTexture = (Texture)(object)NPCPatcherBase.textureDictionary[NPCEnum.Enok][TexturesEnum.Red]; NPCPatcherBase.textureDictionary[NPCEnum.Enok][TexturesEnum.Tex2] = NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Enok, TexturesEnum.Tex2, EnokSliderBase.textureFolderNames[EnokSliderBase.selectedTexture]); ((Renderer)tail).material.mainTexture = (Texture)(object)NPCPatcherBase.textureDictionary[NPCEnum.Enok][TexturesEnum.Tex2]; ((Renderer)arms).material.mainTexture = (Texture)(object)NPCPatcherBase.textureDictionary[NPCEnum.Enok][TexturesEnum.Tex2]; ((Renderer)ears).material.mainTexture = (Texture)(object)NPCPatcherBase.textureDictionary[NPCEnum.Enok][TexturesEnum.Tex2]; NPCPatcherBase.textureDictionary[NPCEnum.Enok][TexturesEnum.Tex3] = NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Enok, TexturesEnum.Tex3, EnokSliderBase.textureFolderNames[EnokSliderBase.selectedTexture]); ((Renderer)belt).material.mainTexture = (Texture)(object)NPCPatcherBase.textureDictionary[NPCEnum.Enok][TexturesEnum.Tex3]; NPCPatcherBase.customTextures[_dickTexture] = NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Enok, TexturesEnum.Tex3, EnokSliderBase.textureFolderNames[EnokSliderBase.selectedTexture], "enokTex_dick"); ((Renderer)dick).material.mainTexture = (Texture)(object)NPCPatcherBase.customTextures[_dickTexture]; ((Renderer)dick).material.mainTexture.filterMode = ((Texture)NPCPatcherBase.textureDictionary[NPCEnum.Enok][TexturesEnum.Tex3]).filterMode; NPCPatcherBase.customTextures[_beardTexture] = NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Enok, TexturesEnum.Tex3, EnokSliderBase.textureFolderNames[EnokSliderBase.selectedTexture], "enok_beardTex"); ((Renderer)beard).material.mainTexture.filterMode = ((Texture)NPCPatcherBase.textureDictionary[NPCEnum.Enok][TexturesEnum.Tex3]).filterMode; NPCPatcherBase.customTextures[_eyesTexture] = NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Enok, TexturesEnum.Tex3, EnokSliderBase.textureFolderNames[EnokSliderBase.selectedTexture], "enokTex_eyes"); ((Renderer)eyes).material.mainTexture.filterMode = ((Texture)NPCPatcherBase.textureDictionary[NPCEnum.Enok][TexturesEnum.Tex3]).filterMode; NPCPatcherBase.textureDictionary[NPCEnum.Enok][TexturesEnum.Shadow] = NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Enok, TexturesEnum.Shadow, EnokSliderBase.textureFolderNames[EnokSliderBase.selectedTexture]); ((Renderer)shadow).material.mainTexture = (Texture)(object)NPCPatcherBase.textureDictionary[NPCEnum.Enok][TexturesEnum.Shadow]; NPCPatcherBase.textureDictionary[NPCEnum.Enok][TexturesEnum.Axe] = NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Enok, TexturesEnum.Axe, EnokSliderBase.textureFolderNames[EnokSliderBase.selectedTexture]); ((Renderer)axe1).material.mainTexture = (Texture)(object)NPCPatcherBase.textureDictionary[NPCEnum.Enok][TexturesEnum.Axe]; ((Renderer)axe2).material.mainTexture = (Texture)(object)NPCPatcherBase.textureDictionary[NPCEnum.Enok][TexturesEnum.Axe]; NPCPatcherBase.textureDictionary[NPCEnum.Enok][TexturesEnum.FacePic1] = NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Enok, TexturesEnum.FacePic1, EnokSliderBase.textureFolderNames[EnokSliderBase.selectedTexture]); EnokSliderBase.facepic1Sprite = Sprite.Create(NPCPatcherBase.textureDictionary[NPCEnum.Enok][TexturesEnum.FacePic1], EnokSliderBase.facepic1Sprite.rect, EnokSliderBase.facepic1Sprite.pivot, EnokSliderBase.facepic1Sprite.pixelsPerUnit, 0u); for (int i = 0; i < EnokSliderBase.DialogList.Count; i++) { if (((Object)EnokSliderBase.DialogList[i].facepic.texture).name == "facepic_angela01") { EnokSliderBase.DialogList[i].facepic = EnokSliderBase.facepic1Sprite; } } textureChanged = false; } ((Renderer)cloth).material.mainTexture = (Texture)(EnokSliderBase.clothGone.Value ? ((object)Texture2D.blackTexture) : ((object)NPCPatcherBase.textureDictionary[NPCEnum.Enok][TexturesEnum.Tex3])); ((Renderer)beard).material.mainTexture = (Texture)((EnokSliderBase.beardToggle.Value && EnokSliderBase.helmetOff.Value) ? ((object)NPCPatcherBase.customTextures[_beardTexture]) : ((object)Texture2D.blackTexture)); ((Renderer)eyes).material.mainTexture = (Texture)(EnokSliderBase.helmetOff.Value ? ((object)NPCPatcherBase.customTextures[_eyesTexture]) : ((object)Texture2D.blackTexture)); ((Renderer)neckbrace).material.mainTexture = (Texture)(EnokSliderBase.helmetOff.Value ? ((object)Texture2D.blackTexture) : ((object)NPCPatcherBase.textureDictionary[NPCEnum.Enok][TexturesEnum.Tex3])); } private void Update() { //IL_01e3: Unknown result type (might be due to invalid IL or missing references) if (Mathf.Approximately(_arousalTarget, 1f)) { if (_arousalCurrent < _arousalTarget) { _arousalCurrent += 0.1f * Time.deltaTime; } else { _arousalCurrent = _arousalTarget; } } else if (_arousalCurrent > _arousalTarget) { _arousalCurrent -= 0.1f * Time.deltaTime; } else { _arousalCurrent = _arousalTarget; } if (!Mathf.Approximately(_arousalCurrent, _arousalTarget)) { float num = EnokSliderBase.dickAnimationCurve.Evaluate(_arousalCurrent) * 100f; float num2 = EnokSliderBase.clothAnimationCurve.Evaluate(_arousalCurrent) * 100f; dick.SetBlendShapeWeight(dick.sharedMesh.GetBlendShapeIndex("key_erect"), num); dick.SetBlendShapeWeight(dick.sharedMesh.GetBlendShapeIndex("key_dickSizeErect"), num * (dickSize / 100f)); cloth.SetBlendShapeWeight(cloth.sharedMesh.GetBlendShapeIndex("key_erect"), num2); cloth.SetBlendShapeWeight(cloth.sharedMesh.GetBlendShapeIndex("key_dickSizeErect"), num2 * (dickSize / 100f)); _dickSizeSheathForCloth = ((((Object)dick.sharedMesh).name == "_" + ((Object)EnokSliderBase.SheathCockObject).name) ? (MathF.Max(EnokSliderBase.dickSize.Value - num2 / 100f, 0f) * 100f) : 0f); cloth.SetBlendShapeWeight(cloth.sharedMesh.GetBlendShapeIndex("key_dickSizeSheath"), _dickSizeSheathForCloth); } if (Input.GetKeyDown(EnokSliderBase.dickErect.Value)) { _arousalTarget = ((_arousalTarget == 0f) ? 1f : 0f); } } } public enum NPCEnum { Angela, Sally, Enok, Ammagon } public enum TexturesEnum { Bell, Eye, Eye2, Eye3, Eye4, Eye5, EyeDown, EyeLeft, EyeRight, EyePissed, Face, FaceOpenMouth, Red, Skirt, Base, Bottomless, Nude, Topless, Tail, Blu, Blue3, Blui2, BookSpine, BookCover, Glyph, Shadow, FacePic1, FacePic2, FacePic3, Ears, HoodGem, Broom, Apron, Tex1, Tex2, Tex3, Axe, Sword, Shield } [BepInPlugin("angelaboobs", "angelaboobs", "1.0.0")] public class NPCPatcherBase : BaseUnityPlugin { [HarmonyPatch(typeof(VisualManager), "Apply_FilteringMode")] public static class ChangeFilteringModePatch { [HarmonyPostfix] public static void FilteringModePatch(FilterMode _filterMode) { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) foreach (Dictionary<TexturesEnum, Texture2D> value in textureDictionary.Values) { foreach (Texture2D value2 in value.Values) { ((Texture)value2).filterMode = _filterMode; ((Texture)value2).anisoLevel = 16; } } if (!customTextures.Any()) { return; } foreach (Texture2D customTexture in customTextures) { ((Texture)customTexture).filterMode = _filterMode; ((Texture)customTexture).anisoLevel = 16; } } } internal static ManualLogSource Log = null; internal static bool VerboseLogging = false; public static AssetBundle bundle; internal AngelaSliderBase AngelaSlider; internal SallySliderBase SallySlider; internal EnokSliderBase EnokSlider; internal AmmagonSliderBase AmmagonSlider; internal static GameObject NPCPatcherObject = new GameObject("NPCPatcher-GameObject") { hideFlags = (HideFlags)61 }; private const string DEFAULT_TEXTURE_FOLDER_NAME = "Default"; private const string NPC_TEXTURE_ASSET_LOCATION = "_graphic/_mesh/02_friendlynpc"; public static Dictionary<NPCEnum, Dictionary<TexturesEnum, Texture2D>> textureDictionary = new Dictionary<NPCEnum, Dictionary<TexturesEnum, Texture2D>> { { NPCEnum.Angela, new Dictionary<TexturesEnum, Texture2D> { { TexturesEnum.Bell, Resources.Load<Texture2D>(Path.Combine("_graphic/_mesh/02_friendlynpc", "angela", "angelaBellTex")) }, { TexturesEnum.Eye, Resources.Load<Texture2D>(Path.Combine("_graphic/_mesh/02_friendlynpc", "angela", "angelaEyeTex")) }, { TexturesEnum.Eye2, Resources.Load<Texture2D>(Path.Combine("_graphic/_mesh/02_friendlynpc", "angela", "angelaEyeTex2")) }, { TexturesEnum.Eye3, Resources.Load<Texture2D>(Path.Combine("_graphic/_mesh/02_friendlynpc", "angela", "angelaEyeTex3")) }, { TexturesEnum.Eye4, Resources.Load<Texture2D>(Path.Combine("_graphic/_mesh/02_friendlynpc", "angela", "angelaEyeTex4")) }, { TexturesEnum.Eye5, Resources.Load<Texture2D>(Path.Combine("_graphic/_mesh/02_friendlynpc", "angela", "angelaEyeTex_5")) }, { TexturesEnum.EyeDown, Resources.Load<Texture2D>(Path.Combine("_graphic/_mesh/02_friendlynpc", "angela", "angelaEyeTex_down")) }, { TexturesEnum.EyeLeft, Resources.Load<Texture2D>(Path.Combine("_graphic/_mesh/02_friendlynpc", "angela", "angelaEyeTex_L")) }, { TexturesEnum.EyeRight, Resources.Load<Texture2D>(Path.Combine("_graphic/_mesh/02_friendlynpc", "angela", "angelaEyeTex_R")) }, { TexturesEnum.EyePissed, Resources.Load<Texture2D>(Path.Combine("_graphic/_mesh/02_friendlynpc", "angela", "angelaEyeTex_pissed")) }, { TexturesEnum.Face, Resources.Load<Texture2D>(Path.Combine("_graphic/_mesh/02_friendlynpc", "angela", "angelaFaceTex")) }, { TexturesEnum.FaceOpenMouth, Resources.Load<Texture2D>(Path.Combine("_graphic/_mesh/02_friendlynpc", "angela", "angelaFaceTex_openMouth")) }, { TexturesEnum.Red, Resources.Load<Texture2D>(Path.Combine("_graphic/_mesh/02_friendlynpc", "angela", "angelaRed")) }, { TexturesEnum.Skirt, Resources.Load<Texture2D>(Path.Combine("_graphic/_mesh/02_friendlynpc", "angela", "angelaTex03")) }, { TexturesEnum.Base, Resources.Load<Texture2D>(Path.Combine("_graphic/_mesh/02_friendlynpc", "angela", "angelaTex_01")) }, { TexturesEnum.Tail, Resources.Load<Texture2D>(Path.Combine("_graphic/_mesh/02_friendlynpc", "angela", "angelaTex_02")) }, { TexturesEnum.Blu, Resources.Load<Texture2D>(Path.Combine("_graphic/_mesh/02_friendlynpc", "angela", "angelaTex_blu")) }, { TexturesEnum.Blue3, Resources.Load<Texture2D>(Path.Combine("_graphic/_mesh/02_friendlynpc", "angela", "blue3")) }, { TexturesEnum.Blui2, Resources.Load<Texture2D>(Path.Combine("_graphic/_mesh/02_friendlynpc", "angela", "blui2")) }, { TexturesEnum.BookSpine, Resources.Load<Texture2D>(Path.Combine("_graphic/_mesh/_prop/_book", "book_spineTex")) }, { TexturesEnum.BookCover, Resources.Load<Texture2D>(Path.Combine("_graphic/_mesh/_prop/_book", "bookCoverTex1")) }, { TexturesEnum.Glyph, Resources.Load<Texture2D>("_graphic/_particle/_particle_tomeGlyph") }, { TexturesEnum.Shadow, Resources.Load<Texture2D>("_graphic/_particle/shadow") }, { TexturesEnum.FacePic1, Resources.Load<Texture2D>(Path.Combine("_graphic/_ui/_facepics", "facepic_angela01")) }, { TexturesEnum.FacePic2, Resources.Load<Texture2D>(Path.Combine("_graphic/_ui/_facepics", "facepic_angela02")) }, { TexturesEnum.FacePic3, Resources.Load<Texture2D>(Path.Combine("_graphic/_ui/_facepics", "facepic_angela03")) } } }, { NPCEnum.Sally, new Dictionary<TexturesEnum, Texture2D> { { TexturesEnum.Base, Resources.Load<Texture2D>(Path.Combine("_graphic/_mesh/02_friendlynpc", "sally", "sallyTex_base")) }, { TexturesEnum.Tail, Resources.Load<Texture2D>(Path.Combine("_graphic/_mesh/02_friendlynpc", "sally", "sallyTail_tex")) }, { TexturesEnum.Ears, Resources.Load<Texture2D>(Path.Combine("_graphic/_mesh/02_friendlynpc", "sally", "sallyTex_ears")) }, { TexturesEnum.Skirt, Resources.Load<Texture2D>(Path.Combine("_graphic/_mesh/02_friendlynpc", "sally", "sallySkirtTex")) }, { TexturesEnum.Apron, Resources.Load<Texture2D>(Path.Combine("_graphic/_mesh/02_friendlynpc", "sally", "sally_apronTex")) }, { TexturesEnum.Broom, Resources.Load<Texture2D>(Path.Combine("_graphic/_mesh/02_friendlynpc", "sally", "sallyBroomTex")) }, { TexturesEnum.HoodGem, Resources.Load<Texture2D>(Path.Combine("_graphic/_mesh/02_friendlynpc", "sally", "sallyHoodGem_tex")) }, { TexturesEnum.Face, Resources.Load<Texture2D>(Path.Combine("_graphic/_mesh/02_friendlynpc", "sally", "sallyFace_text")) }, { TexturesEnum.Eye, Resources.Load<Texture2D>(Path.Combine("_graphic/_mesh/02_friendlynpc", "sally", "sally_eyeTex01")) }, { TexturesEnum.Eye2, Resources.Load<Texture2D>(Path.Combine("_graphic/_mesh/02_friendlynpc", "sally", "sally_eyeTex02")) }, { TexturesEnum.Eye3, Resources.Load<Texture2D>(Path.Combine("_graphic/_mesh/02_friendlynpc", "sally", "sally_eyeTex03")) }, { TexturesEnum.Shadow, Resources.Load<Texture2D>(Path.Combine("_graphic/_particle/shadow")) }, { TexturesEnum.FacePic1, Resources.Load<Texture2D>(Path.Combine("_graphic/_ui/_facepics", "facepic_sally01")) }, { TexturesEnum.FacePic2, Resources.Load<Texture2D>(Path.Combine("_graphic/_ui/_facepics", "facepic_sally02")) }, { TexturesEnum.FacePic3, Resources.Load<Texture2D>(Path.Combine("_graphic/_ui/_facepics", "facepic_sally03")) } } }, { NPCEnum.Enok, new Dictionary<TexturesEnum, Texture2D> { { TexturesEnum.Tex1, Resources.Load<Texture2D>(Path.Combine("_graphic/_mesh/02_friendlynpc", "enok", "enokTex_01")) }, { TexturesEnum.Tex2, Resources.Load<Texture2D>(Path.Combine("_graphic/_mesh/02_friendlynpc", "enok", "enokTex_02")) }, { TexturesEnum.Tex3, Resources.Load<Texture2D>(Path.Combine("_graphic/_mesh/02_friendlynpc", "enok", "enokTex_03")) }, { TexturesEnum.Red, Resources.Load<Texture2D>(Path.Combine("_graphic/_mesh/02_friendlynpc", "enok", "enokRedTex")) }, { TexturesEnum.Axe, Resources.Load<Texture2D>(Path.Combine("_graphic/_mesh/03_item/01_weapon/00_greatweapon/_heavyaxe01", "heavyAxe01Tex_01")) }, { TexturesEnum.Shadow, Resources.Load<Texture2D>(Path.Combine("_graphic/_particle/shadow")) }, { TexturesEnum.FacePic1, Resources.Load<Texture2D>(Path.Combine("_graphic/_ui/_facepics", "facepic_enok01")) } } }, { NPCEnum.Ammagon, new Dictionary<TexturesEnum, Texture2D> { { TexturesEnum.Base, Resources.Load<Texture2D>(Path.Combine("_graphic/_mesh/02_friendlynpc", "ammagon", "ammagonTex_00")) }, { TexturesEnum.Sword, Resources.Load<Texture2D>(Path.Combine("_graphic/_mesh/03_item/01_weapon/00_greatweapon/_greatsword01", "greatsword01Tex_01")) }, { TexturesEnum.Shield, Resources.Load<Texture2D>(Path.Combine("_graphic/_mesh/03_item/03_shield/_shield02", "shield02Tex_01")) }, { TexturesEnum.Shadow, Resources.Load<Texture2D>(Path.Combine("_graphic/_particle/shadow")) } } } }; public static List<Texture2D> customTextures = new List<Texture2D>(); public static string texturePath { get; set; } private void Awake() { //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Expected O, but got Unknown Log = ((BaseUnityPlugin)this).Logger; string text = Path.Combine(Paths.ConfigPath, "NPCNSFWModFiles"); texturePath = (Directory.Exists(text) ? text : Path.Combine(((BaseUnityPlugin)this).Info.Location.Replace("angelaboobs.dll", ""), "config", "NPCNSFWModFiles")); Log.LogInfo((object)texturePath); new Harmony("ry.npcpatcher").PatchAll(); if (VerboseLogging) { foreach (KeyValuePair<NPCEnum, Dictionary<TexturesEnum, Texture2D>> item in textureDictionary) { foreach (KeyValuePair<TexturesEnum, Texture2D> item2 in item.Value) { Log.LogInfo((object)("Loaded Texture2D " + (object)item.Value[item2.Key])); } } } bundle = AssetBundle.LoadFromFile(((BaseUnityPlugin)this).Info.Location.Replace("angelaboobs.dll", "angelaboobs.unity3d")); Settings.OnInitialized.AddListener((UnityAction)delegate { AngelaSlider = NPCPatcherObject.AddComponent<AngelaSliderBase>(); AngelaSlider.info = ((BaseUnityPlugin)this).Info; AngelaSlider.config = ((BaseUnityPlugin)this).Config; SallySlider = NPCPatcherObject.AddComponent<SallySliderBase>(); SallySlider.info = ((BaseUnityPlugin)this).Info; SallySlider.config = ((BaseUnityPlugin)this).Config; EnokSlider = NPCPatcherObject.AddComponent<EnokSliderBase>(); EnokSlider.info = ((BaseUnityPlugin)this).Info; EnokSlider.config = ((BaseUnityPlugin)this).Config; AmmagonSlider = NPCPatcherObject.AddComponent<AmmagonSliderBase>(); AmmagonSlider.info = ((BaseUnityPlugin)this).Info; AmmagonSlider.config = ((BaseUnityPlugin)this).Config; }); ((BaseUnityPlugin)this).Config.Save(); Log.LogInfo((object)"Plugin angelaboobs version 1.0.0 is loaded!"); Log.LogInfo((object)textureDictionary); } private static Texture2D LoadTexture(string fullPath, string objname) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Expected O, but got Unknown byte[] array = File.ReadAllBytes(fullPath); Texture2D val = new Texture2D(128, 128, (TextureFormat)5, false) { name = objname, anisoLevel = 16, filterMode = (FilterMode)0, mipMapBias = 0f }; ImageConversion.LoadImage(val, array, false); return val; } public static Texture2D LoadTextureOrDefault(NPCEnum npc, TexturesEnum textureType, string currentTextureFolder) { if (VerboseLogging) { Log.LogInfo((object)$"Loading texture {textureDictionary[npc][textureType]}"); } string path = npc.ToString(); string text = Path.Combine(texturePath, path, currentTextureFolder, ((Object)textureDictionary[npc][textureType]).name + ".png"); FileInfo fileInfo = new FileInfo(text); return fileInfo.Exists ? LoadTexture(text, ((Object)textureDictionary[npc][textureType]).name) : LoadTexture(Path.Combine(texturePath, path, "Default", ((Object)textureDictionary[npc][textureType]).name + ".png"), ((Object)textureDictionary[npc][textureType]).name); } public static Texture2D LoadTextureOrDefault(NPCEnum npc, TexturesEnum textureType, string currentTextureFolder, string overrideTexture) { if (VerboseLogging) { Log.LogInfo((object)$"Loading texture {textureDictionary[npc][textureType]}"); } string path = npc.ToString(); string text = Path.Combine(texturePath, path, currentTextureFolder, overrideTexture + ".png"); FileInfo fileInfo = new FileInfo(text); return fileInfo.Exists ? LoadTexture(text, ((Object)textureDictionary[npc][textureType]).name) : LoadTexture(Path.Combine(texturePath, path, "Default", overrideTexture + ".png"), ((Object)textureDictionary[npc][textureType]).name); } } public class SallySliderBase : MonoBehaviour { [HarmonyPatch(typeof(NetNPC), "Start")] public static class AddNetNPCPatch { [HarmonyPostfix] public static void NetNPCAwakePatch(NetNPC __instance) { //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) try { if (!((object)__instance).ToString().Contains("_npc_Sally")) { return; } NPCPatcherBase.Log.LogInfo((object)"Sally located"); SallySliderController = ((Component)__instance).gameObject.AddComponent<SallySliderController>(); eyeController = ((Component)((Component)__instance).transform.Find("_visual")).GetComponent<TextureChangeAnimEvent>(); ApplyEyeTexturesToEyeController(); DialogTrigger component = ((Component)((Component)__instance).transform.Find("_dialogTrigger_01")).GetComponent<DialogTrigger>(); DialogBranch[] dialogBranches = component._scriptDialogData._dialogBranches; foreach (DialogBranch val in dialogBranches) { Dialog[] dialogs = val.dialogs; foreach (Dialog val2 in dialogs) { DialogList.Add(val2); if (((Object)val2.facepic).name == "facepic_sally01") { facepic1Sprite = Sprite.Create(NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Sally, TexturesEnum.FacePic1, textureFolderNames[selectedTexture]), val2.facepic.rect, val2.facepic.pivot, val2.facepic.pixelsPerUnit, 0u); val2.facepic = facepic1Sprite; } else if (((Object)val2.facepic).name == "facepic_sally02") { facepic2Sprite = Sprite.Create(NPCPatcherBase.LoadTextureOrDefault(NPCEnum.Sally, TexturesEnum.FacePic2, textureFolderNames[selectedTexture]), val2.facepic.