Decompiled source of QuotaRemaster v1.0.1

QuotaRemaster.dll

Decompiled 9 hours 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 QuotaRemaster.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("QuotaRemaster")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("QuotaRemaster")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("16ad82b4-5f6b-4f56-a2ed-cb7a4da7d7ea")]
[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 QuotaRemaster
{
	[BepInPlugin("fr.jerem2206.QuotaRemaster", "Quota Remaster", "1.0.0")]
	public class QuotaRemaster : BaseUnityPlugin
	{
		private const string ModGUID = "fr.jerem2206.QuotaRemaster";

		private const string ModName = "Quota Remaster";

		private const string ModVersion = "1.0.0";

		private readonly Harmony harmony = new Harmony("fr.jerem2206.QuotaRemaster");

		private static QuotaRemaster Instance;

		internal ManualLogSource mls;

		private void Awake()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Expected O, but got Unknown
			if ((Object)Instance == (Object)null)
			{
				Instance = this;
			}
			mls = ((BaseUnityPlugin)this).Logger;
			mls.LogInfo((object)"Quota Remaster v1.0.0 loaded!");
			harmony.PatchAll(typeof(QuotaRemaster));
			harmony.PatchAll(typeof(TimeOfDayPatch));
		}
	}
}
namespace QuotaRemaster.Patches
{
	[HarmonyPatch(typeof(TimeOfDay))]
	internal class TimeOfDayPatch
	{
		[HarmonyPatch("Awake")]
		[HarmonyPostfix]
		private static void AwakePatch(ref TimeOfDay __instance)
		{
			__instance.quotaVariables.startingQuota = 100;
			__instance.quotaVariables.baseIncrease = 96f;
			__instance.quotaVariables.increaseSteepness = -6f;
		}
	}
}