Decompiled source of AmigoManBracken v1.1.0

BepInEx/plugins/Gok.dll

Decompiled 11 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using HarmonyLib;
using LC_API.BundleAPI;
using UnityEngine;
using UnityEngine.Video;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = "")]
[assembly: AssemblyCompany("Gok")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("My first plugin")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("Gok")]
[assembly: AssemblyTitle("Gok")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace Gok
{
	[BepInPlugin("Gok", "Gok", "1.0.0")]
	public class Plugin : BaseUnityPlugin
	{
		public Harmony harmonymain;

		private void Awake()
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Expected O, but got Unknown
			harmonymain = new Harmony("Gok");
			harmonymain.PatchAll();
			((BaseUnityPlugin)this).Logger.LogInfo((object)"gok loaded.");
		}
	}
	public static class PluginInfo
	{
		public const string PLUGIN_GUID = "Gok";

		public const string PLUGIN_NAME = "Gok";

		public const string PLUGIN_VERSION = "1.0.0";
	}
}
namespace Gok.Patches
{
	[HarmonyPatch]
	internal class EnemyTypes
	{
		[HarmonyPatch(typeof(FlowermanAI), "Start")]
		[HarmonyPostfix]
		public static void SummonGok(FlowermanAI __instance)
		{
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			__instance.creatureAngerVoice.clip = BundleLoader.GetLoadedAsset<AudioClip>("assets/ultra.mp3");
			__instance.crackNeckSFX = BundleLoader.GetLoadedAsset<AudioClip>("assets/mods.mp3");
			__instance.crackNeckAudio.clip = BundleLoader.GetLoadedAsset<AudioClip>("assets/mods.mp3");
			Object.Destroy((Object)(object)((Component)((Component)__instance).gameObject.transform.Find("FlowermanModel").Find("LOD1")).gameObject.GetComponent<SkinnedMeshRenderer>());
			GameObject val = Object.Instantiate<GameObject>(BundleLoader.GetLoadedAsset<GameObject>("assets/Gok.prefab"), ((Component)__instance).gameObject.transform);
			val.transform.localPosition = new Vector3(0f, 1.5f, 0f);
		}
	}
	[HarmonyPatch]
	internal class TerminalPatches
	{
		[HarmonyPatch(typeof(Terminal), "Awake")]
		[HarmonyPostfix]
		public static void EditTerminal(Terminal __instance)
		{
			__instance.enemyFiles[1].displayVideo = BundleLoader.GetLoadedAsset<VideoClip>("assets/Gok.m4v");
		}
	}
}