Decompiled source of RoiBurgondeCompany v0.0.3

RoiBurgondeCompany.dll

Decompiled 6 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 HarmonyLib;
using RoiBurgondeCompany.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("RoiBurgondeCompany")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("RoiBurgondeCompany")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("c9be99d4-78f0-451e-b2a6-09e856b864ee")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace RoiBurgondeCompany
{
	[BepInPlugin("EvanTheCube.RoiBurgondeMod", "Baboon Couillère", "1.0.0")]
	public class RoiBurgondeModBase : BaseUnityPlugin
	{
		private const string modGUID = "EvanTheCube.RoiBurgondeMod";

		private const string modName = "Baboon Couillère";

		private const string modVersion = "1.0.0";

		internal static AudioClip[] newBaboonHawkScreamSFX;

		internal static AudioClip[] newBaboonHawkLaughSFX;

		internal static AudioClip[] newSpringManSFX;

		internal static AudioClip[] newCrawlerLongRoarSFX;

		internal static AudioClip newCrawlerShortRoarSFX;

		private readonly Harmony harmony = new Harmony("EvanTheCube.RoiBurgondeMod");

		private static RoiBurgondeModBase Instance;

		internal ManualLogSource mls;

		private void Awake()
		{
			mls = Logger.CreateLogSource("EvanTheCube.RoiBurgondeMod");
			mls.LogInfo((object)"Plugin EvanTheCube.RoiBurgondeMod is starting to load!");
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
			string location = ((BaseUnityPlugin)Instance).Info.Location;
			string text = "RoiBurgondeCompany.dll";
			location = location.TrimEnd(text.ToCharArray());
			AssetBundle val = AssetBundle.LoadFromFile(location + "roiburgonde");
			if ((Object)(object)val == (Object)null)
			{
				mls.LogError((object)"Failed to load audio assets!");
				return;
			}
			newBaboonHawkScreamSFX = val.LoadAssetWithSubAssets<AudioClip>("Couillere.wav");
			newBaboonHawkLaughSFX = val.LoadAssetWithSubAssets<AudioClip>("RireBurgonde.wav");
			newSpringManSFX = val.LoadAssetWithSubAssets<AudioClip>("arthourpafquestceadirequececi.wav");
			newCrawlerLongRoarSFX = val.LoadAssetWithSubAssets<AudioClip>("cestlaguerre.wav");
			newCrawlerShortRoarSFX = val.LoadAsset<AudioClip>("cestlaguerre.wav");
			harmony.PatchAll(typeof(RoiBurgondeModBase));
			harmony.PatchAll(typeof(BaboonBirdPatch));
			harmony.PatchAll(typeof(SpringManPatch));
			harmony.PatchAll(typeof(CrawlerPatch));
		}
	}
}
namespace RoiBurgondeCompany.Patches
{
	[HarmonyPatch(typeof(BaboonBirdAI))]
	internal class BaboonBirdPatch
	{
		[HarmonyPatch("Start")]
		[HarmonyPostfix]
		public static void BaboonBirdAudioPatch(BaboonBirdAI __instance)
		{
			__instance.cawLaughSFX = RoiBurgondeModBase.newBaboonHawkLaughSFX;
			__instance.cawScreamSFX = RoiBurgondeModBase.newBaboonHawkScreamSFX;
		}
	}
	[HarmonyPatch(typeof(SpringManAI))]
	internal class SpringManPatch
	{
		[HarmonyPatch("Update")]
		[HarmonyPostfix]
		public static void SpringManAudioPatch(SpringManAI __instance)
		{
			__instance.springNoises = RoiBurgondeModBase.newSpringManSFX;
		}
	}
	[HarmonyPatch(typeof(CrawlerAI))]
	internal class CrawlerPatch
	{
		[HarmonyPatch("Start")]
		[HarmonyPostfix]
		public static void CrawlerAudioPatch(CrawlerAI __instance)
		{
			__instance.longRoarSFX = RoiBurgondeModBase.newCrawlerLongRoarSFX;
			__instance.shortRoar = RoiBurgondeModBase.newCrawlerShortRoarSFX;
		}
	}
}