Decompiled source of QuickDashes v1.0.0

QuickDashes.dll

Decompiled 18 hours ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using Configgy;
using HarmonyLib;
using UnityEngine;

[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.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyCompany("QuickDashes")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("QuickDashes")]
[assembly: AssemblyTitle("QuickDashes")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace QuickDashes;

[BepInPlugin("quickdashes.ultranoob.ultrakill", "QuickDashes", "1.0.0")]
public class QuickDashes : BaseUnityPlugin
{
	[HarmonyPatch(typeof(NewMovement), "Dodge")]
	public class NewMovement_Dodge_Patch
	{
		private static void Postfix(NewMovement __instance)
		{
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0065: Unknown result type (might be due to invalid IL or missing references)
			if (!__instance.sliding)
			{
				float num = (modEnabled ? ((float)dashSpeedMultiplier) : 1f);
				Vector3 velocity = __instance.rb.velocity;
				Vector3 val = new Vector3(velocity.x, 0f, velocity.z) * num;
				__instance.rb.velocity = new Vector3(val.x, velocity.y, val.z);
			}
		}
	}

	private Harmony harmony;

	public static ConfigBuilder ConfigMenu;

	[Configgable("Settings", "Enable Mod", 0, "Enable or disable the mod.")]
	public static bool modEnabled = true;

	[Configgable("Settings", "Dash Speed Multiplier", 1, "Dash speed multiplier: 1 to 10 (10x faster).")]
	[Range(1f, 10f)]
	public static int dashSpeedMultiplier = 1;

	private void Awake()
	{
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_0011: Expected O, but got Unknown
		//IL_0027: Unknown result type (might be due to invalid IL or missing references)
		//IL_0031: Expected O, but got Unknown
		harmony = new Harmony("quickdashes.ultranoob.ultrakill");
		harmony.PatchAll();
		ConfigMenu = new ConfigBuilder("quickdashes.ultranoob.ultrakill", "QuickDashes");
		ConfigMenu.BuildType(typeof(QuickDashes));
		((BaseUnityPlugin)this).Logger.LogInfo((object)"QuickDashes mod loaded!");
	}
}