using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using AthleteStamina.Patches;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("AthleteStamina")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("AthleteStamina")]
[assembly: AssemblyCopyright("Copyright © 2025")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("0ae406a0-e248-47fc-8df6-b32eca135edc")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
public static class Log
{
public static ManualLogSource _logSource;
static Log()
{
_logSource = Logger.CreateLogSource("Athlete Stamina");
}
public static void LogInfo(object data)
{
_logSource.LogInfo(data);
}
public static void LogWarning(object data)
{
_logSource.LogWarning(data);
}
public static void LogError(object data)
{
_logSource.LogError(data);
}
public static void LogDebug(object data)
{
_logSource.LogDebug(data);
}
public static void LogFatal(object data)
{
_logSource.LogFatal(data);
}
public static void LogMessage(object data)
{
_logSource.LogMessage(data);
}
}
namespace AthleteStamina
{
[BepInPlugin("upgame.REPO.AthleteStamina", "Athlete Stamina", "1.0.0")]
public class PluginBase : BaseUnityPlugin
{
public const string PluginGUID = "upgame.REPO.AthleteStamina";
public const string PluginName = "Athlete Stamina";
public const string PluginVersion = "1.0.0";
private readonly Harmony _harmony = new Harmony("upgame.REPO.AthleteStamina");
private static PluginBase Instance;
private void Awake()
{
if (Instance == null)
{
Instance = this;
}
Log.LogInfo("<更真实的耐力>加载成功! Successfully loaded plugin: upgame.REPO.AthleteStamina!");
_harmony.PatchAll(typeof(PluginBase));
_harmony.PatchAll(typeof(PlayerController_Update_Patch));
}
}
}
namespace AthleteStamina.Patches
{
[HarmonyPatch(typeof(PlayerController), "Update")]
internal class PlayerController_Update_Patch
{
private static void Postfix(ref float ___EnergySprintDrain)
{
___EnergySprintDrain = 2.5f;
}
}
}