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 YippeeIsBack v1.0.4
BepInEx/plugins/Krild/YippeeIsBack.dll
Decompiled 11 months 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; using YippeeIsBack.Patch; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("YippeeIsBack")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("YippeeIsBack")] [assembly: AssemblyCopyright("Copyright © 2025")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("61b54d49-fdfa-4ef7-a57f-b20a7cce098b")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: AssemblyVersion("1.0.0.0")] namespace YippeeIsBack { [BepInPlugin("Krild", "YippeeIsBack", "1.0.0.4")] public class Krild : BaseUnityPlugin { private const string modGUID = "Krild"; private const string modName = "YippeeIsBack"; private const string modVersion = "1.0.0.4"; private readonly Harmony harmony = new Harmony("Krild"); internal static Krild current; internal ManualLogSource log; internal static List<AudioClip> sounds; internal static AssetBundle bundle; private bool LoopActive = false; public bool GetLoopActive() { return LoopActive; } public void SetLoopActive(bool value) { LoopActive = value; } private void Awake() { if ((Object)(object)current == (Object)null) { current = this; } log = Logger.CreateLogSource("Krild"); harmony.PatchAll(typeof(Krild)); harmony.PatchAll(typeof(BringOurYippeeBack)); string location = ((BaseUnityPlugin)current).Info.Location; location = location.TrimEnd("YippeeIsBack.dll".ToCharArray()); bundle = AssetBundle.LoadFromFile(location + "yippee"); if ((Object)(object)bundle == (Object)null) { log.LogError((object)"Failed to load asset bundle!. Is the yippee soundfile maybe in a different location than the .dll file?"); return; } sounds = new List<AudioClip>(); sounds = bundle.LoadAllAssets<AudioClip>().ToList(); log.LogInfo((object)"Krildig den Yippee Sound geladen :3"); } public void WriteLog(string msg) { log.LogInfo((object)msg); } } } namespace YippeeIsBack.Patch { [HarmonyPatch(typeof(EnemyGnomeAnim))] internal class BringOurYippeeBack { [HarmonyPatch("Awake")] [HarmonyPostfix] private static void ReplaceAudio(EnemyGnomeAnim __instance) { __instance.soundDespawn.Sounds = Krild.sounds.ToArray(); } [HarmonyPatch("Update")] [HarmonyPostfix] private static void PlayRandom(EnemyGnomeAnim __instance) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) if (Random.Range(1, 1500) < 3) { __instance.soundDespawn.Play(__instance.enemy.CenterTransform.position, 1f, 1f, 1f, 1f); } } } }