Decompiled source of Super Stamina v1.0.0

SuperStamina.dll

Decompiled 8 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 HarmonyLib;
using SuperStamina.Patches;
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("SuperStamina")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SuperStamina")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("91b7eb20-9bc7-4aeb-8c80-f3eda84ce152")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace SuperStamina
{
	[BepInPlugin("VoltageZL.SuperStamina", "Super Stamina", "1.0.0")]
	public class BetterStamina : BaseUnityPlugin
	{
		private const string modGUID = "VoltageZL.SuperStamina";

		private const string modName = "Super Stamina";

		private const string modVersion = "1.0.0";

		private readonly Harmony harmony = new Harmony("VoltageZL.SuperStamina");

		private static BetterStamina instance;

		internal ManualLogSource mls;

		private void Awake()
		{
			if ((Object)(object)instance == (Object)null)
			{
				instance = this;
			}
			mls = Logger.CreateLogSource("VoltageZL.SuperStamina");
			mls.LogInfo((object)"Super Stamina was loaded");
			harmony.PatchAll(typeof(BetterStamina));
			harmony.PatchAll(typeof(PlayerControllerPatch));
		}
	}
}
namespace SuperStamina.Patches
{
	[HarmonyPatch(typeof(PlayerController))]
	internal class PlayerControllerPatch
	{
		[HarmonyPatch("Update")]
		[HarmonyPostfix]
		private static void infiniteSprintPatch(ref float ___maxStamina)
		{
			___maxStamina = 1f;
		}
	}
}