Notice: Wrestling Empire is now using Steam Workshop for official mod support. This page is going to remain accessible, but it's likely the content is not going to be kept up to date.
Decompiled source of UnlimitedParticles v1.0.1
plugins/UnlimitedParticles.dll
Decompiled 6 months agousing System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using HarmonyLib; using Microsoft.CodeAnalysis; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = ".NET Standard 2.0")] [assembly: AssemblyCompany("UnlimitedParticles")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("UnlimitedParticles")] [assembly: AssemblyTitle("UnlimitedParticles")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.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 UnlimitedParticles { [BepInPlugin("GeeEm.WrestlingEmpire.UnlimitedParticles", "UnlimitedParticles", "1.0.1")] [HarmonyPatch] public class Plugin : BaseUnityPlugin { public const string PluginGuid = "GeeEm.WrestlingEmpire.UnlimitedParticles"; public const string PluginName = "UnlimitedParticles"; public const string PluginVer = "1.0.1"; internal static ManualLogSource Log; internal static readonly Harmony Harmony = new Harmony("GeeEm.WrestlingEmpire.UnlimitedParticles"); public static ConfigEntry<int> configSize; internal static string PluginPath; public static Dictionary<int, float> _overrideTimers = new Dictionary<int, float>(); public static float PuddleSpeed = 0f; private void Awake() { Log = ((BaseUnityPlugin)this).Logger; PluginPath = Path.GetDirectoryName(((BaseUnityPlugin)this).Info.Location); configSize = ((BaseUnityPlugin)this).Config.Bind<int>("General", "New Limit", 10000, "New particles limit. Too many particles on screen might cause performance issues"); } private void OnEnable() { Harmony.PatchAll(); ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded UnlimitedParticles!"); } private void OnDisable() { Harmony.UnpatchSelf(); ((BaseUnityPlugin)this).Logger.LogInfo((object)"Unloaded UnlimitedParticles!"); } [HarmonyPatch(typeof(ALIGLHEIAGO), "ICGNAJFLAHL")] [HarmonyPostfix] public static void ALIGLHEIAGO_ICGNAJFLAHL() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown MEHJAJJNHLL[] array = (MEHJAJJNHLL[])(object)new MEHJAJJNHLL[configSize.Value + 1]; for (int i = 0; i <= configSize.Value; i++) { array[i] = new MEHJAJJNHLL(); array[i].PLFGKLGCOMD = i; } Array.Copy(ALIGLHEIAGO.HGLADILOIJA, array, ALIGLHEIAGO.AABNMPIJODF + 1); ALIGLHEIAGO.HGLADILOIJA = array; ALIGLHEIAGO.AABNMPIJODF = configSize.Value; } [HarmonyPatch(typeof(MEHJAJJNHLL), "DIJBHIAAIOF")] [HarmonyPostfix] public static void ALIGLHEIAGOO_DIJBHIAAIOF(MEHJAJJNHLL __instance) { if (__instance != null && __instance.BPJFLJPKKJK < 0 && !(__instance.DDLDBDJEPJA <= 0f) && !(__instance.CAILAODIPDO <= 0f) && !(__instance.GKAKINIMLGA <= 0f)) { __instance.JPMOFJPKINC = 1f; float mCJHGEHEPMD = MBLIOKEDHHB.MCJHGEHEPMD; int pLFGKLGCOMD = __instance.PLFGKLGCOMD; if (!_overrideTimers.ContainsKey(pLFGKLGCOMD)) { _overrideTimers.Add(pLFGKLGCOMD, 0f); } if (__instance.IMJHCHECCED + 2f < _overrideTimers[pLFGKLGCOMD]) { _overrideTimers[pLFGKLGCOMD] = __instance.IMJHCHECCED; } Dictionary<int, float> overrideTimers = _overrideTimers; overrideTimers[pLFGKLGCOMD] += mCJHGEHEPMD * PuddleSpeed; if (overrideTimers[pLFGKLGCOMD] == 0f) { overrideTimers[pLFGKLGCOMD] = 1f; } __instance.IMJHCHECCED = (int)overrideTimers[pLFGKLGCOMD]; } } } }