Decompiled source of NoFallDamage v1.0.1

plugins/NoFallDamage/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 ©  2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("3a7ea2ee-2b5b-477c-9e57-1b026ffeecd5")]
[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 NoFallDamage
{
	[BepInPlugin("jaceob.NoFallDamage", "No Fall Damage", "1.0.0")]
	public class NoFallDamageClass : BaseUnityPlugin
	{
		private const string modGUID = "jaceob.NoFallDamage";

		private const string modName = "No Fall Damage";

		private const string modVersion = "1.0.0";

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

		private static NoFallDamageClass instance;

		internal ManualLogSource logSource;

		private void Awake()
		{
			if ((Object)(object)instance == (Object)null)
			{
				instance = this;
			}
			logSource = Logger.CreateLogSource("jaceob.NoFallDamage");
			logSource.LogInfo((object)"No Fall Damage mod started!");
			harmony.PatchAll(typeof(NoFallDamageClass));
			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;
		}
	}
}