Decompiled source of WuBracken v1.0.0

TateBracken.dll

Decompiled 10 months ago
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("0.0.0.0")]
namespace TateBracken
{
	[BepInPlugin("TateBracken", "Andrew Tate Bracken Mod", "1.0.0")]
	public class Plugin : BaseUnityPlugin
	{
		private const string modGUID = "TateBracken";

		private const string modName = "Andrew Tate Bracken Mod";

		private const string modVersion = "1.0.0";

		public static AssetBundle tate;

		public Harmony harmonymain;

		internal ManualLogSource mls;

		private void Awake()
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Expected O, but got Unknown
			tate = AssetBundle.LoadFromFile(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "TateBracken"));
			harmonymain = new Harmony("TateBracken");
			harmonymain.PatchAll();
			mls = Logger.CreateLogSource("TateBracken");
			mls.LogInfo((object)"Breathe air");
		}
	}
}
namespace TateBracken.Patches
{
	[HarmonyPatch]
	internal class EnemyTypes
	{
		[HarmonyPatch(typeof(FlowermanAI), "Start")]
		[HarmonyPostfix]
		public static void SummonTate(FlowermanAI __instance)
		{
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Expected O, but got Unknown
			//IL_00af: Unknown result type (might be due to invalid IL or missing references)
			__instance.creatureAngerVoice.clip = Plugin.tate.LoadAsset<AudioClip>("bugatti.mp3");
			__instance.crackNeckSFX = Plugin.tate.LoadAsset<AudioClip>("breathe.mp3");
			__instance.crackNeckAudio.clip = Plugin.tate.LoadAsset<AudioClip>("breathe.mp3");
			Object.Destroy((Object)((Component)((Component)__instance).gameObject.transform.Find("FlowermanModel").Find("LOD1")).gameObject.GetComponent<SkinnedMeshRenderer>());
			Object.Instantiate<GameObject>(Plugin.tate.LoadAsset<GameObject>("tate.prefab"), ((Component)__instance).gameObject.transform).transform.localPosition = new Vector3(0f, 1.5f, 0f);
		}
	}
}