Decompiled source of InfiniteStamina v1.0.0

TestPlugin.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 TestPlugin.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("TestPlugin")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("TestPlugin")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("55f0d24e-8670-4b2d-97c3-c269e7c97812")]
[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 TestPlugin
{
	[BepInPlugin("Ofoz.TestMod", "Test Mod for Lethal Company by Ofoz", "1.0.0")]
	public class TestPluginBase : BaseUnityPlugin
	{
		private const string modGUID = "Ofoz.TestMod";

		private const string modName = "Test Mod for Lethal Company by Ofoz";

		private const string modVersion = "1.0.0";

		private readonly Harmony harmony = new Harmony("Ofoz.TestMod");

		private static TestPluginBase Instance;

		internal ManualLogSource mls;

		private void Awake()
		{
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
			mls = Logger.CreateLogSource("Ofoz.TestMod");
			mls.LogInfo((object)"Awake");
			harmony.PatchAll(typeof(TestPluginBase));
			harmony.PatchAll(typeof(PlayerControllerBPatch));
			mls.LogInfo((object)"Patched succesfully");
		}
	}
}
namespace TestPlugin.Patches
{
	[HarmonyPatch(typeof(PlayerControllerB))]
	internal class PlayerControllerBPatch
	{
		[HarmonyPatch("Update")]
		[HarmonyPostfix]
		private static void infiniteSprintPatch(ref float ___sprintMeter)
		{
			___sprintMeter = 1f;
		}
	}
}