Decompiled source of LCMap2WebMod v1.0.0

BepInEx/plugins/LCMap2WebMod.dll

Decompiled 11 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using GameNetcodeStuff;
using HarmonyLib;
using LCMap2WebMod.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("LCMap2WebMod")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("LCMap2WebMod")]
[assembly: AssemblyCopyright("Copyright ©  2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("09f1fbb8-a20d-4a7d-ad4f-740f1b1be46e")]
[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 LCMap2WebMod
{
	[BepInPlugin("Guiguitop1.LCMap2WebMod", "LC Map2Web Mod", "1.0.0.0")]
	public class Map2WebModBase : BaseUnityPlugin
	{
		private const string modGUID = "Guiguitop1.LCMap2WebMod";

		private const string modName = "LC Map2Web Mod";

		private const string modVersion = "1.0.0.0";

		private readonly Harmony harmony = new Harmony("Guiguitop1.LCMap2WebMod");

		private static Map2WebModBase Instance;

		private void Awake()
		{
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin Guiguitop1.LCMap2WebMod is loaded!");
			harmony.PatchAll(typeof(Map2WebModBase));
			harmony.PatchAll(typeof(PlayerControllerBP));
		}
	}
}
namespace LCMap2WebMod.Patches
{
	[HarmonyPatch(typeof(PlayerControllerB))]
	internal class PlayerControllerBP
	{
		public const float sprintMeter = 0.0005f;

		public const float sprintTime = 9f;

		[HarmonyPatch("Update")]
		[HarmonyPostfix]
		private static void setPlayerTimeSpeedPatch(ref float ___sprintMeter, ref float ___sprintTime)
		{
			___sprintTime = 9f;
			___sprintMeter += 0.0005f;
		}
	}
}