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 LethalGym v1.0.1
LethalGym.dll
Decompiled 2 years agousing System.Diagnostics; using System.IO; 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 LethalLib.Modules; 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("TestMod")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("TestMod")] [assembly: AssemblyCopyright("Copyright © 2023")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("8783459d-c18b-47c1-8ab8-33850c35c096")] [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 LethalGym { [BepInPlugin("LethalGym", "LethalGym", "1.0.1.0")] public class Plugin : BaseUnityPlugin { private const string modGUID = "LethalGym"; private const string modName = "LethalGym"; private const string modVersion = "1.0.1.0"; private readonly Harmony harmony = new Harmony("LethalGym"); private static Plugin Instance; internal ManualLogSource mls; private void Awake() { if ((Object)(object)Instance == (Object)null) { Instance = this; } mls = Logger.CreateLogSource("LethalGym"); mls.LogInfo((object)"The Lethal Gym Is Open"); string text = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "lethalgym"); AssetBundle val = AssetBundle.LoadFromFile(text); Item item = val.LoadAsset<Item>("assets/scraps/dumbell.asset"); Item item2 = val.LoadAsset<Item>("assets/scraps/dumbellbig.asset"); RegisterScrapByPlanet(item, new int[8] { 18, 25, 19, 36, 34, 46, 50, 47 }); RegisterScrapByPlanet(item2, new int[8] { 0, 0, 0, 14, 15, 34, 33, 30 }); TerminalNode val2 = ScriptableObject.CreateInstance<TerminalNode>(); harmony.PatchAll(typeof(Plugin)); } private void RegisterScrapByPlanet(Item item, int[] weights) { NetworkPrefabs.RegisterNetworkPrefab(item.spawnPrefab); Items.RegisterScrap(item, weights[0], (LevelTypes)4); Items.RegisterScrap(item, weights[1], (LevelTypes)8); Items.RegisterScrap(item, weights[2], (LevelTypes)16); Items.RegisterScrap(item, weights[3], (LevelTypes)32); Items.RegisterScrap(item, weights[4], (LevelTypes)64); Items.RegisterScrap(item, weights[5], (LevelTypes)128); Items.RegisterScrap(item, weights[6], (LevelTypes)256); Items.RegisterScrap(item, weights[7], (LevelTypes)512); } } } namespace LethalGym.Patches { [HarmonyPatch(typeof(PlayerControllerB))] internal class PlayerControllerBPatch { [HarmonyPatch("Update")] [HarmonyPostfix] private static void infSprintPatch(ref float ___sprintMeter) { ___sprintMeter = 1f; } } }