Decompiled source of NoStaminaMod v1.0.0

NoStaminaMod.dll

Decompiled a month 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 NoStaminaMod.patch;
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("NoStaminaMod")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("NoStaminaMod")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("3518a49d-62db-4f06-9428-5baa5250e36a")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace NoStaminaMod
{
	[BepInPlugin("Guriru.NoStaminaMod", "No Stamina Mod", "1.0.0")]
	public class NoStaminaBase : BaseUnityPlugin
	{
		private const string modGUID = "Guriru.NoStaminaMod";

		private const string modName = "No Stamina Mod";

		private const string modVersion = "1.0.0";

		private readonly Harmony harmony = new Harmony("Guriru.NoStaminaMod");

		private static NoStaminaBase Instance;

		internal static ManualLogSource mls;

		private void Awake()
		{
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
			mls = Logger.CreateLogSource("Guriru.NoStaminaMod");
			mls.LogInfo((object)"The NoStamina mod awake:");
			harmony.PatchAll(typeof(NoStaminaBase));
			harmony.PatchAll(typeof(PlayerControllerBPatch));
		}
	}
}
namespace NoStaminaMod.patch
{
	[HarmonyPatch(typeof(PlayerControllerB))]
	internal class PlayerControllerBPatch
	{
		[HarmonyPatch("Update")]
		[HarmonyPostfix]
		private static void NoStaminaPatch(ref float ___sprintMeter)
		{
			___sprintMeter = 0f;
		}
	}
}