Decompiled source of CookieKnife v1.1.2

CookieKnife.dll

Decompiled a month ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using HarmonyLib;
using Microsoft.CodeAnalysis;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("CookieSylvia")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.1.2.0")]
[assembly: AssemblyInformationalVersion("1.1.2")]
[assembly: AssemblyProduct("CookieKnife")]
[assembly: AssemblyTitle("CookieKnife")]
[assembly: AssemblyVersion("1.1.2.0")]
[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 CookieKnife
{
	[HarmonyPatch(typeof(KnifeItem))]
	internal static class KnifePatches
	{
		[HarmonyPatch("HitKnife")]
		[HarmonyPostfix]
		private static void OnKnifeHit(ref float ___timeAtLastDamageDealt)
		{
			___timeAtLastDamageDealt = -1f;
		}
	}
	[BepInPlugin("CookieKnife", "CookieKnife", "1.1.2")]
	public sealed class Plugin : BaseUnityPlugin
	{
		private void Awake()
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			new Harmony("CookieKnife").PatchAll(typeof(Plugin).Assembly);
			((BaseUnityPlugin)this).Logger.LogInfo((object)"CookieKnife v1.1.2 loaded.");
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Patch by Cookie\nIcon by Kaede");
		}
	}
	internal static class PluginInfo
	{
		public const string Guid = "CookieKnife";

		public const string Name = "CookieKnife";

		public const string Version = "1.1.2";
	}
}