using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using BepInEx; using BepInEx.Configuration; using InControl; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: AssemblyTitle("LieButton")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("LieButton")] [assembly: AssemblyCopyright("Copyright © 2026")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("f48cad57-8565-4b0b-900c-a3c9536af0f8")] [assembly: AssemblyFileVersion("1.0.4.0")] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: AssemblyVersion("1.0.4.0")] [BepInPlugin("org.sealofapproval.liebuttonmod", "lie Button Mod", "1.0.4")] public class LieButton : BaseUnityPlugin { [CompilerGenerated] private sealed class d__8 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public LieButton <>4__this; private HeroController 5__2; private HeroAnimationController 5__3; private float 5__4; private tk2dSpriteAnimationClip 5__5; private float 5__6; private tk2dSpriteAnimationClip 5__7; private float 5__8; private float 5__9; private float 5__10; private tk2dSpriteAnimationClip 5__11; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__8(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__2 = null; 5__3 = null; 5__5 = null; 5__7 = null; 5__11 = null; <>1__state = -2; } private bool MoveNext() { //IL_0319: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Unknown result type (might be due to invalid IL or missing references) int num = <>1__state; LieButton lieButton = <>4__this; HeroActions inputActions; KeyCode result; switch (num) { default: return false; case 0: <>1__state = -1; lieButton.isCoroutineRunning = true; 5__2 = HeroController.instance; 5__3 = ((Component)5__2).GetComponent(); 5__2.IgnoreInput(); 5__2.StopAnimationControl(); 5__2.controlReqlinquished = true; 5__4 = 5__3.GetClipDuration(lieButton.animKneel); 5__3.PlayClipForced(lieButton.animKneel); 5__5 = 5__3.animator.CurrentClip; goto IL_00e7; case 1: <>1__state = -1; 5__4 -= Time.deltaTime; goto IL_00e7; case 2: <>1__state = -1; 5__6 -= Time.deltaTime; goto IL_0175; case 3: <>1__state = -1; goto IL_03dd; case 4: <>1__state = -1; 5__10 -= Time.deltaTime; goto IL_02ec; case 5: <>1__state = -1; 5__10 -= Time.deltaTime; goto IL_038d; case 6: { <>1__state = -1; goto IL_03dd; } IL_03dd: if (!(5__9 < 5__8)) { break; } if (5__3.animator.IsPlaying("Stun")) { 5__2.AcceptInput(); 5__2.controlReqlinquished = false; 5__2.StartAnimationControl(); lieButton.isCoroutineRunning = false; break; } inputActions = ManagerSingleton.Instance.inputActions; if (Enum.TryParse(lieButton.lieButton.Value, ignoreCase: false, out result)) { if (lieButton.wakeAtkJump.Value == "true") { if (Input.GetKeyDown(result) || ((OneAxisInputControl)inputActions.Jump).WasPressed || ((OneAxisInputControl)inputActions.Attack).WasPressed) { 5__10 = 5__3.GetClipDuration(lieButton.animWake); 5__3.PlayClipForced(lieButton.animWake); 5__11 = 5__3.animator.CurrentClip; goto IL_02ec; } } else if (Input.GetKeyDown(result)) { 5__10 = 5__3.GetClipDuration(lieButton.animWake); 5__3.PlayClipForced(lieButton.animWake); 5__11 = 5__3.animator.CurrentClip; goto IL_038d; } } 5__9 += Time.deltaTime; <>2__current = null; <>1__state = 6; return true; IL_02ec: if (5__3.animator.IsPlaying(5__11) && 5__10 > 0f) { <>2__current = null; <>1__state = 4; return true; } break; IL_00e7: if (5__3.animator.IsPlaying(5__5) && 5__4 > 0f) { <>2__current = null; <>1__state = 1; return true; } 5__6 = 5__3.GetClipDuration(lieButton.animFall); 5__3.PlayClipForced(lieButton.animFall); 5__7 = 5__3.animator.CurrentClip; goto IL_0175; IL_038d: if (5__3.animator.IsPlaying(5__11) && 5__10 > 0f) { <>2__current = null; <>1__state = 5; return true; } break; IL_0175: if (5__3.animator.IsPlaying(5__7) && 5__6 > 0f) { <>2__current = null; <>1__state = 2; return true; } 5__3.PlayClipForced("Prostrate"); 5__8 = 99999f; 5__9 = 0f; <>2__current = null; <>1__state = 3; return true; } 5__2.AcceptInput(); 5__2.controlReqlinquished = false; 5__2.StartAnimationControl(); lieButton.isCoroutineRunning = false; 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(); } } private ConfigEntry lieButton; private ConfigEntry wakeAtkJump; private bool isCoroutineRunning; private string animKneel = "Collect Normal 1"; private string animWake = "Prostrate Rise"; private string animFall = "Kneel To Prostrate"; protected LieButton() { lieButton = ((BaseUnityPlugin)this).Config.Bind("General", "lieButton", "L", "Changes the button for lying down."); wakeAtkJump = ((BaseUnityPlugin)this).Config.Bind("General", "wakeOnAttackOrJump", "false", "Wake up upon pressing 'Attack' or 'Jump'? true/false."); } private void Update() { //IL_0036: Unknown result type (might be due to invalid IL or missing references) HeroController instance = HeroController.instance; if ((Object)(object)instance == (Object)null) { return; } HeroControllerStates cState = instance.cState; if (Enum.TryParse(lieButton.Value, ignoreCase: false, out KeyCode result)) { HeroAnimationController component = ((Component)instance).GetComponent(); if (Input.GetKeyDown(result) && !instance.controlReqlinquished && !isCoroutineRunning && !cState.transitioning && (component.animator.IsPlaying("Idle") || component.animator.IsPlaying("Idle Hurt") || component.animator.IsPlaying("LookDown") || component.animator.IsPlaying("LookDown Windy") || component.animator.IsPlaying("Hurt Look Up") || component.animator.IsPlaying("Hurt Look Up Windy") || component.animator.IsPlaying("Hurt Look Down") || component.animator.IsPlaying("Hurt Look Down Windy") || component.animator.IsPlaying("Idle Hurt Windy") || component.animator.IsPlaying("LookDown Updraft") || component.animator.IsPlaying("LookUp") || component.animator.IsPlaying("LookUp Updraft") || component.animator.IsPlaying("Look Up Half End") || component.animator.IsPlaying("LookDown Slight End") || component.animator.IsPlaying("LookUp Slight End") || component.animator.IsPlaying("Idle Rest") || component.animator.IsPlaying("Land") || component.animator.IsPlaying("Look Down Half End") || component.animator.IsPlaying("LookUp Windy") || component.animator.IsPlaying("Hurt Look Down Windy End") || component.animator.IsPlaying("HardLand") || component.animator.IsPlaying("Hurt Look Up Windy End") || component.animator.IsPlaying("Hurt Look Down End") || component.animator.IsPlaying("Hurt Look Up End") || component.animator.IsPlaying("Rage Idle") || component.animator.IsPlaying("Rage Idle End") || component.animator.IsPlaying("LookUpEnd Windy") || component.animator.IsPlaying("LookUpEnd") || component.animator.IsPlaying("LookUpEnd Updraft") || component.animator.IsPlaying("LookDownEnd") || component.animator.IsPlaying("LookDownEnd Windy") || component.animator.IsPlaying("LookDownEnd Updraft") || component.animator.IsPlaying("Idle Updraft") || component.animator.IsPlaying("Dash Down Land") || component.animator.IsPlaying("Idle Windy"))) { ((MonoBehaviour)this).StartCoroutine(TriggerLieDown()); } } else { Debug.LogError((object)("Can not parse key=" + lieButton.Value)); } } [IteratorStateMachine(typeof(d__8))] private IEnumerator TriggerLieDown() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__8(0) { <>4__this = this }; } }