Decompiled source of Just Speed Mod v1.1.0

BepInEx/plugins/MyMod.dll

Decompiled 8 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Logging;
using GameNetcodeStuff;
using HarmonyLib;
using MyMod.Patches;
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("MyMod")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("MyMod")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("d6efe206-eb29-4324-bec2-fb340b963651")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace MyMod
{
	[BepInPlugin("FirstMod.JustMod", "Just Speed Buffs", "1.0.0.0")]
	public class ModBase : BaseUnityPlugin
	{
		private const string modGUID = "FirstMod.JustMod";

		private const string modName = "Just Speed Buffs";

		private const string modVersion = "1.0.0.0";

		private readonly Harmony harmony = new Harmony("FirstMod.JustMod");

		private static ModBase Instance;

		internal ManualLogSource mls;

		private void Awake()
		{
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
			mls = Logger.CreateLogSource("FirstMod.JustMod");
			mls.LogInfo((object)"This shit is working :D");
			harmony.PatchAll(typeof(ModBase));
			harmony.PatchAll(typeof(PlayerControllerBPatch));
		}
	}
}
namespace MyMod.Patches
{
	[HarmonyPatch(typeof(PlayerControllerB))]
	internal class PlayerControllerBPatch
	{
		[HarmonyPatch("Update")]
		[HarmonyPostfix]
		private static void infiniteSprintPatch(PlayerControllerB __instance)
		{
			__instance.sprintMeter = 1f;
			__instance.movementSpeed = 6f;
			__instance.climbSpeed = 10f;
		}
	}
}