Decompiled source of TiredMod v1.0.0

TiredMod/TiredMod.dll

Decompiled 10 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 TiredMod.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("TiredMod")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("TiredMod")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("b3d79c4b-631f-4478-ab6e-c5af0d848c0e")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace TiredMod
{
	[BepInPlugin("mersedel.TiredMod", "Tired mod", "1.0.0")]
	public class TiredModBase : BaseUnityPlugin
	{
		private const string modGUID = "mersedel.TiredMod";

		private const string modName = "Tired mod";

		private const string modVersion = "1.0.0";

		private readonly Harmony harmony = new Harmony("mersedel.TiredMod");

		private static TiredModBase Instance;

		internal ManualLogSource mls;

		private void Awake()
		{
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
			mls = Logger.CreateLogSource("mersedel.TiredMod");
			mls.LogInfo((object)"The Tired Mod has awaken!");
			harmony.PatchAll(typeof(TiredModBase));
			harmony.PatchAll(typeof(PlayerControllerBPatch));
		}
	}
}
namespace TiredMod.Patches
{
	[HarmonyPatch(typeof(PlayerControllerB))]
	internal class PlayerControllerBPatch
	{
		[HarmonyPatch("Update")]
		[HarmonyPostfix]
		private static void NoSprintAndJumpPatch(ref float ___jumpForce, ref float ___sprintTime)
		{
			___jumpForce = 1f;
			___sprintTime = 0f;
		}
	}
}