using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using HarmonyLib;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("HTF")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("HTF")]
[assembly: AssemblyCopyright("Copyright © 2026")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("5208ed49-769e-472d-8164-a43d8313e78b")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace HTF_DoubleJump;
[BepInPlugin("HTF.kr.DoubleJump", "DoubleJump", "1.0.0")]
public class ModBehaviour : BaseUnityPlugin
{
[HarmonyPatch(typeof(PlayerMovement))]
public class PlayerMovement_path
{
private static int jump_time;
[HarmonyPrefix]
[HarmonyPatch("JumpInput")]
private static bool JumpInput_Prefix(PlayerMovement __instance)
{
if (__instance.Grounded)
{
jump_time = 1;
}
else if (jump_time > 0 && jump_time < JumpTimes.Value)
{
jump_time++;
MethodInfo method = typeof(PlayerMovement).GetMethod("Jump", BindingFlags.Instance | BindingFlags.Public);
method.Invoke(__instance, null);
return false;
}
return true;
}
}
private Harmony harmony;
private static ManualLogSource Log;
private static ConfigEntry<int> JumpTimes;
private void Awake()
{
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
//IL_0011: Expected O, but got Unknown
//IL_0040: Unknown result type (might be due to invalid IL or missing references)
//IL_004a: Expected O, but got Unknown
harmony = new Harmony("HTF.kr.DoubleJump");
harmony.PatchAll();
JumpTimes = ((BaseUnityPlugin)this).Config.Bind<int>("Client Options", "JumpTimes", 2, new ConfigDescription("Count the number of jumps", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 10), Array.Empty<object>()));
Log = ((BaseUnityPlugin)this).Logger;
Log.LogInfo((object)"DoubleJump enble");
}
}