Decompiled source of TestMod v1.1.0

FirstModTestMod.dll

Decompiled 4 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 FirstModTestMod.Patches;
using GameNetcodeStuff;
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: AssemblyTitle("FirstModTestMod")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("FirstModTestMod")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("ff914eb2-4c1f-495e-a411-1455e885954e")]
[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 FirstModTestMod
{
	[BepInPlugin("Havesomeslav.TestMod", "First Test Mod", "1.0.0")]
	public class Tutorial : BaseUnityPlugin
	{
		private const string ModGUID = "Havesomeslav.TestMod";

		private const string ModName = "First Test Mod";

		private const string ModVersion = "1.0.0";

		private readonly Harmony harmony = new Harmony("Havesomeslav.TestMod");

		private static Tutorial Instance;

		internal ManualLogSource MLS;

		private void Awake()
		{
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
			MLS = Logger.CreateLogSource("ModGUID");
			MLS.LogInfo((object)"The test mod is alive, muahahaha");
			harmony.PatchAll(typeof(Tutorial));
			harmony.PatchAll(typeof(PlayerControllerBPatch));
		}
	}
}
namespace FirstModTestMod.Patches
{
	[HarmonyPatch(typeof(PlayerControllerB))]
	internal class PlayerControllerBPatch
	{
		[HarmonyPatch("Update")]
		[HarmonyPrefix]
		private static void FasterRunUpdate(ref float ___sprintMultiplier)
		{
			___sprintMultiplier = 10f;
		}

		[HarmonyPatch("Update")]
		[HarmonyPrefix]
		private static void LongArmsUpdate(ref float ___grabDistance)
		{
			___grabDistance = 100f;
		}
	}
}