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 DyrnwynQuenched v1.0.3
DyrnwynQuenched.dll
Decompiled a week agousing System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using BepInEx; using BepInEx.Logging; using HarmonyLib; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: AssemblyCompany("DyrnwynQuenched")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.3.0")] [assembly: AssemblyInformationalVersion("1.0.3+c579f50a943395b702ca78cae292910cb6358ee0")] [assembly: AssemblyProduct("DyrnwynQuenched")] [assembly: AssemblyTitle("DyrnwynQuenched")] [assembly: AssemblyVersion("1.0.3.0")] namespace DyrnwynQuenched; internal static class DyrnwynPatcher { internal const string PrefabName = "SwordDyrnwyn"; internal static void Quench(GameObject prefab) { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)prefab == (Object)null) { return; } ParticleSystem[] componentsInChildren = prefab.GetComponentsInChildren<ParticleSystem>(true); foreach (ParticleSystem obj in componentsInChildren) { ParticleSystemRenderer component = ((Component)obj).GetComponent<ParticleSystemRenderer>(); if ((Object)(object)component != (Object)null) { ((Renderer)component).enabled = false; } MainModule main = obj.main; ((MainModule)(ref main)).playOnAwake = false; EmissionModule emission = obj.emission; ((EmissionModule)(ref emission)).enabled = false; obj.Stop(true, (ParticleSystemStopBehavior)0); } } } [HarmonyPatch(typeof(ObjectDB), "Awake")] internal static class ObjectDB_Awake_Patch { private static void Postfix(ObjectDB __instance) { DyrnwynPatcher.Quench(__instance.GetItemPrefab("SwordDyrnwyn")); } } [HarmonyPatch(typeof(ObjectDB), "CopyOtherDB")] internal static class ObjectDB_CopyOtherDB_Patch { private static void Postfix(ObjectDB __instance) { DyrnwynPatcher.Quench(__instance.GetItemPrefab("SwordDyrnwyn")); } } [HarmonyPatch(typeof(ZNetScene), "Awake")] internal static class ZNetScene_Awake_Patch { private static void Postfix(ZNetScene __instance) { GameObject prefab = __instance.GetPrefab("SwordDyrnwyn"); if ((Object)(object)prefab == (Object)null) { Plugin.Log.LogWarning((object)"[DyrnwynQuenched] SwordDyrnwyn prefab not found in ZNetScene."); return; } DyrnwynPatcher.Quench(prefab); Plugin.Log.LogInfo((object)"[DyrnwynQuenched] Fire particles quenched."); } } [BepInPlugin("com.dyrnwyn.quenched", "DyrnwynQuenched", "1.0.3")] public class Plugin : BaseUnityPlugin { public const string PluginGUID = "com.dyrnwyn.quenched"; public const string PluginName = "DyrnwynQuenched"; public const string PluginVersion = "1.0.3"; internal static ManualLogSource Log; private void Awake() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) Log = ((BaseUnityPlugin)this).Logger; Log.LogInfo((object)"DyrnwynQuenched v1.0.3 loading…"); new Harmony("com.dyrnwyn.quenched").PatchAll(); Log.LogInfo((object)"DyrnwynQuenched patches applied."); } }