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 DFired v1.0.0
DFired.dll
Decompiled 2 years agousing System.Diagnostics; 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 UnityEngine.Networking; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("TestoMod")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("TestoMod")] [assembly: AssemblyCopyright("Copyright © 2023")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("df4511d1-5798-4a1c-9114-f174ad5196f8")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: AssemblyVersion("1.0.0.0")] [BepInPlugin("De.mon", "Pierdol sie...", "1.0.0")] public class DFiredBase : BaseUnityPlugin { [HarmonyPatch(typeof(StartOfRound))] internal class DFiredPatch { [HarmonyPatch("Start")] [HarmonyPostfix] public static void DFiredPatcherino(ref AudioClip ___firedVoiceSFX) { //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Invalid comparison between Unknown and I4 string text = "file://" + Paths.PluginPath + "/FDemon/DFired.mp3"; Debug.Log((object)("File path: " + text)); UnityWebRequest audioClip = UnityWebRequestMultimedia.GetAudioClip(text, (AudioType)13); audioClip.SendWebRequest(); log.LogInfo((object)"Accessed."); if ((int)audioClip.result == 1) { ___firedVoiceSFX = DownloadHandlerAudioClip.GetContent(audioClip); log.LogInfo((object)"Audio clip assigned to drop SFX."); } else { log.LogError((object)("Failed to access audio clip. Error: " + audioClip.error)); } log.LogInfo((object)"Loaded and patches applied."); } } private readonly Harmony harmony = new Harmony("De.mon"); private static DFiredBase Instance; internal static ManualLogSource log; internal static AudioClip newFiredVoiceSFX; private void Awake() { if ((Object)(object)Instance == (Object)null) { Instance = this; } log = Logger.CreateLogSource("Dimonnnzzz"); log.LogInfo((object)"EHEHE"); harmony.PatchAll(typeof(DFiredPatch)); } }