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 Shared Upgrade Chance 2 v1.0.1
SharedUpgradeChance2.dll
Decompiled a year agousing System; using System.Collections.Generic; using System.Diagnostics; using System.Linq.Expressions; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using BepInEx; using BepInEx.Logging; using HarmonyLib; using SharedUpgradeChance2.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("SharedUpgradeChance2")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("SharedUpgradeChance2")] [assembly: AssemblyCopyright("Copyright © 2025")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("216ab9a6-a5b3-463c-9d90-dc643c3f948c")] [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 SharedUpgradeChance2 { [BepInPlugin("SharedUpgradeChance2", "Shared Upgrade Chance 2", "1.0.0")] public class plugin : BaseUnityPlugin { public const string pluginGuid = "SharedUpgradeChance2"; public const string pluginName = "Shared Upgrade Chance 2"; public const string pluginVersion = "1.0.0"; internal static ManualLogSource Loger; public void Awake() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown //IL_0310: Unknown result type (might be due to invalid IL or missing references) //IL_031e: Expected O, but got Unknown Loger = new ManualLogSource("SHAREDUPGRADECHANCE"); Logger.Sources.Add((ILogSource)(object)Loger); Loger.LogInfo((object)"Shared Upgrade Chance Loading"); Harmony val = new Harmony("SharedUpgradeChance2"); List<MethodInfo> list = new List<MethodInfo>(); List<MethodInfo> list2 = new List<MethodInfo>(); list.Add(AccessTools.Method(typeof(ItemUpgradeMapPlayerCount), "Upgrade", (Type[])null, (Type[])null)); list2.Add(SymbolExtensions.GetMethodInfo((Expression<Action>)(() => ItemUpgradeMapPlayerCount_Patch.Upgrade_Patch()))); list.Add(AccessTools.Method(typeof(ItemUpgradePlayerEnergy), "Upgrade", (Type[])null, (Type[])null)); list2.Add(SymbolExtensions.GetMethodInfo((Expression<Action>)(() => ItemUpgradePlayerEnergy_Patch.Upgrade_Patch()))); list.Add(AccessTools.Method(typeof(ItemUpgradePlayerExtraJump), "Upgrade", (Type[])null, (Type[])null)); list2.Add(SymbolExtensions.GetMethodInfo((Expression<Action>)(() => ItemUpgradePlayerExtraJump_Patch.Upgrade_Patch()))); list.Add(AccessTools.Method(typeof(ItemUpgradePlayerGrabRange), "Upgrade", (Type[])null, (Type[])null)); list2.Add(SymbolExtensions.GetMethodInfo((Expression<Action>)(() => ItemUpgradePlayerGrabRange_Patch.Upgrade_Patch()))); list.Add(AccessTools.Method(typeof(ItemUpgradePlayerGrabStrength), "Upgrade", (Type[])null, (Type[])null)); list2.Add(SymbolExtensions.GetMethodInfo((Expression<Action>)(() => ItemUpgradePlayerGrabStrength_Patch.Upgrade_Patch()))); list.Add(AccessTools.Method(typeof(ItemUpgradePlayerGrabThrow), "Upgrade", (Type[])null, (Type[])null)); list2.Add(SymbolExtensions.GetMethodInfo((Expression<Action>)(() => ItemUpgradePlayerGrabThrow_Patch.Upgrade_Patch()))); list.Add(AccessTools.Method(typeof(ItemUpgradePlayerHealth), "Upgrade", (Type[])null, (Type[])null)); list2.Add(SymbolExtensions.GetMethodInfo((Expression<Action>)(() => ItemUpgradePlayerHealth_Patch.Upgrade_Patch()))); list.Add(AccessTools.Method(typeof(ItemUpgradePlayerSprintSpeed), "Upgrade", (Type[])null, (Type[])null)); list2.Add(SymbolExtensions.GetMethodInfo((Expression<Action>)(() => ItemUpgradePlayerSprintSpeed_Patch.Upgrade_Patch()))); list.Add(AccessTools.Method(typeof(ItemUpgradePlayerTumbleLaunch), "Upgrade", (Type[])null, (Type[])null)); list2.Add(SymbolExtensions.GetMethodInfo((Expression<Action>)(() => ItemUpgradePlayerTumbleLaunch_Patch.Upgrade_Patch()))); for (int i = 0; i < list.Count; i++) { val.Patch((MethodBase)list[i], new HarmonyMethod(list2[i]), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); } } } } namespace SharedUpgradeChance2.patches { public class ItemUpgradeMapPlayerCount_Patch { public static bool Upgrade_Patch() { foreach (PlayerAvatar item in SemiFunc.PlayerGetAll()) { Random random = new Random(); int num = random.Next(1, 3); plugin.Loger.LogInfo((object)("Chance generated for: " + SemiFunc.PlayerGetName(item) + " : " + num)); if (num != 1) { PunManager.instance.UpgradeMapPlayerCount(SemiFunc.PlayerGetSteamID(item)); plugin.Loger.LogInfo((object)("Map Player Count upgrade given to: " + SemiFunc.PlayerGetName(item))); } } return true; } } public class ItemUpgradePlayerEnergy_Patch : MonoBehaviour { public static bool Upgrade_Patch() { foreach (PlayerAvatar item in SemiFunc.PlayerGetAll()) { Random random = new Random(); int num = random.Next(1, 3); plugin.Loger.LogInfo((object)("Chance generated for: " + SemiFunc.PlayerGetName(item) + " : " + num)); if (num != 1) { PunManager.instance.UpgradePlayerEnergy(SemiFunc.PlayerGetSteamID(item)); plugin.Loger.LogInfo((object)("Player Energy upgrade given to: " + SemiFunc.PlayerGetName(item))); } } return true; } } public class ItemUpgradePlayerExtraJump_Patch { public static bool Upgrade_Patch() { foreach (PlayerAvatar item in SemiFunc.PlayerGetAll()) { Random random = new Random(); int num = random.Next(1, 3); plugin.Loger.LogInfo((object)("Chance generated for: " + SemiFunc.PlayerGetName(item) + " : " + num)); if (num != 1) { PunManager.instance.UpgradePlayerExtraJump(SemiFunc.PlayerGetSteamID(item)); plugin.Loger.LogInfo((object)("Extra Jump upgrade given to: " + SemiFunc.PlayerGetName(item))); } } return true; } } public class ItemUpgradePlayerGrabRange_Patch { public static bool Upgrade_Patch() { foreach (PlayerAvatar item in SemiFunc.PlayerGetAll()) { Random random = new Random(); int num = random.Next(1, 3); plugin.Loger.LogInfo((object)("Chance generated for: " + SemiFunc.PlayerGetName(item) + " : " + num)); if (num != 1) { PunManager.instance.UpgradePlayerGrabRange(SemiFunc.PlayerGetSteamID(item)); plugin.Loger.LogInfo((object)("Grab Range upgrade given to: " + SemiFunc.PlayerGetName(item))); } } return true; } } public class ItemUpgradePlayerGrabStrength_Patch { public static bool Upgrade_Patch() { foreach (PlayerAvatar item in SemiFunc.PlayerGetAll()) { Random random = new Random(); int num = random.Next(1, 3); plugin.Loger.LogInfo((object)("Chance generated for: " + SemiFunc.PlayerGetName(item) + " : " + num)); if (num != 1) { PunManager.instance.UpgradePlayerGrabStrength(SemiFunc.PlayerGetSteamID(item)); plugin.Loger.LogInfo((object)("Grab Strength upgrade given to: " + SemiFunc.PlayerGetName(item))); } } return true; } } public class ItemUpgradePlayerGrabThrow_Patch { public static bool Upgrade_Patch() { foreach (PlayerAvatar item in SemiFunc.PlayerGetAll()) { Random random = new Random(); int num = random.Next(1, 3); plugin.Loger.LogInfo((object)("Chance generated for: " + SemiFunc.PlayerGetName(item) + " : " + num)); if (num != 1) { PunManager.instance.UpgradePlayerThrowStrength(SemiFunc.PlayerGetSteamID(item)); plugin.Loger.LogInfo((object)("Throw Strength upgrade given to: " + SemiFunc.PlayerGetName(item))); } } return true; } } public class ItemUpgradePlayerHealth_Patch { public static bool Upgrade_Patch() { foreach (PlayerAvatar item in SemiFunc.PlayerGetAll()) { Random random = new Random(); int num = random.Next(1, 3); plugin.Loger.LogInfo((object)("Chance generated for: " + SemiFunc.PlayerGetName(item) + " : " + num)); if (num != 1) { PunManager.instance.UpgradePlayerHealth(SemiFunc.PlayerGetSteamID(item)); plugin.Loger.LogInfo((object)("Health upgrade given to: " + SemiFunc.PlayerGetName(item))); } } return true; } } public class ItemUpgradePlayerSprintSpeed_Patch { public static bool Upgrade_Patch() { foreach (PlayerAvatar item in SemiFunc.PlayerGetAll()) { Random random = new Random(); int num = random.Next(1, 3); plugin.Loger.LogInfo((object)("Chance generated for: " + SemiFunc.PlayerGetName(item) + " : " + num)); if (num != 1) { PunManager.instance.UpgradePlayerSprintSpeed(SemiFunc.PlayerGetSteamID(item)); plugin.Loger.LogInfo((object)("Sprint Speed upgrade given to: " + SemiFunc.PlayerGetName(item))); } } return true; } } public class ItemUpgradePlayerTumbleLaunch_Patch { public static bool Upgrade_Patch() { foreach (PlayerAvatar item in SemiFunc.PlayerGetAll()) { Random random = new Random(); int num = random.Next(1, 3); plugin.Loger.LogInfo((object)("Chance generated for: " + SemiFunc.PlayerGetName(item) + " : " + num)); if (num != 1) { PunManager.instance.UpgradePlayerTumbleLaunch(SemiFunc.PlayerGetSteamID(item)); plugin.Loger.LogInfo((object)("Tumble Launch upgrade given to: " + SemiFunc.PlayerGetName(item))); } } return true; } } }