Decompiled source of BeefyMod v1.0.3

BeefyMod.dll

Decompiled 10 months ago
using System.Diagnostics;
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 UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("BeefyMod")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("BeefyMod")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("0ff11025-3f19-4dbe-8366-ebd75e0834ea")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace BeefyMod;

[BepInPlugin("Stashiocat.BeefyMod", "Beefy Mod", "1.0.0")]
public class BeefyModBase : BaseUnityPlugin
{
	[HarmonyPatch(typeof(HoarderBugAI))]
	internal class HoarderBugPatch
	{
		[HarmonyPatch("Start")]
		[HarmonyPostfix]
		public static void hoarderBugBeefyMod(ref AudioClip ___angryVoiceSFX)
		{
			___angryVoiceSFX = beefyHeyAudio;
			LogSource.LogInfo((object)("Beefy HEY audio replaced! " + (object)beefyHeyAudio));
		}
	}

	private const string modGUID = "Stashiocat.BeefyMod";

	private const string modName = "Beefy Mod";

	private const string modVersion = "1.0.0";

	private readonly Harmony harmony = new Harmony("Stashiocat.BeefyMod");

	public static BeefyModBase Instance;

	public static ManualLogSource LogSource;

	public static AudioClip beefyHeyAudio;

	public static PlayerControllerB PreviousPlayer;

	private void Awake()
	{
		if ((Object)(object)Instance == (Object)null)
		{
			Instance = new BeefyModBase();
		}
		LogSource = Logger.CreateLogSource("Beefy Mod");
		LogSource.LogInfo((object)"Beefy HEY!");
		beefyHeyAudio = SoundTool.GetAudioClip("Chicago_Bullies-BeefyMod", "BeefyHey.wav");
		harmony.PatchAll(typeof(BeefyModBase));
		harmony.PatchAll(typeof(HoarderBugPatch));
	}
}