Decompiled source of FriendlyBracken v1.0.0

BepInEx/plugins/LoganC-FriendlyBracken/FriendlyBracken.dll

Decompiled 5 hours ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using LoganC.patch;
using Microsoft.CodeAnalysis;

[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 = ".NET Standard 2.1")]
[assembly: IgnoresAccessChecksTo("Assembly-CSharp")]
[assembly: AssemblyCompany("Template")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("0.0.0.0")]
[assembly: AssemblyInformationalVersion("0.0.0-alpha.0.3+6f4e88f5238c2b3b8a1994241cd5c3e843a4f4cb")]
[assembly: AssemblyProduct("Template")]
[assembly: AssemblyTitle("Template")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace LoganC
{
	[BepInPlugin("FriendlyBracken", "FriendlyBracken", "1.0.0")]
	public class Plugin : BaseUnityPlugin
	{
		private readonly Harmony _harmony = new Harmony("FriendlyBracken");

		public static Plugin Instance { get; set; }

		public static ManualLogSource Log => ((BaseUnityPlugin)Instance).Logger;

		public Plugin()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Expected O, but got Unknown
			Instance = this;
		}

		private void Awake()
		{
			Log.LogInfo((object)"Applying patches...");
			ApplyPluginPatch();
			Log.LogInfo((object)"Patches applied");
		}

		private void ApplyPluginPatch()
		{
			_harmony.PatchAll(typeof(BrackenPatch));
			_harmony.PatchAll(typeof(BrackenPatch2));
		}
	}
	public static class PluginInfo
	{
		public const string PLUGIN_GUID = "Template";

		public const string PLUGIN_NAME = "Template";

		public const string PLUGIN_VERSION = "1.0.0";
	}
}
namespace LoganC.patch
{
	[HarmonyPatch(typeof(FlowermanAI))]
	public class BrackenPatch
	{
		[HarmonyPatch("AddToAngerMeter")]
		[HarmonyPrefix]
		private static bool AddToAngerMeter(ref FlowermanAI __instance, object[] __args)
		{
			Plugin.Log.LogInfo((object)"Anger meter has increased!");
			return false;
		}
	}
	[HarmonyPatch(typeof(FlowermanAI))]
	public class BrackenPatch2
	{
		[HarmonyPatch("KillPlayerAnimationServerRpc")]
		[HarmonyPrefix]
		private static bool KillPlayerAnimationServerRpc(ref FlowermanAI __instance, object[] __args)
		{
			Plugin.Log.LogInfo((object)"Help me.");
			return false;
		}

		[HarmonyPatch("KillPlayerAnimationClientRpc")]
		[HarmonyPrefix]
		private static bool KillPlayerAnimationClientRpc(ref FlowermanAI __instance, object[] __args)
		{
			Plugin.Log.LogInfo((object)"Help me. Version 2");
			return false;
		}
	}
}
namespace System.Runtime.CompilerServices
{
	[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
	internal sealed class IgnoresAccessChecksToAttribute : Attribute
	{
		public IgnoresAccessChecksToAttribute(string assemblyName)
		{
		}
	}
}