Decompiled source of ConstantJumpIncrease v1.0.0

ConstantJump.dll

Decompiled a year ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BapJump.Patches;
using BepInEx;
using BepInEx.Logging;
using GameNetcodeStuff;
using HarmonyLib;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("BapJump")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("BapJump")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("fb629613-7c95-4dee-a17a-4bfcfee8b3e6")]
[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")]
namespace BapJump
{
	[BepInPlugin("Poseidon.ConstantJump", "Constant Jump Increase", "1.0.0")]
	public class ConstantJump : BaseUnityPlugin
	{
		private const string modGUID = "Poseidon.ConstantJump";

		private const string modName = "Constant Jump Increase";

		private const string modVersion = "1.0.0";

		private readonly Harmony harmony = new Harmony("Poseidon.ConstantJump");

		private static ConstantJump instance;

		internal ManualLogSource mls;

		private void Awake()
		{
			if ((Object)(object)instance == (Object)null)
			{
				instance = this;
			}
			mls = Logger.CreateLogSource("Poseidon.ConstantJump");
			mls.LogInfo((object)"Constant Jump Increase has awoken :)");
			harmony.PatchAll(typeof(ConstantJump));
			harmony.PatchAll(typeof(PlayerControllerBPatch));
		}
	}
}
namespace BapJump.Patches
{
	[HarmonyPatch(typeof(PlayerControllerB))]
	internal class PlayerControllerBPatch
	{
		[HarmonyPatch("Jump_performed")]
		[HarmonyPrefix]
		private static void CrouchJumpPatch(ref bool ___isCrouching)
		{
			___isCrouching = false;
		}

		[HarmonyPatch("Update")]
		[HarmonyPostfix]
		private static void CrouchTimerPatch(ref bool ___crouch, ref float ___jumpForce)
		{
			___jumpForce += 0.001f;
		}
	}
}