Decompiled source of CancelRock v1.0.1

CancelRock.dll

Decompiled 6 months 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.Configuration;
using BepInEx.Logging;
using HarmonyLib;
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(".NETFramework,Version=v4.6", FrameworkDisplayName = "")]
[assembly: AssemblyCompany("CMax")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("Allows you to cancel the rock ability by letting go of the ability button, instead of having to wait for the ability to finish.")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+efcac89a79d4fef5e824ec662f32fa7904ceb648")]
[assembly: AssemblyProduct("CancelRock")]
[assembly: AssemblyTitle("CancelRock")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.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 CancelRock
{
	[BepInPlugin("dev.cmax.CancelRock", "CancelRock", "1.0.0")]
	[BepInProcess("BoplBattle.exe")]
	public class Plugin : BaseUnityPlugin
	{
		internal static Harmony harmony;

		internal static ManualLogSource logger;

		internal static ConfigFile config;

		private void Awake()
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Expected O, but got Unknown
			//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Expected O, but got Unknown
			harmony = new Harmony(((BaseUnityPlugin)this).Info.Metadata.GUID);
			logger = ((BaseUnityPlugin)this).Logger;
			config = ((BaseUnityPlugin)this).Config;
			((BaseUnityPlugin)this).Logger.LogMessage((object)$"guid: {((BaseUnityPlugin)this).Info.Metadata.GUID}, name: {((BaseUnityPlugin)this).Info.Metadata.Name}, version: {((BaseUnityPlugin)this).Info.Metadata.Version}");
			harmony.Patch((MethodBase)AccessTools.Method(typeof(BounceBall), "LateUpdateSim", (Type[])null, (Type[])null), new HarmonyMethod(typeof(Patches), "BallUpdate_Prefix", (Type[])null), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null);
		}
	}
	internal class Patches
	{
		internal static void BallUpdate_Prefix(BounceBall __instance)
		{
			__instance.IsCancellable = true;
		}
	}
	public static class PluginInfo
	{
		public const string PLUGIN_GUID = "CancelRock";

		public const string PLUGIN_NAME = "CancelRock";

		public const string PLUGIN_VERSION = "1.0.0";
	}
}