Decompiled source of TateBracken v1.0.0

TateBracken.dll

Decompiled 11 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.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[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_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: 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");
		}
	}
	internal class tate
	{
	}
}
namespace TateBracken.Patches
{
	[HarmonyPatch]
	internal class EnemyTypes
	{
		[HarmonyPatch(typeof(FlowermanAI), "Start")]
		[HarmonyPostfix]
		public static void SummonTate(FlowermanAI __instance)
		{
			//IL_0075: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Expected O, but got Unknown
			//IL_00b5: 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>());
			GameObject val = Object.Instantiate<GameObject>(Plugin.tate.LoadAsset<GameObject>("tate.prefab"), ((Component)__instance).gameObject.transform);
			val.transform.localPosition = new Vector3(0f, 1.5f, 0f);
		}
	}
}