Decompiled source of No Deadline v1.0.0

BepInEx/plugins/NoDeadlineMod.dll

Decompiled 11 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using HarmonyLib;
using TMPro;
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("LethalCompany_NoDeadlineMpd")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("LethalCompany_NoDeadlineMpd")]
[assembly: AssemblyCopyright("Copyright ©  2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("334c7ba9-2ce8-4ed7-8549-589a994c3d00")]
[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 NoDeadline;

[BepInPlugin("NoDeadline", "NoDeadline", "1.0.0")]
public class NoDeadlineMod : BaseUnityPlugin
{
	private const string modGUID = "NoDeadline";

	private const string modName = "NoDeadline";

	private const string modVersion = "1.0.0";

	private readonly Harmony harmony = new Harmony("NoDeadline");

	private static NoDeadlineMod instance;

	private void Awake()
	{
		if ((Object)(object)instance == (Object)null)
		{
			instance = this;
		}
		harmony.PatchAll();
		((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin No Deadline loaded!");
	}
}
[HarmonyPatch(typeof(TimeOfDay), "UpdateProfitQuotaCurrentTime")]
public class InfiniteDeadline
{
	[HarmonyPostfix]
	public static void SetInfiniteDeadline()
	{
		TimeOfDay.Instance.timeUntilDeadline = (int)(TimeOfDay.Instance.totalTime * (float)TimeOfDay.Instance.quotaVariables.deadlineDaysAmount);
		((TMP_Text)StartOfRound.Instance.deadlineMonitorText).text = "DEADLINE:\n NONE";
	}
}
[HarmonyPatch(typeof(TimeOfDay), "SetBuyingRateForDay")]
public class BuyingRate
{
	[HarmonyPostfix]
	public static void SetBuyingRate()
	{
		StartOfRound.Instance.companyBuyingRate = 1f;
	}
}
[HarmonyPatch(typeof(HUDManager), "DisplayDaysLeft")]
public class DisplayInfiniteLeft
{
	[HarmonyPostfix]
	public static void SetDisplayInfiniteLeft()
	{
		((TMP_Text)HUDManager.Instance.profitQuotaDaysLeftText).text = "Infinite Days Left";
		((TMP_Text)HUDManager.Instance.profitQuotaDaysLeftText2).text = "Infinite Days Left";
	}
}