Decompiled source of NoQuotaMod v1.0.0

LethalCompanyEndlessMod.dll

Decompiled 9 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 GameNetcodeStuff;
using HarmonyLib;
using LethalCompanyEndlessMod.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("LethalCompanyEndlessMod")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("LethalCompanyEndlessMod")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("c668da75-f7a1-41d2-8f6e-0800e3176848")]
[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 LethalCompanyEndlessMod
{
	[BepInPlugin("ZeroQuotaJimmeeX.LCTMod", "Zero Quota Mod", "1.0.0.0")]
	public class ZeroQuotaModBase : BaseUnityPlugin
	{
		private const string modGUID = "ZeroQuotaJimmeeX.LCTMod";

		private const string modName = "Zero Quota Mod";

		private const string modVersion = "1.0.0.0";

		private readonly Harmony harmony = new Harmony("ZeroQuotaJimmeeX.LCTMod");

		private static ZeroQuotaModBase Instance;

		internal ManualLogSource mls;

		private void Awake()
		{
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
			mls = Logger.CreateLogSource("ZeroQuotaJimmeeX.LCTMod");
			mls.LogInfo((object)"Installing ZeroQuotaMod! :)");
			harmony.PatchAll(typeof(ZeroQuotaModBase));
			harmony.PatchAll(typeof(TimeOfDayPatch));
		}
	}
}
namespace LethalCompanyEndlessMod.Patches
{
	[HarmonyPatch(typeof(PlayerControllerB))]
	internal class PlayerControllerBPatch
	{
		[HarmonyPatch("Update")]
		[HarmonyPostfix]
		private static void infiniteSprintPatch(ref float ___sprintMeter)
		{
			___sprintMeter = 1f;
		}
	}
	[HarmonyPatch(typeof(StartOfRound))]
	internal class StartOfRoundPatch
	{
		internal ManualLogSource mls;

		[HarmonyPatch("StartGame")]
		[HarmonyPostfix]
		private static void startGamePatch(ref TimeOfDay ___timeOfDay)
		{
			ManualLogSource val = Logger.CreateLogSource("ZeroQuotaJimmeeX.LCTMod");
			___timeOfDay.profitQuota = 0;
			___timeOfDay.quotaFulfilled = 0;
		}
	}
	[HarmonyPatch(typeof(TimeOfDay))]
	internal class TimeOfDayPatch
	{
		internal ManualLogSource mls;

		[HarmonyPatch("Update")]
		[HarmonyPostfix]
		private static void zeroQuota(ref int ___profitQuota, ref int ___quotaFulfilled)
		{
			___profitQuota = 0;
			___quotaFulfilled = 0;
		}
	}
}