Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of Shop Infinite Stamina v1.1.2
Shop Infinite Stamina\ShopInfiniteStamina.dll
Decompiled 19 hours agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using BepInEx; using BepInEx.Logging; using HarmonyLib; using Microsoft.CodeAnalysis; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("ShopInfiniteStamina")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.1.2.0")] [assembly: AssemblyInformationalVersion("1.1.2+67a17c07d83219143096295278d9339c836bb50d")] [assembly: AssemblyProduct("ShopInfiniteStamina")] [assembly: AssemblyTitle("ShopInfiniteStamina")] [assembly: AssemblyVersion("1.1.2.0")] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace ShopInfiniteStamina { [BepInPlugin("com.riggola.shopinfinitestamina", "Shop Infinite Stamina", "1.1.2")] public class Plugin : BaseUnityPlugin { public const string PluginGuid = "com.riggola.shopinfinitestamina"; public const string PluginName = "Shop Infinite Stamina"; public const string PluginVersion = "1.1.2"; internal static ManualLogSource Log; private static readonly FieldRef<PlayerController, float> EnergyCurrent = AccessTools.FieldRefAccess<PlayerController, float>("EnergyCurrent"); private static readonly FieldRef<PlayerController, float> EnergyStart = AccessTools.FieldRefAccess<PlayerController, float>("EnergyStart"); private static readonly FieldRef<PlayerController, float> SprintDrainTimer = AccessTools.FieldRefAccess<PlayerController, float>("SprintDrainTimer"); private static readonly FieldRef<PlayerController, float> SprintRechargeTimer = AccessTools.FieldRefAccess<PlayerController, float>("sprintRechargeTimer"); private static readonly FieldRef<PlayerController, PlayerAvatar> PlayerAvatarScript = AccessTools.FieldRefAccess<PlayerController, PlayerAvatar>("playerAvatarScript"); private static readonly FieldRef<PlayerAvatar, bool> IsLocalAvatar = AccessTools.FieldRefAccess<PlayerAvatar, bool>("isLocal"); private void Awake() { Log = ((BaseUnityPlugin)this).Logger; Log.LogInfo((object)"Shop Infinite Stamina v1.1.2 loaded"); } private void Update() { if (!SemiFunc.RunIsShop()) { return; } PlayerController instance = PlayerController.instance; if (!((Object)(object)instance == (Object)null)) { PlayerAvatar val = null; try { val = PlayerAvatarScript.Invoke(instance); } catch { } if (!((Object)(object)val != (Object)null) || IsLocalAvatar.Invoke(val)) { float num = Mathf.Max(0f, EnergyStart.Invoke(instance)); EnergyCurrent.Invoke(instance) = num; SprintDrainTimer.Invoke(instance) = 0f; SprintRechargeTimer.Invoke(instance) = 0f; } } } } }