Decompiled source of InstantHealOnRest v1.0.0

InstantHealOnRest.dll

Decompiled 2 days ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using HarmonyLib;
using Microsoft.CodeAnalysis;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyCompany("InstantHealOnRest")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+d52a5fec014647a163861c9b15e423b9ae24cd9e")]
[assembly: AssemblyProduct("InstantHealOnRest")]
[assembly: AssemblyTitle("InstantHealOnRest")]
[assembly: AssemblyVersion("1.0.0.0")]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace InstantRest
{
	[BepInPlugin("zopthemop.instanthealonrest", "Instant Heal On Rest", "1.0.0")]
	public class Plugin : BaseUnityPlugin
	{
		public const string ModGUID = "zopthemop.instanthealonrest";

		public const string ModName = "Instant Heal On Rest";

		public const string ModVersion = "1.0.0";

		public const string ModDescription = "(Almost) instantly heal to full when comfortable";

		private readonly Harmony harmony = new Harmony("zopthemop.instanthealonrest");

		private void Awake()
		{
			harmony.PatchAll();
		}

		private void OnDestroy()
		{
			harmony.UnpatchSelf();
		}
	}
	[HarmonyPatch(typeof(SE_Cozy), "Setup")]
	public static class SECozy_Setup_Patch
	{
		public static void Postfix(SE_Cozy __instance)
		{
			((SE_Stats)__instance).m_healthRegenMultiplier = 100f;
		}
	}
}