Please disclose if your mod was created primarily 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 LobotomyKaisenJester v1.0.0
BepInEx/plugins/LobotomizedJester/LobotomizedJester.dll
Decompiled 2 years agousing System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using BepInEx; using BepInEx.Logging; using HarmonyLib; 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("LobotomizedJester")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("LobotomizedJester")] [assembly: AssemblyCopyright("Copyright © 2024")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("b31b828e-b99a-4b9b-bb13-08caba3c5cdb")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: AssemblyVersion("1.0.0.0")] namespace LobotomizedJester { [BepInPlugin("KurisuBot.LobotomizedJester", "LobotomizedJester", "1.0.0")] public class Plugin : BaseUnityPlugin { private const string modGUID = "KurisuBot.LobotomizedJester"; private const string modName = "LobotomizedJester"; private const string modVersion = "1.0.0"; public static Plugin instance; private readonly Harmony harmony = new Harmony("KurisuBot.LobotomizedJester"); internal ManualLogSource mls; internal static List<AudioClip> LK; internal static List<AudioClip> ScreamReplacement; internal static AssetBundle Bundle; internal static AssetBundle Bundle2; private void Awake() { if ((Object)(object)instance == (Object)null) { instance = this; } mls = Logger.CreateLogSource("KurisuBot.LobotomizedJester"); mls.LogInfo((object)"LobotomizedJester Loading . . . "); string location = ((BaseUnityPlugin)instance).Info.Location; location = location.TrimEnd("LobotomizedJester.dll".ToCharArray()); mls.LogInfo((object)location); Harmony.CreateAndPatchAll(Assembly.GetExecutingAssembly(), (string)null); LK = new List<AudioClip>(); ScreamReplacement = new List<AudioClip>(); Bundle = AssetBundle.LoadFromFile(location + "lobotomykaisen"); Bundle2 = AssetBundle.LoadFromFile(location + "chase"); if ((Object)(object)Bundle != (Object)null) { LK = Bundle.LoadAllAssets<AudioClip>().ToList(); } else { mls.LogError((object)"Failed to load asset bundle (lobotomykaisen)"); } if ((Object)(object)Bundle2 != (Object)null) { mls.LogInfo((object)"Sucessfully loaded asset bundle (chase)"); ScreamReplacement = Bundle2.LoadAllAssets<AudioClip>().ToList(); } else { mls.LogError((object)"Failed to load asset bundle (chase)"); } mls.LogInfo((object)"LobotomizedJester Loaded!"); } public static void Log(string message) { ((BaseUnityPlugin)instance).Logger.LogInfo((object)message); } } } namespace LobotomizedJester.Patches { [HarmonyPatch(typeof(JesterAI))] internal class JesterMusicPatch { [HarmonyPatch("Start")] [HarmonyPostfix] private static void SukunaPossession(JesterAI __instance) { __instance.popGoesTheWeaselTheme = Plugin.LK[0]; __instance.screamingSFX = Plugin.ScreamReplacement[0]; Plugin.Log("************JESTER SUCCESSFULLY LOBOTOMIZED************"); } } }