Decompiled source of ARBMod v1.0.0

BepInEx/plugins/ARBMod/bracken.dll

Decompiled 5 months ago
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
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 bracken;
using dog.Pathes;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("bracken")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("bracken")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("468a328b-f497-4985-b596-43b82c7d0e73")]
[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 bracken
{
	[BepInPlugin("CbrovkinMods.ARBMod", "ARBMod", "1.0.0")]
	public class ARBMod : BaseUnityPlugin
	{
		private const string modGUID = "CbrovkinMods.ARBMod";

		private const string modName = "ARBMod";

		private const string modVersion = "1.0.0";

		private readonly Harmony harmony = new Harmony("CbrovkinMods.ARBMod");

		private static ARBMod Instance;

		internal ManualLogSource mls;

		internal static List<AudioClip> SoundFX;

		internal static AssetBundle Bundle;

		private void Awake()
		{
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
			mls = Logger.CreateLogSource("CbrovkinMods.ARBMod");
			mls.LogInfo((object)"ПОМОГИТЕ МНЕ МЕНЯ ДЕРЖАТ В ЗАЛОЖНИКАХ И ЗАСТАВЛЯЮТ ДЕЛАТЬ МОДЫ ДЛЯ ЭТОЙ ИГРЫ КТО-НИБУДЬ СПАСИТЕ МЕНЯ ИЗ ЭТОГО ЗАТОЧЕНИЯ ААААААААААААААААААААА!!!!!!!!!!HELP ME I'M BEING HELD HOSTAGE AND FORCED TO MAKE MODS FOR THIS GAME SOMEONE SAVE ME FROM THIS IMPRISONMENT AAAAAAAAAAAAAAAAAAA!!!!!!!!!!");
			harmony.PatchAll(typeof(FlowermanAIPatch));
			mls = ((BaseUnityPlugin)this).Logger;
			SoundFX = new List<AudioClip>();
			string location = ((BaseUnityPlugin)Instance).Info.Location;
			location = location.TrimEnd("brackenmod.dll".ToCharArray());
			Bundle = AssetBundle.LoadFromFile(location + "bracken");
			if ((Object)(object)Bundle != (Object)null)
			{
				mls.LogInfo((object)"Asset bundle loaded successfully");
				SoundFX = Bundle.LoadAllAssets<AudioClip>().ToList();
			}
			else
			{
				mls.LogError((object)"Failed to load asset bundle");
			}
		}
	}
}
namespace dog.Pathes
{
	[HarmonyPatch(typeof(FlowermanAI))]
	internal class FlowermanAIPatch
	{
		[HarmonyPatch("Update")]
		[HarmonyPostfix]
		private static void OverrideAudio(FlowermanAI __instance)
		{
			__instance.crackNeckSFX = ARBMod.SoundFX[1];
		}
	}
}