Decompiled source of QuickSlides v1.0.0

QuickSlides.dll

Decompiled 19 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("QuickSlides")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("QuickSlides")]
[assembly: AssemblyTitle("QuickSlides")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace QuickSlides;

[BepInPlugin("quickslides.ultranoob.ultrakill", "QuickSlides", "1.0.0")]
public class QuickSlides : BaseUnityPlugin
{
	[HarmonyPatch(typeof(NewMovement), "Dodge")]
	public class NewMovement_Dodge_Patch
	{
		private static void Postfix(NewMovement __instance)
		{
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			if (__instance.sliding)
			{
				float num = (modEnabled ? ((float)slideSpeedMultiplier) : 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", "Slide Speed Multiplier", 1, "Slide speed multiplier: 1 to 10 (10x faster).")]
	[Range(1f, 10f)]
	public static int slideSpeedMultiplier = 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("quickslides.ultranoob.ultrakill");
		harmony.PatchAll();
		ConfigMenu = new ConfigBuilder("quickslides.ultranoob.ultrakill", "QuickSlides");
		ConfigMenu.BuildType(typeof(QuickSlides));
		((BaseUnityPlugin)this).Logger.LogInfo((object)"QuickSlides mod loaded!");
	}
}