Decompiled source of NoFallDamage v1.0.0

NoFallDamage.dll

Decompiled 9 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 NoFallDamage.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("NoFallDamage")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("NoFallDamage")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("89155ad3-83bf-43a9-98be-61d13e3982c5")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace NoFallDamage
{
	[BepInPlugin("ATL.NoFallDamage", "NoFallDamage", "1.0.0")]
	public class NFDModBase : BaseUnityPlugin
	{
		private const string modGUID = "ATL.NoFallDamage";

		private const string modName = "NoFallDamage";

		private const string modVersion = "1.0.0";

		private readonly Harmony harmony = new Harmony("ATL.NoFallDamage");

		private static NFDModBase Instance;

		internal ManualLogSource mls;

		private void Awake()
		{
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
			mls = Logger.CreateLogSource("ATL.NoFallDamage");
			mls.LogInfo((object)"NoFallDamage Mod running...");
			harmony.PatchAll(typeof(NFDModBase));
			harmony.PatchAll(typeof(PlayerControllerBPatch));
		}
	}
}
namespace NoFallDamage.Patches
{
	[HarmonyPatch(typeof(PlayerControllerB))]
	internal class PlayerControllerBPatch
	{
		[HarmonyPatch("Update")]
		[HarmonyPostfix]
		private static void noFallDamagePatch(ref bool ___takingFallDamage)
		{
			___takingFallDamage = false;
		}
	}
}