Decompiled source of LowQuota v1.0.0

LowQuota.dll

Decompiled 10 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 HarmonyLib;
using LowQuota.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("LowQuota")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("LowQuota")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("7796d861-a7f3-491b-b45b-cd1546e6b06e")]
[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 LowQuota
{
	[BepInPlugin("Creleb.LowQuota", "Low Quota", "1.0.0")]
	public class LowQuota : BaseUnityPlugin
	{
		private const string modGUID = "Creleb.LowQuota";

		private const string modName = "Low Quota";

		private const string modVersion = "1.0.0";

		private readonly Harmony harmony = new Harmony("Creleb.LowQuota");

		private static LowQuota Instance;

		internal ManualLogSource mls;

		private void Awake()
		{
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
			mls = Logger.CreateLogSource("Creleb.LowQuota");
			mls.LogInfo((object)"LowQuota has successfuly loaded.");
			harmony.PatchAll(typeof(LowQuota));
			harmony.PatchAll(typeof(TimeOfDayPatch));
		}
	}
}
namespace LowQuota.Patches
{
	[HarmonyPatch(typeof(TimeOfDay))]
	internal class TimeOfDayPatch
	{
		[HarmonyPatch("Awake")]
		[HarmonyPostfix]
		private static void AwakePatch(ref TimeOfDay __instance)
		{
			__instance.quotaVariables.startingQuota = 1;
			__instance.quotaVariables.baseIncrease = 0f;
		}
	}
}