Decompiled source of NoQuota v1.0.1

NoQuotaMod.dll

Decompiled 7 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;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("NoQuotaMod")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("NoQuotaMod")]
[assembly: AssemblyCopyright("Copyright ©  2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("75e77fb0-2723-4c47-b2f8-6fe0cf1a6190")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace NoQuotaMod
{
	[BepInPlugin("alexthedragon.noquotamod", "NoQuota", "1.0.0")]
	public class Plugin : BaseUnityPlugin
	{
		private const string modGUID = "alexthedragon.noquotamod";

		private const string modName = "NoQuota";

		private const string modVersion = "1.0.0";

		private readonly Harmony harmony = new Harmony("alexthedragon.noquotamod");

		public static ManualLogSource logger;

		private void Awake()
		{
			logger = ((BaseUnityPlugin)this).Logger;
			harmony.PatchAll();
			((BaseUnityPlugin)this).Logger.LogInfo((object)"NoQuota loaded correctly!");
		}
	}
}
namespace NoQuotaMod.Patches
{
	[HarmonyPatch(typeof(StartOfRound))]
	public class StartOfRoundPatch
	{
		[HarmonyPatch("PassTimeToNextDay")]
		[HarmonyPostfix]
		public static void NotFired()
		{
			if (TimeOfDay.Instance.timeUntilDeadline <= 0f && TimeOfDay.Instance.profitQuota - TimeOfDay.Instance.quotaFulfilled >= 0)
			{
				TimeOfDay.Instance.quotaFulfilled = TimeOfDay.Instance.profitQuota;
			}
		}
	}
}