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 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.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
[BepInPlugin("org.sealofapproval.liebuttonmod", "lie Button Mod", "1.0.0")]
public class LieButton : BaseUnityPlugin
{
[CompilerGenerated]
private sealed class <TriggerPassOut>d__7 : IEnumerator<object>, IDisposable, IEnumerator
{
private int <>1__state;
private object <>2__current;
public LieButton <>4__this;
private HeroController <heroController>5__2;
private HeroAnimationController <heroAnim>5__3;
private float <clipLength>5__4;
private tk2dSpriteAnimationClip <clip>5__5;
private float <clipLength1>5__6;
private tk2dSpriteAnimationClip <clip1>5__7;
private float <maxTime>5__8;
private float <elapsed>5__9;
private float <clipLength2>5__10;
private tk2dSpriteAnimationClip <clip2>5__11;
object IEnumerator<object>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <TriggerPassOut>d__7(int <>1__state)
{
this.<>1__state = <>1__state;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
<heroController>5__2 = null;
<heroAnim>5__3 = null;
<clip>5__5 = null;
<clip1>5__7 = null;
<clip2>5__11 = null;
<>1__state = -2;
}
private bool MoveNext()
{
//IL_05d6: Unknown result type (might be due to invalid IL or missing references)
int num = <>1__state;
LieButton lieButton = <>4__this;
KeyCode result;
switch (num)
{
default:
return false;
case 0:
<>1__state = -1;
lieButton.isCoroutineRunning = true;
<heroController>5__2 = HeroController.instance;
if ((Object)(object)<heroController>5__2 == (Object)null)
{
return false;
}
((Component)<heroController>5__2).GetComponent<HeroAudioController>();
<heroAnim>5__3 = ((Component)<heroController>5__2).GetComponent<HeroAnimationController>();
if ((Object)(object)<heroAnim>5__3 == (Object)null)
{
return false;
}
<heroController>5__2.IgnoreInput();
<heroController>5__2.StopAnimationControl();
<heroController>5__2.controlReqlinquished = true;
<clipLength>5__4 = <heroAnim>5__3.GetClipDuration(lieButton.animKneel);
<heroAnim>5__3.PlayClipForced(lieButton.animKneel);
<clip>5__5 = <heroAnim>5__3.animator.CurrentClip;
if (<clip>5__5 != null)
{
goto IL_0117;
}
goto IL_013c;
case 1:
<>1__state = -1;
<clipLength>5__4 -= Time.deltaTime;
goto IL_0117;
case 2:
<>1__state = -1;
<clipLength1>5__6 -= Time.deltaTime;
goto IL_01ad;
case 3:
<>1__state = -1;
goto IL_06a5;
case 4:
<>1__state = -1;
<clipLength2>5__10 -= Time.deltaTime;
goto IL_0655;
case 5:
{
<>1__state = -1;
goto IL_06a5;
}
IL_06a5:
if (!(<elapsed>5__9 < <maxTime>5__8))
{
break;
}
if (<heroAnim>5__3.animator.IsPlaying("Idle") || <heroAnim>5__3.animator.IsPlaying("Idle Hurt") || <heroAnim>5__3.animator.IsPlaying("LookDown") || <heroAnim>5__3.animator.IsPlaying("LookDown Windy") || <heroAnim>5__3.animator.IsPlaying("Hurt Look Up") || <heroAnim>5__3.animator.IsPlaying("Hurt Look Up Windy") || <heroAnim>5__3.animator.IsPlaying("Hurt Look Down") || <heroAnim>5__3.animator.IsPlaying("Hurt Look Down Windy") || <heroAnim>5__3.animator.IsPlaying("Idle Hurt Windy") || <heroAnim>5__3.animator.IsPlaying("LookDown Updraft") || <heroAnim>5__3.animator.IsPlaying("LookUp") || <heroAnim>5__3.animator.IsPlaying("LookUp Updraft") || <heroAnim>5__3.animator.IsPlaying("Exit Door To Idle") || <heroAnim>5__3.animator.IsPlaying("Look Up Half End") || <heroAnim>5__3.animator.IsPlaying("LookDown Slight End") || <heroAnim>5__3.animator.IsPlaying("LookUp Slight End") || <heroAnim>5__3.animator.IsPlaying("Idle Rest") || <heroAnim>5__3.animator.IsPlaying("Land") || <heroAnim>5__3.animator.IsPlaying("Look Down Half End") || <heroAnim>5__3.animator.IsPlaying("LookUp Windy") || <heroAnim>5__3.animator.IsPlaying("Hurt Look Down Windy End") || <heroAnim>5__3.animator.IsPlaying("HardLand") || <heroAnim>5__3.animator.IsPlaying("Hurt Look Up Windy End") || <heroAnim>5__3.animator.IsPlaying("Hurt Look Down End") || <heroAnim>5__3.animator.IsPlaying("Hurt Look Up End") || <heroAnim>5__3.animator.IsPlaying("Rage Idle") || <heroAnim>5__3.animator.IsPlaying("Rage Idle End") || <heroAnim>5__3.animator.IsPlaying("LookUpEnd Windy") || <heroAnim>5__3.animator.IsPlaying("LookUpEnd") || <heroAnim>5__3.animator.IsPlaying("LookUpEnd Updraft") || <heroAnim>5__3.animator.IsPlaying("LookDownEnd") || <heroAnim>5__3.animator.IsPlaying("LookDownEnd Windy") || <heroAnim>5__3.animator.IsPlaying("LookDownEnd Updraft") || <heroAnim>5__3.animator.IsPlaying("Idle Updraft") || <heroAnim>5__3.animator.IsPlaying("Idle Windy"))
{
<heroController>5__2.AcceptInput();
<heroController>5__2.controlReqlinquished = false;
<heroController>5__2.StartAnimationControl();
lieButton.isCoroutineRunning = false;
break;
}
if (Enum.TryParse<KeyCode>(lieButton.lieButton.Value, ignoreCase: false, out result) && Input.GetKeyDown(result))
{
<clipLength2>5__10 = <heroAnim>5__3.GetClipDuration(lieButton.animWake);
<heroAnim>5__3.PlayClipForced(lieButton.animWake);
<clip2>5__11 = <heroAnim>5__3.animator.CurrentClip;
if (<clip2>5__11 == null)
{
break;
}
goto IL_0655;
}
<elapsed>5__9 += Time.deltaTime;
<>2__current = null;
<>1__state = 5;
return true;
IL_01ad:
if (<heroAnim>5__3.animator.IsPlaying(<clip1>5__7) && <clipLength1>5__6 > 0f)
{
<>2__current = null;
<>1__state = 2;
return true;
}
goto IL_01d2;
IL_01d2:
<heroAnim>5__3.PlayClipForced("Prostrate");
<maxTime>5__8 = 99999f;
<elapsed>5__9 = 0f;
<>2__current = null;
<>1__state = 3;
return true;
IL_0117:
if (<heroAnim>5__3.animator.IsPlaying(<clip>5__5) && <clipLength>5__4 > 0f)
{
<>2__current = null;
<>1__state = 1;
return true;
}
goto IL_013c;
IL_013c:
<clipLength1>5__6 = <heroAnim>5__3.GetClipDuration(lieButton.animFall);
<heroAnim>5__3.PlayClipForced(lieButton.animFall);
<clip1>5__7 = <heroAnim>5__3.animator.CurrentClip;
if (<clip1>5__7 != null)
{
goto IL_01ad;
}
goto IL_01d2;
IL_0655:
if (<heroAnim>5__3.animator.IsPlaying(<clip2>5__11) && <clipLength2>5__10 > 0f)
{
<>2__current = null;
<>1__state = 4;
return true;
}
break;
}
<heroController>5__2.AcceptInput();
<heroController>5__2.controlReqlinquished = false;
<heroController>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<string> lieButton;
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<string>("General", "lieButton", "L", "Changes the button for lying down.");
}
private void Update()
{
//IL_002f: Unknown result type (might be due to invalid IL or missing references)
HeroController instance = HeroController.instance;
if ((Object)(object)instance == (Object)null)
{
return;
}
if (Enum.TryParse<KeyCode>(lieButton.Value, ignoreCase: false, out KeyCode result))
{
HeroAnimationController component = ((Component)instance).GetComponent<HeroAnimationController>();
if (Input.GetKeyDown(result) && !isCoroutineRunning && (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("Exit Door To Idle") || 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("Idle Windy")))
{
((MonoBehaviour)this).StartCoroutine(TriggerPassOut());
}
}
else
{
Debug.LogError((object)("Can not parse key=" + lieButton.Value));
}
}
[IteratorStateMachine(typeof(<TriggerPassOut>d__7))]
private IEnumerator TriggerPassOut()
{
//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
return new <TriggerPassOut>d__7(0)
{
<>4__this = this
};
}
}