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.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("InfiniteStamina")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("InfiniteStamina")]
[assembly: AssemblyCopyright("Copyright © 2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("1f3e863c-fe85-4da9-8d5d-c08079d0c2f3")]
[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("AllTheLinks.InfiniteStamina", "InfiniteStamina", "1.0.0")]
public class InfiniteStaminaBase : BaseUnityPlugin
{
private const string modGUID = "AllTheLinks.InfiniteStamina";
private const string modName = "InfiniteStamina";
private const string modVersion = "1.0.0";
private readonly Harmony harmony = new Harmony("AllTheLinks.InfiniteStamina");
private static InfiniteStaminaBase Instance;
internal ManualLogSource mls;
private void Awake()
{
if ((Object)(object)Instance == (Object)null)
{
Instance = this;
}
mls = Logger.CreateLogSource("AllTheLinks.InfiniteStamina");
mls.LogInfo((object)"InfiniteStamina Mod running...");
harmony.PatchAll(typeof(InfiniteStaminaBase));
harmony.PatchAll(typeof(PlayerCharacterBPatch));
}
}
}
namespace InfiniteStamina.Patches
{
[HarmonyPatch(typeof(PlayerControllerB))]
internal class PlayerCharacterBPatch
{
[HarmonyPatch("Update")]
[HarmonyPostfix]
private static void infiniteSprintPatch(ref float ___sprintMeter)
{
___sprintMeter = 1f;
}
}
}