using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Threading; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using GameNetcodeStuff; using HarmonyLib; using LethalNetworkAPI; using TMPro; using UnityEngine; using UnityEngine.Events; using UnityEngine.Networking; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("DeathTunes")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("DeathTunes")] [assembly: AssemblyCopyright("Copyright © 2026")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("3bc8e91e-4245-4e07-9d3d-f9b30954ac9d")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: AssemblyVersion("1.0.0.0")] internal class EmptyMonoBehaviour : MonoBehaviour { } namespace DeathTunes; public static class DeathCustomizationManager { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static UnityAction <>9__10_2; internal void b__10_2() { PlaySelectedSound(); } } public static Dictionary Sounds = new Dictionary(); public static List SoundIDs = new List(); public static string SelectedSound = ""; private static int soundIndex = 0; public static string PendingSoundSelection = null; private static GameObject menu; public static int CurrentSoundIndex => soundIndex; private static void SendPlayerSound(PlayerControllerB player) { ulong playerSteamId = player.playerSteamId; DeathTunesPlugin.Log.LogInfo((object)("Sending sound '" + SelectedSound + "' for SteamID " + playerSteamId)); DeathSoundNetworking.SendSelection(playerSteamId, SelectedSound); } public static void LoadSounds() { string directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); List list = new List(); DeathTunesPlugin.Log.LogInfo((object)"Searching for death sounds..."); string path = Path.Combine(directoryName, "Sounds"); if (Directory.Exists(path)) { list.AddRange(Directory.GetFiles(path, "*.wav", SearchOption.AllDirectories)); } list.AddRange(Directory.GetFiles(directoryName, "*.wav", SearchOption.TopDirectoryOnly)); list = list.Distinct().ToList(); foreach (string item in list) { AudioClip val = DeathTunesPlugin.Instance.LoadWav(item); if ((Object)(object)val != (Object)null) { string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(item); if (!Sounds.ContainsKey(fileNameWithoutExtension)) { Sounds.Add(fileNameWithoutExtension, val); SoundIDs.Add(fileNameWithoutExtension); DeathTunesPlugin.Log.LogInfo((object)("Loaded death sound: " + fileNameWithoutExtension)); } } } if (SoundIDs.Count > 0) { string value = DeathTunesPlugin.SavedDeathSound.Value; if (!string.IsNullOrEmpty(value) && Sounds.ContainsKey(value)) { SelectedSound = value; } else { SelectedSound = SoundIDs[0]; } } DeathTunesPlugin.Log.LogInfo((object)("Total death sounds loaded: " + Sounds.Count)); } public static void OpenMenu() { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Expected O, but got Unknown //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Expected O, but got Unknown //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Expected O, but got Unknown //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Expected O, but got Unknown //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Expected O, but got Unknown if ((Object)(object)menu != (Object)null) { menu.SetActive(true); return; } menu = new GameObject("DeathTunesMenu"); Canvas val = menu.AddComponent(); val.renderMode = (RenderMode)0; CanvasScaler val2 = menu.AddComponent(); val2.uiScaleMode = (ScaleMode)1; menu.AddComponent(); GameObject val3 = CreatePanel(menu.transform, new Vector2(500f, 300f), new Vector2(0f, 0f)); Image component = val3.GetComponent(); ((Graphic)component).color = new Color(0f, 0f, 0f, 0.85f); GameObject val4 = CreateText(val3.transform, "Choose Death Sound", 32, new Vector2(0f, 100f)); GameObject val5 = CreateText(val3.transform, "", 24, new Vector2(0f, 20f)); TextMeshProUGUI soundLabel = val5.GetComponent(); UpdateSoundText(soundLabel); GameObject val6 = CreateButton(val3.transform, "<", new Vector2(-150f, -50f)); ((UnityEvent)val6.GetComponent