Decompiled source of InfiniteStamina v1.0.0

InfiniteStamina.dll

Decompiled 10 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Logging;
using GameNetcodeStuff;
using HarmonyLib;
using InfiniteStamina.Paaatch;
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("InfiniteStamina")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("InfiniteStamina")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("0d06e41a-1ea9-4839-b490-63b8c40ef1b1")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace InfiniteStamina
{
	[BepInPlugin("mirrox.lc.testplugin", "TestPlugin", "1.0")]
	public class InfiniteStamina : BaseUnityPlugin
	{
		private const string modGUI = "Mirrox.InfiniteStamina";

		private const string modName = "Infinite Stamina";

		private const string modVersion = "1.0.0.0";

		private readonly Harmony harmony = new Harmony("Mirrox.InfiniteStamina");

		private static InfiniteStamina Instance;

		internal ManualLogSource mls;

		private void Awake()
		{
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
			mls = Logger.CreateLogSource("Mirrox.InfiniteStamina");
			mls.LogInfo((object)"Work? ;)");
			harmony.PatchAll(typeof(InfiniteStamina));
			harmony.PatchAll(typeof(PlayerControllerStaminaPATCH));
		}
	}
}
namespace InfiniteStamina.Paaatch
{
	[HarmonyPatch(typeof(PlayerControllerB))]
	internal class PlayerControllerStaminaPATCH
	{
		[HarmonyPatch("Update")]
		[HarmonyPostfix]
		private static void infiniteSprintPatch(ref float ___sprintMeter)
		{
			___sprintMeter = 1f;
		}
	}
}