Decompiled source of LowSanity v0.2.1

LowSanity.dll

Decompiled 2 weeks 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 LowSanity.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("LowSanity")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("LowSanity")]
[assembly: AssemblyCopyright("Copyright ©  2025")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("4625055a-fff0-4541-94f2-2e4270ae53f4")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace LowSanity
{
	[BepInPlugin("Poseidon.LowSanity", "LowSanity", "1.0.0.0")]
	public class CustomMod : BaseUnityPlugin
	{
		private const string modGUID = "Poseidon.LowSanity";

		private const string modName = "LowSanity";

		private const string modVersion = "1.0.0.0";

		private readonly Harmony harmony = new Harmony("Poseidon.LowSanity");

		private static CustomMod Instance;

		internal ManualLogSource nls;

		private void Awake()
		{
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
			nls = Logger.CreateLogSource("Poseidon.LowSanity");
			nls.LogInfo((object)"SHIT LOADED");
			harmony.PatchAll(typeof(CustomMod));
			harmony.PatchAll(typeof(PlayerControllerBPatch));
		}
	}
}
namespace LowSanity.Patches
{
	[HarmonyPatch(typeof(PlayerControllerB))]
	internal class PlayerControllerBPatch
	{
		[HarmonyPatch("Update")]
		[HarmonyPostfix]
		private static void SanityPatch(ref float ___insanityLevel)
		{
			___insanityLevel = 50f;
		}
	}
}