Some mods may be broken due to the recent Alloyed Collective update.
Decompiled source of PataponMeditate v1.0.1
PataponMeditate/PataponMeditate.dll
Decompiled 7 months agousing System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using EntityStates; using EntityStates.Seeker; using IL.EntityStates.Seeker; using Microsoft.CodeAnalysis; using Mono.Cecil.Cil; using MonoMod.Cil; using On.EntityStates.Seeker; using On.RoR2; using R2API.Utils; using RiskOfOptions; using RiskOfOptions.Options; using RoR2; using UnityEngine; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("PataponMeditate")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+80e717dbd6d6759993f64cfd410db614ec031684")] [assembly: AssemblyProduct("PataponMeditate")] [assembly: AssemblyTitle("PataponMeditate")] [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.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace PataponMeditate { internal static class DebugLog { private static ManualLogSource _logger; internal static void Init(ManualLogSource logger) { _logger = logger; } internal static void Log(object data) { _logger.LogInfo(data); } } [BepInPlugin("RigsInRags.PataponMeditate", "PataponMeditate", "1.0.1")] [BepInDependency(/*Could not decode attribute arguments.*/)] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] public class PataponMeditate : BaseUnityPlugin { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_UpdateUIInputSequence <>9__13_2; public static Manipulator <>9__13_3; internal void <Awake>b__13_2(orig_UpdateUIInputSequence orig, Meditate self) { } internal void <Awake>b__13_3(ILContext il) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); val.Emit(OpCodes.Ldarg_0); val.Emit(OpCodes.Ldstr, ""); val.Emit(OpCodes.Stfld, Reflection.GetFieldCached(typeof(Meditate), "inputCorrectSoundString")); val.Emit(OpCodes.Ldarg_0); val.Emit(OpCodes.Ldstr, ""); val.Emit(OpCodes.Stfld, Reflection.GetFieldCached(typeof(Meditate), "inputFailSoundString")); val.Emit(OpCodes.Ldarg_0); val.Emit(OpCodes.Ldstr, ""); val.Emit(OpCodes.Stfld, Reflection.GetFieldCached(typeof(Meditate), "successSoundString")); val.Emit(OpCodes.Ldarg_0); val.Emit(OpCodes.Ldstr, ""); val.Emit(OpCodes.Stfld, Reflection.GetFieldCached(typeof(Meditate), "timeoutSoundString")); val.Emit(OpCodes.Ldarg_0); val.Emit(OpCodes.Ldstr, ""); val.Emit(OpCodes.Stfld, Reflection.GetFieldCached(typeof(Meditate), "startSoundString")); } } [CompilerGenerated] private sealed class <MoveWormHead>d__15 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public RectTransform wormHead; public float moveSpeed; public float duration; private float <timeElapsed>5__2; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <MoveWormHead>d__15(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <timeElapsed>5__2 = 0f; break; case 1: <>1__state = -1; break; } if (<timeElapsed>5__2 < duration) { if (!Object.op_Implicit((Object)(object)wormHead)) { return false; } <timeElapsed>5__2 += Time.deltaTime; RectTransform obj = wormHead; obj.anchoredPosition += new Vector2(moveSpeed * Time.deltaTime, 0f); <>2__current = null; <>1__state = 1; return true; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class <NotesFlyAndDisappear>d__14 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Transform note; public float duration; private float <timeElapsed>5__2; private float <xMove>5__3; private float <yMove>5__4; private Color <invisColour>5__5; private RectTransform <rect>5__6; private Vector3 <finalScale>5__7; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <NotesFlyAndDisappear>d__14(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <rect>5__6 = null; <>1__state = -2; } private bool MoveNext() { //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_022c: Unknown result type (might be due to invalid IL or missing references) //IL_024c: Unknown result type (might be due to invalid IL or missing references) //IL_0252: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <timeElapsed>5__2 = 0f; <xMove>5__3 = 0f; <yMove>5__4 = 0f; <invisColour>5__5 = new Color(1f, 1f, 1f, 0f); switch (((Object)((Component)note).GetComponent<Image>().sprite).name) { case "Pata": <xMove>5__3 = Random.Range(-300f, -100f); <yMove>5__4 = Random.Range(-50f, 200f); break; case "Pon": <xMove>5__3 = Random.Range(100f, 300f); <yMove>5__4 = Random.Range(-50f, 200f); break; case "Chaka": <xMove>5__3 = Random.Range(-100f, 100f); <yMove>5__4 = Random.Range(200f, 350f); break; case "Don": <xMove>5__3 = Random.Range(-150f, 150f); <yMove>5__4 = Random.Range(50f, 150f); break; default: DebugLog.Log("Invalid sprite name: " + ((Object)((Component)note).GetComponent<Image>().sprite).name); break; } <rect>5__6 = ((Component)note).GetComponent<RectTransform>(); <finalScale>5__7 = ((Transform)<rect>5__6).localScale * 3f; break; case 1: <>1__state = -1; break; } if (<timeElapsed>5__2 < duration) { <timeElapsed>5__2 += Time.deltaTime; if (!Object.op_Implicit((Object)(object)<rect>5__6)) { return false; } RectTransform obj = <rect>5__6; obj.anchoredPosition += new Vector2(<xMove>5__3 * Time.deltaTime, <yMove>5__4 * Time.deltaTime); ((Transform)<rect>5__6).localScale = Vector3.Lerp(note.localScale, <finalScale>5__7, <timeElapsed>5__2 / duration); ((Graphic)((Component)note).GetComponent<Image>()).color = Color.Lerp(((Graphic)((Component)note).GetComponent<Image>()).color, <invisColour>5__5, <timeElapsed>5__2 / duration); <>2__current = null; <>1__state = 1; return true; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public const string P_GUID = "RigsInRags.PataponMeditate"; public const string P_Author = "RigsInRags"; public const string P_Name = "PataponMeditate"; public const string P_Version = "1.0.1"; public static AssetBundle MainAssets; private PataponAnimator pataponAnimator; private GameObject wormFace; private float beatLifeTime; private int perfectBeats; private static string[] backdropString = new string[5] { "InputBackDrop1", "InputBackDrop2", "InputBackDrop", "InputBackDrop1 (3)", "InputBackDrop1 (2)" }; public static ConfigEntry<bool> EnablePerfectBeatBonusDamage { get; set; } public void Awake() { //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Expected O, but got Unknown //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Expected O, but got Unknown //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Expected O, but got Unknown //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Expected O, but got Unknown //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Expected O, but got Unknown DebugLog.Init(((BaseUnityPlugin)this).Logger); using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("PataponMeditate.patassets")) { MainAssets = AssetBundle.LoadFromStream(stream); } EnablePerfectBeatBonusDamage = ((BaseUnityPlugin)this).Config.Bind<bool>("Bonus Damage on Perfect Beat", "EnablePerfectBeatDamage", false, "Toggle to increase Meditate's AOE base damage by +50% if every input was a perfect beat."); if (RiskOfOptionsCompatibility.enabled) { RiskOfOptionsCompatibility.SetupRiskOfOptionsConfigs(); } Meditate.SetupInputUIIcons += (hook_SetupInputUIIcons)delegate(orig_SetupInputUIIcons orig, Meditate self) { //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) Color color = default(Color); for (int i = 0; i < 5; i++) { switch (self.seekerController.meditationStepAndSequence[i + 1]) { case 0: ((Component)self.overlayInstanceChildLocator.FindChild(Meditate.c[i])).GetComponent<Image>().sprite = MainAssets.LoadAsset<Sprite>("Chaka"); break; case 1: ((Component)self.overlayInstanceChildLocator.FindChild(Meditate.c[i])).GetComponent<Image>().sprite = MainAssets.LoadAsset<Sprite>("Don"); break; case 2: ((Component)self.overlayInstanceChildLocator.FindChild(Meditate.c[i])).GetComponent<Image>().sprite = MainAssets.LoadAsset<Sprite>("Pon"); break; case 3: ((Component)self.overlayInstanceChildLocator.FindChild(Meditate.c[i])).GetComponent<Image>().sprite = MainAssets.LoadAsset<Sprite>("Pata"); break; } RectTransform component3 = ((Component)self.overlayInstanceChildLocator.FindChild(Meditate.c[i])).GetComponent<RectTransform>(); ((Transform)component3).localScale = ((Transform)component3).localScale * 1.75f; ((Graphic)((Component)self.overlayInstanceChildLocator.FindChild(Meditate.c[i])).GetComponent<Image>()).color = Color.white; Image component4 = ((Component)self.overlayInstanceChildLocator.FindChild(Meditate.c[i]).parent.Find(backdropString[i])).GetComponent<Image>(); ((Color)(ref color))..ctor(0f, 0f, 0f, 0f); ((Graphic)component4).color = color; } ((Graphic)((Component)self.overlayInstanceChildLocator.FindChild("MeditationBarTimer").parent.Find("BackgroundWhite")).GetComponent<Image>()).color = new Color(0f, 0f, 0f, 0f); ((Graphic)((Component)self.overlayInstanceChildLocator.FindChild("MeditationBarTimer").parent.Find("BackgroundBlack")).GetComponent<Image>()).color = new Color(0f, 0f, 0f, 0f); Image component5 = ((Component)self.overlayInstanceChildLocator.FindChild("MeditationBarTimer")).GetComponent<Image>(); ((Component)component5).GetComponent<Image>().sprite = MainAssets.LoadAsset<Sprite>("Worm2"); ((Component)component5).transform.rotation = Quaternion.Euler(0f, 180f, 0f); wormFace = Object.Instantiate<GameObject>(MainAssets.LoadAsset<GameObject>("WormFace"), self.overlayInstanceChildLocator.FindChild("MeditationBarTimer").parent); wormFace.transform.localPosition = new Vector3(-505f, 0f, 0f); if (!Object.op_Implicit((Object)(object)pataponAnimator)) { pataponAnimator = ((EntityState)self).gameObject.AddComponent<PataponAnimator>(); } ((MonoBehaviour)pataponAnimator).StartCoroutine(MoveWormHead(105f, wormFace.GetComponent<RectTransform>())); if (EnablePerfectBeatBonusDamage.Value) { self.damageCoefficient = 5f; } self.UpdateUIInputSequence(); }; Meditate.Update += (hook_Update)delegate(orig_Update orig, Meditate self) { //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0486: Unknown result type (might be due to invalid IL or missing references) //IL_049a: Unknown result type (might be due to invalid IL or missing references) //IL_049f: Unknown result type (might be due to invalid IL or missing references) if (perfectBeats > 0) { beatLifeTime += Time.deltaTime; } sbyte meditationInputStep = self.seekerController.meditationInputStep; orig.Invoke(self); if (meditationInputStep != self.seekerController.meditationInputStep) { RectTransform component = ((Component)self.overlayInstanceChildLocator.FindChild(Meditate.c[meditationInputStep])).GetComponent<RectTransform>(); ((Transform)component).localScale = ((Transform)component).localScale * 0.8f; if (!Object.op_Implicit((Object)(object)pataponAnimator)) { pataponAnimator = ((EntityState)self).gameObject.AddComponent<PataponAnimator>(); } ((MonoBehaviour)pataponAnimator).StartCoroutine(NotesFlyAndDisappear(2f, self.overlayInstanceChildLocator.FindChild(Meditate.c[meditationInputStep]))); if (perfectBeats == 0) { perfectBeats++; switch (((Object)((Component)self.overlayInstanceChildLocator.FindChild(Meditate.c[meditationInputStep])).GetComponent<Image>().sprite).name) { case "Pata": Util.PlaySound("Pata", ((EntityState)self).gameObject); break; case "Pon": Util.PlaySound("Pon", ((EntityState)self).gameObject); break; case "Chaka": Util.PlaySound("Chaka", ((EntityState)self).gameObject); break; case "Don": Util.PlaySound("Don", ((EntityState)self).gameObject); break; } } else if (perfectBeats > 0 && beatLifeTime > 0.425f && beatLifeTime < 0.575f) { perfectBeats++; switch (((Object)((Component)self.overlayInstanceChildLocator.FindChild(Meditate.c[meditationInputStep])).GetComponent<Image>().sprite).name) { case "Pata": Util.PlaySound("Pata", ((EntityState)self).gameObject); break; case "Pon": Util.PlaySound("Pon", ((EntityState)self).gameObject); break; case "Chaka": Util.PlaySound("Chaka", ((EntityState)self).gameObject); break; case "Don": Util.PlaySound("Don", ((EntityState)self).gameObject); break; } } else { perfectBeats = 1; switch (((Object)((Component)self.overlayInstanceChildLocator.FindChild(Meditate.c[meditationInputStep])).GetComponent<Image>().sprite).name) { case "Pata": Util.PlaySound("PataMiss", ((EntityState)self).gameObject); break; case "Pon": Util.PlaySound("PonMiss", ((EntityState)self).gameObject); break; case "Chaka": Util.PlaySound("ChakaMiss", ((EntityState)self).gameObject); break; case "Don": Util.PlaySound("DonMiss", ((EntityState)self).gameObject); break; } } beatLifeTime = 0f; if (perfectBeats >= 5) { if (EnablePerfectBeatBonusDamage.Value) { self.damageCoefficient = 7.5f; } switch (((Object)((Component)self.overlayInstanceChildLocator.FindChild(Meditate.c[meditationInputStep])).GetComponent<Image>().sprite).name) { case "Pata": case "Chaka": Util.PlaySound("PataChakaSheen", ((EntityState)self).gameObject); break; case "Pon": case "Don": Util.PlaySound("PonDonSheen", ((EntityState)self).gameObject); break; } } if (perfectBeats >= 2) { wormFace.GetComponent<Image>().sprite = MainAssets.LoadAsset<Sprite>("WormFaceC" + perfectBeats); } else { wormFace.GetComponent<Image>().sprite = MainAssets.LoadAsset<Sprite>("WormFace"); } } else if (((meditationInputStep == self.seekerController.meditationInputStep && ((ButtonState)(ref ((EntityState)self).inputBank.rawMoveDown)).justPressed) || ((ButtonState)(ref ((EntityState)self).inputBank.rawMoveUp)).justPressed || ((ButtonState)(ref ((EntityState)self).inputBank.rawMoveLeft)).justPressed || ((ButtonState)(ref ((EntityState)self).inputBank.rawMoveRight)).justPressed) && Object.op_Implicit((Object)(object)wormFace)) { RectTransform component2 = wormFace.GetComponent<RectTransform>(); ((Transform)component2).localPosition = ((Transform)component2).localPosition + new Vector3(105f, 0f, 0f); } }; object obj = <>c.<>9__13_2; if (obj == null) { hook_UpdateUIInputSequence val = delegate { }; <>c.<>9__13_2 = val; obj = (object)val; } Meditate.UpdateUIInputSequence += (hook_UpdateUIInputSequence)obj; object obj2 = <>c.<>9__13_3; if (obj2 == null) { Manipulator val2 = delegate(ILContext il) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) ILCursor val3 = new ILCursor(il); val3.Emit(OpCodes.Ldarg_0); val3.Emit(OpCodes.Ldstr, ""); val3.Emit(OpCodes.Stfld, Reflection.GetFieldCached(typeof(Meditate), "inputCorrectSoundString")); val3.Emit(OpCodes.Ldarg_0); val3.Emit(OpCodes.Ldstr, ""); val3.Emit(OpCodes.Stfld, Reflection.GetFieldCached(typeof(Meditate), "inputFailSoundString")); val3.Emit(OpCodes.Ldarg_0); val3.Emit(OpCodes.Ldstr, ""); val3.Emit(OpCodes.Stfld, Reflection.GetFieldCached(typeof(Meditate), "successSoundString")); val3.Emit(OpCodes.Ldarg_0); val3.Emit(OpCodes.Ldstr, ""); val3.Emit(OpCodes.Stfld, Reflection.GetFieldCached(typeof(Meditate), "timeoutSoundString")); val3.Emit(OpCodes.Ldarg_0); val3.Emit(OpCodes.Ldstr, ""); val3.Emit(OpCodes.Stfld, Reflection.GetFieldCached(typeof(Meditate), "startSoundString")); }; <>c.<>9__13_3 = val2; obj2 = (object)val2; } Meditate.OnEnter += (Manipulator)obj2; SeekerController.RandomizeMeditationInputs += (hook_RandomizeMeditationInputs)delegate(orig_RandomizeMeditationInputs orig, SeekerController self) { List<sbyte[]> list = new List<sbyte[]> { new sbyte[4] { 3, 3, 3, 2 }, new sbyte[4] { 2, 2, 3, 2 }, new sbyte[4] { 0, 0, 3, 2 }, new sbyte[4] { 2, 2, 0, 0 }, new sbyte[4] { 1, 1, 0, 0 }, new sbyte[4] { 2, 3, 2, 3 }, new sbyte[4] { 3, 2, 1, 0 }, new sbyte[4] { 0, 3, 0, 3 } }; sbyte[] array = new sbyte[6] { 0, (sbyte)Random.Range(0, 4), 0, 0, 0, 0 }; list[Random.Range(0, list.Count)].CopyTo(array, 2); self.meditationStepAndSequence = array; self.CallCmdUpdateMeditationInput(self.meditationStepAndSequence); perfectBeats = 0; beatLifeTime = 0f; }; } [IteratorStateMachine(typeof(<NotesFlyAndDisappear>d__14))] public IEnumerator NotesFlyAndDisappear(float duration, Transform note) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <NotesFlyAndDisappear>d__14(0) { duration = duration, note = note }; } [IteratorStateMachine(typeof(<MoveWormHead>d__15))] public IEnumerator MoveWormHead(float moveSpeed, RectTransform wormHead, float duration = 5f) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <MoveWormHead>d__15(0) { moveSpeed = moveSpeed, wormHead = wormHead, duration = duration }; } } public class PataponAnimator : MonoBehaviour { private static PataponAnimator _instance; public static PataponAnimator instance { get { //IL_0011: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)_instance)) { _instance = new GameObject("PataponAnimator").AddComponent<PataponAnimator>(); } return _instance; } } } internal class RiskOfOptionsCompatibility { public static bool enabled => Chainloader.PluginInfos.ContainsKey("com.rune580.riskofoptions"); [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void SetupRiskOfOptionsConfigs() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Expected O, but got Unknown ModSettingsManager.SetModDescription("Visually and audibly adjusts Seeker's Meditate skill to be Patapon-themed.", "RigsInRags.PataponMeditate", "Patapon Meditate"); ModSettingsManager.SetModIcon(PataponMeditate.MainAssets.LoadAsset<Sprite>("modIcon.png")); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(PataponMeditate.EnablePerfectBeatBonusDamage)); } } }