Decompiled source of RudyMod v1.0.0

RudyMod.dll

Decompiled a year 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;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("RudyMod")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("RudyMod")]
[assembly: AssemblyCopyright("Copyright ©  2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("8be59ded-8c6a-4f9f-9a1d-b76d87566641")]
[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 RudyMod
{
	[BepInPlugin("Rudy.RudyMod", "Rudy Mod", "1.0.0")]
	public class RudyModBase : BaseUnityPlugin
	{
		private const string modGUID = "Rudy.RudyMod";

		private const string modName = "Rudy Mod";

		private const string modVersion = "1.0.0";

		private readonly Harmony harmony = new Harmony("Rudy.RudyMod");

		private static RudyModBase Instance;

		internal ManualLogSource mls;

		private void Awake()
		{
			harmony.PatchAll();
			mls = Logger.CreateLogSource("Rudy.RudyMod");
			mls.LogInfo((object)"RudyMod has loaded.");
		}
	}
}
namespace RudyMod.Patches.FasterClimb
{
	[HarmonyPatch(typeof(PlayerControllerB))]
	internal class PlayerControllerBPatchFasterClimb
	{
		[HarmonyPatch("Update")]
		[HarmonyPostfix]
		private static void fasterClimb(ref bool ___isClimbingLadder, ref float ___climbSpeed)
		{
			if (___isClimbingLadder)
			{
				___climbSpeed = 50f;
			}
		}
	}
}
namespace RudyMod.Patches.NoFallDamage
{
	[HarmonyPatch(typeof(PlayerControllerB))]
	internal class PlayerControllerBPatchNoFallDamage
	{
		[HarmonyPatch("Update")]
		[HarmonyPostfix]
		private static void noFallDamage(ref float ___fallValueUncapped)
		{
			___fallValueUncapped = 0f;
		}
	}
}
namespace RudyMod.Patches.CrouchSpeed
{
	[HarmonyPatch(typeof(PlayerControllerB))]
	internal class PlayerControllerBPatchCrouchSpeed
	{
		[HarmonyPatch("Update")]
		[HarmonyPostfix]
		private static void crouchSpeedPatch(ref bool ___isCrouching, ref float ___sprintMultiplier)
		{
			if (___isCrouching)
			{
				___sprintMultiplier = 8f;
			}
		}
	}
}