Decompiled source of Bird Friend v1.0.4

plugins/Bird_Friend/Bird_Friend.dll

Decompiled a day ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using Reptile;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("Bird_Friend")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Bird_Friend")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("f4112a03-ad0a-4923-8de5-1d5d91ee7e00")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace BirdFriend
{
	[BepInPlugin("com.Clarity64.BirdFriend", "Bird Friend", "1.0.0")]
	public class BirdFriendPlugin : BaseUnityPlugin
	{
		private const string MyGUID = "com.Clarity64.BirdFriend";

		private const string PluginName = "Bird Friend";

		private const string VersionString = "1.0.0";

		private static readonly Harmony Harmony = new Harmony("com.Clarity64.BirdFriend");

		public static ManualLogSource Log = new ManualLogSource("Bird Friend");

		public static DieAbility dieAbility;

		public static Vector3 playerpos1;

		private float keyPressStartTime = 0f;

		public static int myAnimationKey = 0;

		public static Player player { get; set; }

		private void Awake()
		{
			((BaseUnityPlugin)this).Logger.LogInfo((object)"PluginName: Bird Friend, VersionString: 1.0.0 is loading...");
			Harmony.PatchAll();
			((BaseUnityPlugin)this).Logger.LogInfo((object)"PluginName: Bird Friend, VersionString: 1.0.0 is loaded.");
			Log = ((BaseUnityPlugin)this).Logger;
		}

		private void Update()
		{
		}

		private void ConfigSettingChanged(object sender, EventArgs e)
		{
		}
	}
}
namespace BirdFriend.Patches
{
	[HarmonyPatch(typeof(BirdBehaviour))]
	[HarmonyPatch("UpdateStreetLife")]
	[HarmonyPatch(new Type[]
	{
		typeof(StreetLifeCluster),
		typeof(StreetLifeHot[]),
		typeof(int),
		typeof(int)
	})]
	internal static class Patch_BirdBehaviour_UpdateStreetLife
	{
		[HarmonyPrefix]
		public static bool Prefix(BirdBehaviour __instance, StreetLifeCluster cluster, StreetLifeHot[] streetLifeHotArray, int startIndex, int length)
		{
			return false;
		}
	}
	[HarmonyPatch(typeof(BirdBehaviour))]
	internal static class Patch_BirdBehaviour_Move
	{
		[HarmonyTargetMethod]
		public static MethodInfo TargetMethod()
		{
			return AccessTools.Method(typeof(BirdBehaviour), "Move", new Type[4]
			{
				typeof(StreetLifeCluster),
				typeof(StreetLife),
				typeof(StreetLifeHot).MakeByRefType(),
				typeof(Transform)
			}, (Type[])null);
		}

		[HarmonyPrefix]
		public static bool Prefix(BirdBehaviour __instance, StreetLifeCluster cluster, StreetLife life, ref StreetLifeHot streetLifeHot, Transform otherTransform)
		{
			return false;
		}
	}
}