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 TheDavidMod v1.2.0
The David Mod.dll
Decompiled a year agousing System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using BepInEx; using BepInEx.Logging; using GameNetcodeStuff; using HarmonyLib; using LCSoundTool; using The_David_Mod.Patches; 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("The David Mod")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("The David Mod")] [assembly: AssemblyCopyright("Copyright © 2023")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("dabacce3-467e-4864-8f6e-78c4fdf61bbd")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: AssemblyVersion("1.0.0.0")] namespace The_David_Mod { [HarmonyPatch(typeof(HoarderBugAI))] internal class HoarderBugAIPatch { public static AudioClip[] chineseAngryClips = (AudioClip[])(object)new AudioClip[5]; public static AudioSource deathAudioSource; [HarmonyPatch("Start")] [HarmonyPostfix] private static void soundChange(ref HoarderBugAI __instance) { chineseAngryClips[0] = TheDavidMod.chineseAngry1; chineseAngryClips[1] = TheDavidMod.chineseAngry2; chineseAngryClips[2] = TheDavidMod.chineseAngry3; chineseAngryClips[3] = TheDavidMod.chineseAngry4; chineseAngryClips[4] = TheDavidMod.chineseAngry5; deathAudioSource = ((Component)__instance).gameObject.AddComponent<AudioSource>(); __instance.chitterSFX = chineseAngryClips; __instance.angryScreechSFX = chineseAngryClips; __instance.bugFlySFX = TheDavidMod.chinaNumberOne; } [HarmonyPatch("KillEnemy")] [HarmonyPostfix] private static void deathSound() { deathAudioSource.PlayOneShot(TheDavidMod.death); } } [HarmonyPatch(typeof(ItemDropship))] internal class ItemDropShipPatch { [HarmonyPatch("Start")] [HarmonyPostfix] private static void thePatch(ItemDropship __instance) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) AudioClip stickTalk = TheDavidMod.stickTalk; AudioClip stickTalkFarAway = TheDavidMod.stickTalkFarAway; AudioSource component = ((Component)((Component)__instance).transform.Find("Music")).gameObject.GetComponent<AudioSource>(); AudioSource component2 = ((Component)((Component)((Component)__instance).transform.Find("Music")).transform.Find("Music (1)")).gameObject.GetComponent<AudioSource>(); component.clip = stickTalk; component2.clip = stickTalkFarAway; } } [HarmonyPatch(typeof(ShipTeleporter))] internal class ShipTeleporterPatch { [HarmonyPatch("PressTeleportButtonOnLocalClient")] [HarmonyPrefix] private static void soundChange(ref ShipTeleporter __instance) { if (TheDavidMod.player.playerSteamId == 76561198073606307L) { __instance.teleporterSpinSFX = TheDavidMod.rapGod; } } } [HarmonyPatch(typeof(Shovel))] internal class ShovelPatch { public static AudioClip[] hitClips = (AudioClip[])(object)new AudioClip[1] { TheDavidMod.davidHit3 }; [HarmonyPatch("__initializeVariables")] [HarmonyPrefix] private static void soundPatch(ref Shovel __instance) { __instance.hitSFX = hitClips; } } [HarmonyPatch(typeof(SpringManAI))] internal class SpringManAIPatch { [HarmonyPatch("SetAnimationStopClientRpc")] [HarmonyPostfix] private static void soundAddition(ref SpringManAI __instance) { ((EnemyAI)__instance).creatureSFX.PlayOneShot(TheDavidMod.fnafSpook); } } [HarmonyPatch(typeof(StartOfRound))] internal class StartOfRoundPatch { [HarmonyPatch("Start")] [HarmonyPostfix] private static void LoadSound(ref StartOfRound __instance) { } } [BepInPlugin("GUID", "Name", "1.0")] public class TheDavidMod : BaseUnityPlugin { private const string modGUID = "WoodenTree-TheDavidMod"; private const string modName = "The David Mod"; private const string modVersion = "1.0.0.0"; private readonly Harmony harmony = new Harmony("WoodenTree-TheDavidMod"); public static TheDavidMod Instance; internal ManualLogSource mls; public static PlayerControllerB player; public static StartOfRound startOfRound; public static AudioClip dellorHolyS; public static AudioClip carCrashLoud; public static AudioClip carCrashMed; public static AudioClip davidRage; public static AudioClip davidGetHit; public static AudioClip stickTalk; public static AudioClip stickTalkFarAway; public static AudioClip chineseAngry; public static AudioClip davidWindup; public static AudioClip davidHit1; public static AudioClip davidHit2; public static AudioClip davidHit3; public static AudioClip chineseAngry1; public static AudioClip chineseAngry2; public static AudioClip chineseAngry3; public static AudioClip chineseAngry4; public static AudioClip chineseAngry5; public static AudioClip chinaNumberOne; public static AudioClip geekTime; public static AudioClip breathe; public static AudioClip ricFlair; public static AudioClip fanito; public static AudioClip shoenice; public static AudioClip magnolia; public static AudioClip fAndN; public static AudioClip fein; public static AudioClip crankThat; public static AudioClip meow; public static AudioClip rapGod; public static AudioClip death; public static AudioClip fnafSpook; private void Awake() { if ((Object)(object)Instance == (Object)null) { Instance = this; } mls = Logger.CreateLogSource("WoodenTree-TheDavidMod"); mls.LogInfo((object)"THE DAVID MOD HAS AWOKEN"); harmony.PatchAll(typeof(TheDavidMod)); harmony.PatchAll(typeof(StartOfRoundPatch)); harmony.PatchAll(typeof(ItemDropShipPatch)); harmony.PatchAll(typeof(HoarderBugAIPatch)); harmony.PatchAll(typeof(PlayerControllerBPatch)); harmony.PatchAll(typeof(SpringManAIPatch)); harmony.PatchAll(typeof(ShovelPatch)); harmony.PatchAll(typeof(ShipTeleporterPatch)); harmony.PatchAll(typeof(VehicleControllerPatch)); } } public static class MyPluginInfo { public const string PLUGIN_GUID = "The David Mod"; public const string PLUGIN_NAME = ""; public const string PLUGIN_VERSION = "1.0.0.0"; } } namespace The_David_Mod.Patches { [HarmonyPatch(typeof(PlayerControllerB))] internal class PlayerControllerBPatch { [HarmonyPatch("Start")] [HarmonyPostfix] private static void loadSounds(ref PlayerControllerB __instance) { string text = Path.Combine(Paths.PluginPath, "WoodenTree-TheDavidMod"); TheDavidMod.player = __instance; TheDavidMod.davidRage = SoundTool.GetAudioClip(text, "Sounds", "davidNoWay.ogg"); TheDavidMod.davidGetHit = SoundTool.GetAudioClip(text, "Sounds", "davidGetHit.ogg"); TheDavidMod.chineseAngry = SoundTool.GetAudioClip(text, "Sounds", "chineseAngry.ogg"); TheDavidMod.carCrashLoud = SoundTool.GetAudioClip(text, "Sounds", "carCrashLoud.ogg"); TheDavidMod.carCrashMed = SoundTool.GetAudioClip(text, "Sounds", "carCrashMed.ogg"); TheDavidMod.dellorHolyS = SoundTool.GetAudioClip(text, "Sounds", "dellorAngry1.ogg"); TheDavidMod.davidWindup = SoundTool.GetAudioClip(text, "Sounds", "davidWindup.ogg"); TheDavidMod.davidHit1 = SoundTool.GetAudioClip(text, "Sounds", "davidHit1.ogg"); TheDavidMod.davidHit2 = SoundTool.GetAudioClip(text, "Sounds", "davidHit2.ogg"); TheDavidMod.davidHit3 = SoundTool.GetAudioClip(text, "Sounds", "davidHit3.ogg"); TheDavidMod.chineseAngry1 = SoundTool.GetAudioClip(text, "Sounds", "chineseAngry1.ogg"); TheDavidMod.chineseAngry2 = SoundTool.GetAudioClip(text, "Sounds", "chineseAngry2.ogg"); TheDavidMod.chineseAngry3 = SoundTool.GetAudioClip(text, "Sounds", "chineseAngry3.ogg"); TheDavidMod.chineseAngry4 = SoundTool.GetAudioClip(text, "Sounds", "chineseAngry4.ogg"); TheDavidMod.chineseAngry5 = SoundTool.GetAudioClip(text, "Sounds", "chineseAngry5.ogg"); TheDavidMod.chinaNumberOne = SoundTool.GetAudioClip(text, "Sounds", "chinaNumberOne.ogg"); TheDavidMod.geekTime = SoundTool.GetAudioClip(text, "Sounds", "geekTime.ogg"); TheDavidMod.breathe = SoundTool.GetAudioClip(text, "Sounds", "breathe.ogg"); TheDavidMod.ricFlair = SoundTool.GetAudioClip(text, "Sounds", "ricFlair.ogg"); TheDavidMod.fanito = SoundTool.GetAudioClip(text, "Sounds", "fanito.ogg"); TheDavidMod.shoenice = SoundTool.GetAudioClip(text, "Sounds", "shoenice.ogg"); TheDavidMod.magnolia = SoundTool.GetAudioClip(text, "Sounds", "magnolia.ogg"); TheDavidMod.fAndN = SoundTool.GetAudioClip(text, "Sounds", "fAndN.ogg"); TheDavidMod.fein = SoundTool.GetAudioClip(text, "Sounds", "fein.ogg"); TheDavidMod.crankThat = SoundTool.GetAudioClip(text, "Sounds", "crankThat.ogg"); TheDavidMod.meow = SoundTool.GetAudioClip(text, "Sounds", "meow.ogg"); TheDavidMod.rapGod = SoundTool.GetAudioClip(text, "Sounds", "rapGod.ogg"); TheDavidMod.death = SoundTool.GetAudioClip(text, "Sounds", "death.ogg"); TheDavidMod.fnafSpook = SoundTool.GetAudioClip(text, "Sounds", "fnafSpook.ogg"); SoundTool.SendNetworkedAudioClip(TheDavidMod.death); SoundTool.SendNetworkedAudioClip(TheDavidMod.fnafSpook); SoundTool.SyncNetworkedAudioClips(); TheDavidMod.stickTalk = SoundTool.GetAudioClip(text, "Sounds", "stickTalk.ogg"); TheDavidMod.stickTalkFarAway = SoundTool.GetAudioClip(text, "Sounds", "stickTalkFarAway.ogg"); TheDavidMod.Instance.mls.LogInfo((object)"David sounds loaded!"); __instance.playersManager.hitPlayerSFX = TheDavidMod.davidGetHit; } [HarmonyPatch("Jump_performed")] [HarmonyPostfix] private static void jumpPatch(ref PlayerControllerB __instance) { } } [HarmonyPatch(typeof(VehicleController))] internal class VehicleControllerPatch { public static AudioClip[] radioClips = (AudioClip[])(object)new AudioClip[10]; public static AudioClip[] maxCollisionSfx = (AudioClip[])(object)new AudioClip[1]; public static AudioClip[] medCollisionSfx = (AudioClip[])(object)new AudioClip[1]; public static AudioClip[] minCollisionSfx = (AudioClip[])(object)new AudioClip[1]; public static AudioClip[] obstacleCollisionSfx = (AudioClip[])(object)new AudioClip[1]; public static AudioSource deathAudioSource; [HarmonyPatch("Start")] [HarmonyPostfix] private static void soundChange(ref VehicleController __instance) { radioClips[0] = TheDavidMod.geekTime; radioClips[1] = TheDavidMod.breathe; radioClips[2] = TheDavidMod.ricFlair; radioClips[3] = TheDavidMod.fanito; radioClips[4] = TheDavidMod.shoenice; radioClips[5] = TheDavidMod.magnolia; radioClips[6] = TheDavidMod.fAndN; radioClips[7] = TheDavidMod.fein; radioClips[8] = TheDavidMod.crankThat; radioClips[9] = TheDavidMod.meow; maxCollisionSfx[0] = TheDavidMod.carCrashLoud; medCollisionSfx[0] = TheDavidMod.carCrashMed; minCollisionSfx[0] = TheDavidMod.carCrashMed; obstacleCollisionSfx[0] = TheDavidMod.carCrashMed; __instance.radioClips = radioClips; __instance.maxCollisions = maxCollisionSfx; __instance.medCollisions = medCollisionSfx; __instance.minCollisions = minCollisionSfx; __instance.obstacleCollisions = obstacleCollisionSfx; } } }