Decompiled source of buggisteMod v1.0.0

buggisteMod.dll

Decompiled a year 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 HarmonyLib;
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("buggisteMod")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("buggisteMod")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("a9d3bac4-42db-483f-9773-d0bdfdf01d49")]
[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")]
[BepInPlugin("c0rez.buggisteMod", "Buggiste Mod", "1.0.0")]
public class buggisteModBase : BaseUnityPlugin
{
	private const string modGUID = "c0rez.buggisteMod";

	private const string modName = "Buggiste Mod";

	private const string modVersion = "1.0.0";

	private readonly Harmony harmony = new Harmony("c0rez.buggisteMod");

	private static buggisteModBase Instance;

	internal ManualLogSource mls;

	internal static AudioClip[] newChitterSFX;

	internal static AudioClip[] newAngryScreechSFX;

	private void Awake()
	{
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		//IL_0011: Expected O, but got Unknown
		//IL_0079: Unknown result type (might be due to invalid IL or missing references)
		//IL_0084: Expected O, but got Unknown
		if ((Object)Instance == (Object)null)
		{
			Instance = this;
		}
		mls = Logger.CreateLogSource("c0rez.buggisteMod");
		mls.LogInfo((object)"c0rez.buggisteMod is loading.");
		string location = ((BaseUnityPlugin)Instance).Info.Location;
		string text = "buggisteMod.dll";
		string text2 = location.TrimEnd(text.ToCharArray());
		string text3 = text2 + "audiobundle";
		AssetBundle val = AssetBundle.LoadFromFile(text3);
		if ((Object)val == (Object)null)
		{
			mls.LogError((object)"Failed to load audio assets!");
			return;
		}
		AudioClip val2 = val.LoadAsset<AudioClip>("1.mp3");
		AudioClip val3 = val.LoadAsset<AudioClip>("2.mp3");
		AudioClip val4 = val.LoadAsset<AudioClip>("3.mp3");
		AudioClip val5 = val.LoadAsset<AudioClip>("4.mp3");
		AudioClip val6 = val.LoadAsset<AudioClip>("5.mp3");
		newChitterSFX = (AudioClip[])(object)new AudioClip[3] { val2, val3, val4 };
		newAngryScreechSFX = (AudioClip[])(object)new AudioClip[2] { val5, val6 };
		harmony.PatchAll(typeof(HoarderBugPatch));
		mls.LogInfo((object)"c0rez.buggisteMod is loaded. Rend l'argent le juif.");
	}
}
[HarmonyPatch(typeof(HoarderBugAI))]
internal class HoarderBugPatch
{
	[HarmonyPatch("Start")]
	[HarmonyPostfix]
	public static void hoarderBugAudioPatch(ref AudioClip[] ___chitterSFX, ref AudioClip[] ___angryScreechSFX)
	{
		AudioClip[] array = (___chitterSFX = buggisteModBase.newChitterSFX);
		AudioClip[] array2 = (___angryScreechSFX = buggisteModBase.newAngryScreechSFX);
	}
}