Decompiled source of LethalCompTime v1.1.1

LethalCompTime.dll

Decompiled a month ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using HarmonyLib;
using LethalCompTime.Configs;
using LethalCompTime.Patches;
using LethalConfig;
using LethalConfig.ConfigItems;
using LethalConfig.ConfigItems.Options;
using Microsoft.CodeAnalysis;
using Unity.Netcode;
using UnityEngine;
using UnityEngine.UI;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("LethalCompTime")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("Allows for more controlled quota rollover. For if Quota Rollover starts feeling too easy.")]
[assembly: AssemblyFileVersion("1.1.1.0")]
[assembly: AssemblyInformationalVersion("1.1.1+dfe0f19fbf83a8ee20737204bd6116e328bb8070")]
[assembly: AssemblyProduct("LethalCompTime")]
[assembly: AssemblyTitle("LethalCompTime")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.1.1.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace LethalCompTime
{
	[BepInPlugin("com.github.cdusold.LethalCompTime", "LethalCompTime", "1.1.1")]
	public class Plugin : BaseUnityPlugin
	{
		private readonly Harmony harmony = new Harmony("cdusold.LethalCompTime");

		private static Plugin Instance;

		public static ManualLogSource logger;

		public static int currentOverfulfillment;

		private void Awake()
		{
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
			logger = ((BaseUnityPlugin)this).Logger;
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Mod cdusold.LethalCompTime is loaded!");
			ConfigManager.Init(((BaseUnityPlugin)this).Config);
			if (Chainloader.PluginInfos.ContainsKey("ainavt.lc.lethalconfig"))
			{
				LethalConfigManager.Init();
			}
			if ((float)ConfigManager.RolloverFraction.Value != 0f)
			{
				((BaseUnityPlugin)this).Logger.LogInfo((object)$"Rollover percentage set to {ConfigManager.RolloverFraction.Value}");
			}
			if ((float)ConfigManager.RolloverThreshold.Value != 0f)
			{
				((BaseUnityPlugin)this).Logger.LogInfo((object)$"Rollover max percentage set to {ConfigManager.RolloverThreshold.Value}");
			}
			if ((float)ConfigManager.RolloverPenalty.Value != 0f)
			{
				((BaseUnityPlugin)this).Logger.LogInfo((object)$"Rollover max percentage set to {ConfigManager.RolloverPenalty.Value}");
			}
			harmony.PatchAll(typeof(Plugin));
			harmony.PatchAll(typeof(TimeOfDayPatch));
		}
	}
	public static class PluginInfo
	{
		public const string PLUGIN_GUID = "LethalCompTime";

		public const string PLUGIN_NAME = "LethalCompTime";

		public const string PLUGIN_VERSION = "1.1.1";
	}
}
namespace LethalCompTime.Patches
{
	[HarmonyPatch(typeof(TimeOfDay))]
	internal class TimeOfDayPatch
	{
		public static int CalculateQuotaRollover(int quotaFulfilled, int profitQuota)
		{
			int num = quotaFulfilled;
			Plugin.logger.LogInfo((object)$"Calc: {quotaFulfilled}/{profitQuota}");
			int value = ConfigManager.RolloverThreshold.Value;
			int value2 = ConfigManager.RolloverPenalty.Value;
			int value3 = ConfigManager.RolloverFraction.Value;
			Plugin.logger.LogInfo((object)$"Thresh: {value} penalty: {value2} fraction: {value3}");
			bool flag = ConfigManager.PenaltyUsed.Value == ConfigManager.PenaltyType.Logarithmic;
			if (flag)
			{
				num *= value3;
				num /= 100;
			}
			if (value > 0 && value2 != 100 && num > value * profitQuota / 100)
			{
				int num5;
				if (flag)
				{
					double num2 = 100.0 / (double)value2;
					double num3 = (double)(value * profitQuota) / 100.0;
					double num4 = num3 - (double)num * (1.0 - num2);
					Plugin.logger.LogInfo((object)$"Math.Log({num4}/{num3}, {num2})");
					num5 = (int)Math.Log(num4 / num3, num2);
				}
				else
				{
					num5 = 100 * num / (value * profitQuota);
				}
				Plugin.logger.LogInfo((object)$"Calc: #{num5}");
				float num6 = (float)Math.Pow((float)value2 / 100f, (float)num5);
				Plugin.logger.LogInfo((object)$"Calc: %{num6}");
				int num7 = ((!flag) ? (num - num5 * value * profitQuota / 100) : (num - (int)((double)((float)(value * profitQuota) * (1f - 1f / num6)) / (1.0 - 100.0 / (double)value2)) / 100));
				Plugin.logger.LogInfo((object)$"Calc: r{num7}");
				num = ((!flag) ? ((int)(num6 * (float)num7 + (float)profitQuota * (1f - num6) / (1f - (float)value2 / 100f))) : ((int)(num6 * (float)num7 + (float)(value * profitQuota * num5 / 100))));
				Plugin.logger.LogInfo((object)$"Calc: v{num}");
			}
			if (flag)
			{
				return num;
			}
			return num * value3 / 100;
		}

		[HarmonyPatch("SetNewProfitQuota")]
		[HarmonyPrefix]
		[HarmonyAfter(new string[] { })]
		private static bool GetQuotaFulfilledHost(ref int ___quotaFulfilled, ref int ___profitQuota, ref int ___timesFulfilledQuota, ref QuotaSettings ___quotaVariables, ref float ___timeUntilDeadline, ref float ___totalTime, ref int ___daysUntilDeadline)
		{
			Plugin.logger.LogInfo((object)$"days: {TimeOfDay.Instance.daysUntilDeadline} time: {TimeOfDay.Instance.timeUntilDeadline} ID: {StartOfRound.Instance.currentLevelID}");
			Plugin.currentOverfulfillment = 0;
			if (TimeOfDay.Instance.daysUntilDeadline < 0)
			{
				Plugin.currentOverfulfillment = ___quotaFulfilled - ___profitQuota;
				Plugin.logger.LogInfo((object)$"Host: Required {___profitQuota}");
				Plugin.logger.LogInfo((object)$"Host: Got {___quotaFulfilled}");
				if (ConfigManager.OvertimeOverride.Value)
				{
					if (((NetworkBehaviour)TimeOfDay.Instance).IsServer)
					{
						___timesFulfilledQuota++;
						int num = ___quotaFulfilled - ___profitQuota;
						float num2 = Mathf.Clamp(1f + (float)___timesFulfilledQuota * ((float)___timesFulfilledQuota / ___quotaVariables.increaseSteepness), 0f, 10000f);
						num2 = ___quotaVariables.baseIncrease * num2 * (___quotaVariables.randomizerCurve.Evaluate(Random.Range(0f, 1f)) * ___quotaVariables.randomizerMultiplier + 1f);
						___profitQuota = (int)Mathf.Clamp((float)___profitQuota + num2, 0f, 1E+09f);
						___quotaFulfilled = CalculateQuotaRollover(Plugin.currentOverfulfillment, ___profitQuota);
						num -= Math.Min(___quotaFulfilled, num);
						___timeUntilDeadline = ___totalTime * 4f;
						int num3 = num / 5 + 15 * ___daysUntilDeadline;
						TimeOfDay.Instance.SyncNewProfitQuotaClientRpc(___profitQuota, num3, ___timesFulfilledQuota);
					}
					return false;
				}
				return true;
			}
			return false;
		}

		[HarmonyPatch("SetNewProfitQuota")]
		[HarmonyPostfix]
		[HarmonyBefore(new string[] { })]
		private static void SetQuotaFulfilledHost(ref int ___quotaFulfilled, ref int ___profitQuota)
		{
			if (ConfigManager.RolloverFraction.Value > 0 && Plugin.currentOverfulfillment > 0 && TimeOfDay.Instance.daysUntilDeadline < 0)
			{
				___quotaFulfilled = CalculateQuotaRollover(Plugin.currentOverfulfillment, ___profitQuota);
			}
			Plugin.logger.LogInfo((object)$"Host: New quota completion at: {___quotaFulfilled}");
		}

		[HarmonyPatch("SyncNewProfitQuotaClientRpc")]
		[HarmonyPrefix]
		private static void GetNewQuotaFulfilledClient(ref int ___quotaFulfilled, ref int ___profitQuota)
		{
			if (Plugin.currentOverfulfillment == 0)
			{
				Plugin.currentOverfulfillment = ___quotaFulfilled - ___profitQuota;
			}
			Plugin.logger.LogInfo((object)$"Client: Required {___profitQuota}");
			Plugin.logger.LogInfo((object)$"Client: Got {___quotaFulfilled}");
		}

		[HarmonyPatch("SyncNewProfitQuotaClientRpc")]
		[HarmonyPostfix]
		private static void SetNewQuotaFulfiledClient(ref int ___quotaFulfilled, ref int ___profitQuota)
		{
			if (___quotaFulfilled == 0 && ConfigManager.RolloverFraction.Value > 0 && Plugin.currentOverfulfillment > 0 && TimeOfDay.Instance.daysUntilDeadline < 0)
			{
				___quotaFulfilled = CalculateQuotaRollover(Plugin.currentOverfulfillment, ___profitQuota);
				Plugin.logger.LogInfo((object)$"Client: New quota completion at: {Plugin.currentOverfulfillment}");
			}
			Plugin.currentOverfulfillment = 0;
		}

		[HarmonyPatch("UpdateProfitQuotaCurrentTime")]
		[HarmonyPostfix]
		public static void SetUpdateProfitQuotaCurrentTime(ref int ___quotaFulfilled, ref int ___profitQuota)
		{
			//IL_01f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0204: Unknown result type (might be due to invalid IL or missing references)
			//IL_0217: Unknown result type (might be due to invalid IL or missing references)
			//IL_0228: Unknown result type (might be due to invalid IL or missing references)
			try
			{
				if (StartOfRound.Instance.isChallengeFile || ConfigManager.ScreenColoration.Value == ConfigManager.ColorOptions.None)
				{
					return;
				}
				Color color = default(Color);
				if (ConfigManager.ScreenColoration.Value == ConfigManager.ColorOptions.Text)
				{
					if (___quotaFulfilled < ___profitQuota)
					{
						ColorUtility.TryParseHtmlString(ConfigManager.ColorUnderFulfilled.Value, ref color);
					}
					else if (ConfigManager.RolloverFraction.Value <= 0 || ConfigManager.RolloverPenalty.Value <= 0 || (float)___quotaFulfilled < (float)___profitQuota * ((float)ConfigManager.RolloverThreshold.Value / 100f + 1f))
					{
						ColorUtility.TryParseHtmlString(ConfigManager.ColorFulfilled.Value, ref color);
					}
					else
					{
						ColorUtility.TryParseHtmlString(ConfigManager.ColorOverFulfilled.Value, ref color);
					}
				}
				else
				{
					Color color2 = default(Color);
					if (___quotaFulfilled == 0)
					{
						((Color)(ref color2))..ctor(0f, 0f, 0f, 1f);
						((Color)(ref color))..ctor(0f, 1f, 0f, 1f);
					}
					else if (___quotaFulfilled < ___profitQuota)
					{
						ColorUtility.TryParseHtmlString(ConfigManager.ColorUnderFulfilled.Value, ref color2);
						ColorUtility.TryParseHtmlString(ConfigManager.TextColorOverrideUnderFulfilled.Value, ref color);
					}
					else if (ConfigManager.RolloverFraction.Value <= 0 || ConfigManager.RolloverPenalty.Value <= 0 || (float)___quotaFulfilled < (float)___profitQuota * ((float)ConfigManager.RolloverThreshold.Value / 100f + 1f))
					{
						ColorUtility.TryParseHtmlString(ConfigManager.ColorFulfilled.Value, ref color2);
						ColorUtility.TryParseHtmlString(ConfigManager.TextColorOverrideFulfilled.Value, ref color);
					}
					else
					{
						ColorUtility.TryParseHtmlString(ConfigManager.ColorOverFulfilled.Value, ref color2);
						ColorUtility.TryParseHtmlString(ConfigManager.TextColorOverrideOverFulfilled.Value, ref color);
					}
					((Graphic)StartOfRound.Instance.deadlineMonitorBGImage).color = color2;
					((Graphic)StartOfRound.Instance.profitQuotaMonitorBGImage).color = color2;
				}
				((Graphic)StartOfRound.Instance.profitQuotaMonitorText).color = color;
				((Graphic)StartOfRound.Instance.deadlineMonitorText).color = color;
			}
			catch (Exception ex)
			{
				Plugin.logger.LogError((object)"Error in monitor update");
				Plugin.logger.LogError((object)ex.ToString());
			}
		}
	}
}
namespace LethalCompTime.Configs
{
	internal class ConfigManager
	{
		public enum PenaltyType
		{
			Asymptotic,
			Logarithmic
		}

		public enum ColorOptions
		{
			None,
			Text,
			Screen
		}

		public static ConfigManager Instance { get; private set; }

		public static ConfigEntry<int> RolloverFraction { get; private set; }

		public static ConfigEntry<int> RolloverThreshold { get; private set; }

		public static ConfigEntry<int> RolloverPenalty { get; private set; }

		public static ConfigEntry<PenaltyType> PenaltyUsed { get; private set; }

		public static ConfigEntry<bool> OvertimeOverride { get; private set; }

		public static ConfigEntry<ColorOptions> ScreenColoration { get; private set; }

		public static ConfigEntry<string> ColorOverFulfilled { get; private set; }

		public static ConfigEntry<string> ColorFulfilled { get; private set; }

		public static ConfigEntry<string> ColorUnderFulfilled { get; private set; }

		public static ConfigEntry<string> TextColorOverrideOverFulfilled { get; private set; }

		public static ConfigEntry<string> TextColorOverrideFulfilled { get; private set; }

		public static ConfigEntry<string> TextColorOverrideUnderFulfilled { get; private set; }

		public static void Init(ConfigFile config)
		{
			if (Instance == null)
			{
				Instance = new ConfigManager(config);
			}
		}

		private ConfigManager(ConfigFile config)
		{
			RolloverFraction = config.Bind<int>("General", "RolloverBasePercent", 50, "The starting percentage of your excess quota that automatically carries over to the next cycle.");
			RolloverThreshold = config.Bind<int>("General", "RolloverPenaltyThreshold", 100, "The point at which diminishing returns take effect for rollover amounts. Each multiple of the threshold exceeded reduces the rollover of the surplus over that threshold.");
			RolloverPenalty = config.Bind<int>("General", "RolloverPenaltyPercent", 50, "The percentage deduction applied to your rollover amount for each threshold exceeded. This creates a gradual decline in rollover benefits for larger surpluses.");
			PenaltyUsed = config.Bind<PenaltyType>("General", "RolloverPenaltyType", PenaltyType.Asymptotic, "Whether to use asymptotic or logarithmic rollover scaling.");
			OvertimeOverride = config.Bind<bool>("General", "RolloverOvertimeOverride", true, "Set this to false to allow full overtime bonus even with rollover. (Not Recommended.)");
			ScreenColoration = config.Bind<ColorOptions>("Visual", "RolloverScreenColoration", ColorOptions.None, "If and how to display quota status colors. None, Text (only), Screen (background).");
			ColorUnderFulfilled = config.Bind<string>("Visual", "RolloverColorUnderFulfilled", "red", "The indication color for if the quota isn't met yet.");
			ColorFulfilled = config.Bind<string>("Visual", "RolloverColorFulfilled", "green", "The indication color for if the quota has been met.");
			ColorOverFulfilled = config.Bind<string>("Visual", "RolloverColorOverFulfilled", "yellow", "The indication color for if a penalty will be applied to the rollover.");
			TextColorOverrideUnderFulfilled = config.Bind<string>("Visual", "RolloverTextColorOverrideUnderFulfilled", "#000000", "The text color in Scene mode for when the quota isn't met yet.");
			TextColorOverrideFulfilled = config.Bind<string>("Visual", "RolloverTextColorOverrideFulfilled", "#000000", "The text color in Scene mode for when the quota has been met.");
			TextColorOverrideOverFulfilled = config.Bind<string>("Visual", "RolloverTextColorOverrideOverFulfilled", "#000000", "The text color in Scene mode for when a penalty will be applied to the rollover.");
		}
	}
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	internal class LethalConfigManager
	{
		[Serializable]
		[CompilerGenerated]
		private sealed class <>c
		{
			public static readonly <>c <>9 = new <>c();

			public static GenericButtonHandler <>9__5_0;

			public static GenericButtonHandler <>9__5_1;

			public static GenericButtonHandler <>9__5_2;

			public static GenericButtonHandler <>9__5_3;

			public static GenericButtonHandler <>9__5_4;

			public static GenericButtonHandler <>9__5_5;

			public static GenericButtonHandler <>9__5_6;

			internal void <.ctor>b__5_0()
			{
				ConfigManager.OvertimeOverride.Value = false;
				ConfigManager.PenaltyUsed.Value = ConfigManager.PenaltyType.Asymptotic;
				ConfigManager.RolloverFraction.Value = 100;
				ConfigManager.RolloverThreshold.Value = 100;
				ConfigManager.RolloverPenalty.Value = 100;
			}

			internal void <.ctor>b__5_1()
			{
				ConfigManager.OvertimeOverride.Value = true;
				ConfigManager.PenaltyUsed.Value = ConfigManager.PenaltyType.Asymptotic;
				ConfigManager.RolloverFraction.Value = 100;
				ConfigManager.RolloverThreshold.Value = 100;
				ConfigManager.RolloverPenalty.Value = 100;
			}

			internal void <.ctor>b__5_2()
			{
				ConfigManager.OvertimeOverride.Value = true;
				ConfigManager.PenaltyUsed.Value = ConfigManager.PenaltyType.Logarithmic;
				ConfigManager.RolloverFraction.Value = 100;
				ConfigManager.RolloverThreshold.Value = 50;
				ConfigManager.RolloverPenalty.Value = 75;
			}

			internal void <.ctor>b__5_3()
			{
				ConfigManager.OvertimeOverride.Value = true;
				ConfigManager.PenaltyUsed.Value = ConfigManager.PenaltyType.Asymptotic;
				ConfigManager.RolloverFraction.Value = 100;
				ConfigManager.RolloverThreshold.Value = 100;
				ConfigManager.RolloverPenalty.Value = 0;
			}

			internal void <.ctor>b__5_4()
			{
				ConfigManager.OvertimeOverride.Value = true;
				ConfigManager.PenaltyUsed.Value = ConfigManager.PenaltyType.Asymptotic;
				ConfigManager.RolloverFraction.Value = 100;
				ConfigManager.RolloverThreshold.Value = 50;
				ConfigManager.RolloverPenalty.Value = 50;
			}

			internal void <.ctor>b__5_5()
			{
				ConfigManager.OvertimeOverride.Value = true;
				ConfigManager.PenaltyUsed.Value = ConfigManager.PenaltyType.Asymptotic;
				ConfigManager.RolloverFraction.Value = 50;
				ConfigManager.RolloverThreshold.Value = 100;
				ConfigManager.RolloverPenalty.Value = 50;
			}

			internal void <.ctor>b__5_6()
			{
				ConfigManager.OvertimeOverride.Value = true;
				ConfigManager.PenaltyUsed.Value = ConfigManager.PenaltyType.Asymptotic;
				ConfigManager.RolloverFraction.Value = 0;
				ConfigManager.RolloverThreshold.Value = 100;
				ConfigManager.RolloverPenalty.Value = 100;
			}
		}

		public static LethalConfigManager Instance { get; private set; }

		public static void Init()
		{
			if (Instance == null)
			{
				Instance = new LethalConfigManager();
			}
		}

		private LethalConfigManager()
		{
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Expected O, but got Unknown
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Expected O, but got Unknown
			//IL_0084: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Expected O, but got Unknown
			//IL_0079: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: Expected O, but got Unknown
			//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cc: Expected O, but got Unknown
			//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c2: Expected O, but got Unknown
			//IL_0100: Unknown result type (might be due to invalid IL or missing references)
			//IL_010a: Expected O, but got Unknown
			//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0100: Expected O, but got Unknown
			//IL_013e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0148: Expected O, but got Unknown
			//IL_0133: Unknown result type (might be due to invalid IL or missing references)
			//IL_0138: Unknown result type (might be due to invalid IL or missing references)
			//IL_013e: Expected O, but got Unknown
			//IL_017c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0186: Expected O, but got Unknown
			//IL_0171: Unknown result type (might be due to invalid IL or missing references)
			//IL_0176: Unknown result type (might be due to invalid IL or missing references)
			//IL_017c: Expected O, but got Unknown
			//IL_01ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c4: Expected O, but got Unknown
			//IL_01cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d5: Expected O, but got Unknown
			//IL_01dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e6: Expected O, but got Unknown
			//IL_01ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f7: Expected O, but got Unknown
			//IL_020f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0219: Expected O, but got Unknown
			//IL_0231: Unknown result type (might be due to invalid IL or missing references)
			//IL_023b: Expected O, but got Unknown
			//IL_0242: Unknown result type (might be due to invalid IL or missing references)
			//IL_024c: Expected O, but got Unknown
			//IL_0253: Unknown result type (might be due to invalid IL or missing references)
			//IL_025d: Expected O, but got Unknown
			//IL_0264: Unknown result type (might be due to invalid IL or missing references)
			//IL_026e: Expected O, but got Unknown
			//IL_0275: Unknown result type (might be due to invalid IL or missing references)
			//IL_027f: Expected O, but got Unknown
			//IL_0286: Unknown result type (might be due to invalid IL or missing references)
			//IL_0290: Expected O, but got Unknown
			//IL_01af: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ba: Expected O, but got Unknown
			LethalConfigManager.SetModDescription("Allows for more controlled quota rollover. For if Quota Rollover starts feeling too easy.");
			object obj = <>c.<>9__5_0;
			if (obj == null)
			{
				GenericButtonHandler val = delegate
				{
					ConfigManager.OvertimeOverride.Value = false;
					ConfigManager.PenaltyUsed.Value = ConfigManager.PenaltyType.Asymptotic;
					ConfigManager.RolloverFraction.Value = 100;
					ConfigManager.RolloverThreshold.Value = 100;
					ConfigManager.RolloverPenalty.Value = 100;
				};
				<>c.<>9__5_0 = val;
				obj = (object)val;
			}
			LethalConfigManager.AddConfigItem((BaseConfigItem)new GenericButtonConfigItem("Quick Settings", "ClassicQR", "Sets rollover to be fully held at week end and still give overtime bonus as well.", "Classic Quota Rollover (Easiest)", (GenericButtonHandler)obj));
			object obj2 = <>c.<>9__5_1;
			if (obj2 == null)
			{
				GenericButtonHandler val2 = delegate
				{
					ConfigManager.OvertimeOverride.Value = true;
					ConfigManager.PenaltyUsed.Value = ConfigManager.PenaltyType.Asymptotic;
					ConfigManager.RolloverFraction.Value = 100;
					ConfigManager.RolloverThreshold.Value = 100;
					ConfigManager.RolloverPenalty.Value = 100;
				};
				<>c.<>9__5_1 = val2;
				obj2 = (object)val2;
			}
			LethalConfigManager.AddConfigItem((BaseConfigItem)new GenericButtonConfigItem("Quick Settings", "QRBalanced", "Sets rollover to be fully held at week end but doesn't double dip with the overtime bonus.", "Balanced Quota Rollover (Easy)", (GenericButtonHandler)obj2));
			object obj3 = <>c.<>9__5_2;
			if (obj3 == null)
			{
				GenericButtonHandler val3 = delegate
				{
					ConfigManager.OvertimeOverride.Value = true;
					ConfigManager.PenaltyUsed.Value = ConfigManager.PenaltyType.Logarithmic;
					ConfigManager.RolloverFraction.Value = 100;
					ConfigManager.RolloverThreshold.Value = 50;
					ConfigManager.RolloverPenalty.Value = 75;
				};
				<>c.<>9__5_2 = val3;
				obj3 = (object)val3;
			}
			LethalConfigManager.AddConfigItem((BaseConfigItem)new GenericButtonConfigItem("Quick Settings", "ScaledDown", "Gradually reduces rollover out the more you turn in.", "Significant Rollover (Easy)", (GenericButtonHandler)obj3));
			object obj4 = <>c.<>9__5_3;
			if (obj4 == null)
			{
				GenericButtonHandler val4 = delegate
				{
					ConfigManager.OvertimeOverride.Value = true;
					ConfigManager.PenaltyUsed.Value = ConfigManager.PenaltyType.Asymptotic;
					ConfigManager.RolloverFraction.Value = 100;
					ConfigManager.RolloverThreshold.Value = 100;
					ConfigManager.RolloverPenalty.Value = 0;
				};
				<>c.<>9__5_3 = val4;
				obj4 = (object)val4;
			}
			LethalConfigManager.AddConfigItem((BaseConfigItem)new GenericButtonConfigItem("Quick Settings", "HardCapped", "You can rollover exactly one quota's worth. No more.", "Hard Capped (Easy)", (GenericButtonHandler)obj4));
			object obj5 = <>c.<>9__5_4;
			if (obj5 == null)
			{
				GenericButtonHandler val5 = delegate
				{
					ConfigManager.OvertimeOverride.Value = true;
					ConfigManager.PenaltyUsed.Value = ConfigManager.PenaltyType.Asymptotic;
					ConfigManager.RolloverFraction.Value = 100;
					ConfigManager.RolloverThreshold.Value = 50;
					ConfigManager.RolloverPenalty.Value = 50;
				};
				<>c.<>9__5_4 = val5;
				obj5 = (object)val5;
			}
			LethalConfigManager.AddConfigItem((BaseConfigItem)new GenericButtonConfigItem("Quick Settings", "Recommended", "The more you turn in, the closer you'll get to the next quota, but you shouldn't be able to reach it.", "Recommended (Medium)", (GenericButtonHandler)obj5));
			object obj6 = <>c.<>9__5_5;
			if (obj6 == null)
			{
				GenericButtonHandler val6 = delegate
				{
					ConfigManager.OvertimeOverride.Value = true;
					ConfigManager.PenaltyUsed.Value = ConfigManager.PenaltyType.Asymptotic;
					ConfigManager.RolloverFraction.Value = 50;
					ConfigManager.RolloverThreshold.Value = 100;
					ConfigManager.RolloverPenalty.Value = 50;
				};
				<>c.<>9__5_5 = val6;
				obj6 = (object)val6;
			}
			LethalConfigManager.AddConfigItem((BaseConfigItem)new GenericButtonConfigItem("Quick Settings", "CompanyIssue", "Rollover starts at 50% and decreases from there so that you can never reach a full quota.", "Company Issued Rollover (Hard)", (GenericButtonHandler)obj6));
			object obj7 = <>c.<>9__5_6;
			if (obj7 == null)
			{
				GenericButtonHandler val7 = delegate
				{
					ConfigManager.OvertimeOverride.Value = true;
					ConfigManager.PenaltyUsed.Value = ConfigManager.PenaltyType.Asymptotic;
					ConfigManager.RolloverFraction.Value = 0;
					ConfigManager.RolloverThreshold.Value = 100;
					ConfigManager.RolloverPenalty.Value = 100;
				};
				<>c.<>9__5_6 = val7;
				obj7 = (object)val7;
			}
			LethalConfigManager.AddConfigItem((BaseConfigItem)new GenericButtonConfigItem("Quick Settings", "Vanilla", "No rollover is given. Only overtime bonus. Just like the base game.", "No Rollover (Hardest)", (GenericButtonHandler)obj7));
			LethalConfigManager.AddConfigItem((BaseConfigItem)new IntSliderConfigItem(ConfigManager.RolloverFraction, false));
			LethalConfigManager.AddConfigItem((BaseConfigItem)new IntSliderConfigItem(ConfigManager.RolloverThreshold, false));
			LethalConfigManager.AddConfigItem((BaseConfigItem)new IntSliderConfigItem(ConfigManager.RolloverPenalty, false));
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)new EnumDropDownConfigItem<ConfigManager.PenaltyType>(ConfigManager.PenaltyUsed, false));
			LethalConfigManager.AddConfigItem((BaseConfigItem)new BoolCheckBoxConfigItem(ConfigManager.OvertimeOverride, false));
			LethalConfigManager.AddConfigItem((BaseConfigItem)(object)new EnumDropDownConfigItem<ConfigManager.ColorOptions>(ConfigManager.ScreenColoration, false));
			LethalConfigManager.AddConfigItem((BaseConfigItem)new TextInputFieldConfigItem(ConfigManager.ColorUnderFulfilled, false));
			LethalConfigManager.AddConfigItem((BaseConfigItem)new TextInputFieldConfigItem(ConfigManager.ColorFulfilled, false));
			LethalConfigManager.AddConfigItem((BaseConfigItem)new TextInputFieldConfigItem(ConfigManager.ColorOverFulfilled, false));
			LethalConfigManager.AddConfigItem((BaseConfigItem)new TextInputFieldConfigItem(ConfigManager.TextColorOverrideUnderFulfilled, false));
			LethalConfigManager.AddConfigItem((BaseConfigItem)new TextInputFieldConfigItem(ConfigManager.TextColorOverrideFulfilled, false));
			LethalConfigManager.AddConfigItem((BaseConfigItem)new TextInputFieldConfigItem(ConfigManager.TextColorOverrideOverFulfilled, false));
		}
	}
}