Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of LethalCompTime v1.4.0
LethalCompTime.dll
Decompiled a month agousing System; using System.ComponentModel; 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.Compat; using LethalCompTime.Configs; using LethalCompTime.Patches; using LethalConfig; using LethalConfig.ConfigItems; using LethalConfig.ConfigItems.Options; using LobbyCompatibility.Enums; using LobbyCompatibility.Features; using Microsoft.CodeAnalysis; 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.4.0.0")] [assembly: AssemblyInformationalVersion("1.4.0+f4bff88e015c79f50ad983de0a788b0a218c8cd5")] [assembly: AssemblyProduct("LethalCompTime")] [assembly: AssemblyTitle("LethalCompTime")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.4.0.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.4.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] public class Plugin : BaseUnityPlugin { private readonly Harmony harmony = new Harmony("cdusold.LethalCompTime"); private static Plugin Instance; public static ManualLogSource logger; public static bool QuotaCompat { get; private set; } 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 (Chainloader.PluginInfos.ContainsKey("BMX.LobbyCompatibility")) { LobbyCompatibilityManager.Init(); } QuotaCompat = Chainloader.PluginInfos.ContainsKey("zeus1000.EasyQuota"); if (ConfigManager.EnableDebug.Value) { 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.4.0"; } } namespace LethalCompTime.Patches { [HarmonyPatch(typeof(TimeOfDay))] internal class TimeOfDayPatch { public static int currentOverfulfillment; public static int rolloverResult; public static int CalculateQuotaRollover(int quotaFulfilled, int profitQuota) { bool value = ConfigManager.EnableDebug.Value; double num = quotaFulfilled; if (value) { Plugin.logger.LogInfo((object)$"Calc: {quotaFulfilled}/{profitQuota}"); } double num2 = (double)ConfigManager.RolloverThreshold.Value / 100.0; double num3 = (double)ConfigManager.RolloverPenalty.Value / 100.0; double num4 = (double)ConfigManager.RolloverFraction.Value / 100.0; if (value) { Plugin.logger.LogInfo((object)$"Thresh: {num2} penalty: {num3} fraction: {num4}"); } bool flag = ConfigManager.PenaltyUsed.Value == ConfigManager.PenaltyType.Logarithmic; if (flag) { num *= num4; } double num5 = num2 * (double)profitQuota; if (num5 > 0.0 && num3 != 1.0 && num > num5) { int num8; if (flag) { double num6 = 1.0 / num3; double num7 = num5 - num * (1.0 - num6); if (value) { Plugin.logger.LogInfo((object)$"Math.Log({num7}/{num5}, {num6})"); } num8 = (int)Math.Floor(Math.Log(num7 / num5, num6)); } else { num8 = (int)Math.Floor(num / num5); } if (value) { Plugin.logger.LogInfo((object)$"Calc: #{num8}"); } double num9 = Math.Pow(num3, num8); if (value) { Plugin.logger.LogInfo((object)$"Calc: %{num9}"); } double num10; if (flag) { num10 = num - num5 * (1.0 - 1.0 / num9) / (1.0 - 1.0 / num3); if (value) { Plugin.logger.LogInfo((object)$"Calc: {num5 * (1.0 - 1.0 / num9) / (1.0 - 1.0 / num3)} < {num} < {num5 * (1.0 - 1.0 / (num9 * num3)) / (1.0 - 1.0 / num3)}"); } } else { num10 = num - (double)num8 * num5; } if (value) { Plugin.logger.LogInfo((object)$"Calc: r{num10}"); } num = num9 * num10; num = ((!flag) ? (num + num5 * (1.0 - num9) / (1.0 - num3)) : (num + num5 * (double)num8)); } if (!flag) { num *= num4; } if (value) { Plugin.logger.LogInfo((object)$"Calc: v{num}"); } return (int)Math.Floor(num); } [MethodImpl(MethodImplOptions.AggressiveInlining)] private static int CalculateOvertimeBonus(int quotaOverfulfilled, int daysUntilDeadline, int timesFulfilledQuota) { int num = (int)((float)quotaOverfulfilled * ConfigManager.OvertimeRatio.Value); num += (int)((float)ConfigManager.OvertimeEarlyBonus.Value * (1f + ConfigManager.OvertimeEarlyScaling.Value * (float)timesFulfilledQuota) * (float)daysUntilDeadline); if (ConfigManager.EnableDebug.Value) { Plugin.logger.LogInfo((object)$"Overtime: q{quotaOverfulfilled} d{daysUntilDeadline} t{timesFulfilledQuota} o{num}"); } return num; } [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}"); currentOverfulfillment = 0; if (TimeOfDay.Instance.daysUntilDeadline <= 0 || (ConfigManager.EarlyFulfillment.Value && TimeOfDay.Instance.daysUntilDeadline <= ConfigManager.QuotaDaysPerCycle.Value - ConfigManager.EarlyFulfillStartDay.Value)) { currentOverfulfillment = ___quotaFulfilled - ___profitQuota; if (ConfigManager.EnableDebug.Value) { Plugin.logger.LogInfo((object)$"Host: Current overfulfillment: {currentOverfulfillment}"); Plugin.logger.LogInfo((object)$"Host: Required {___profitQuota}"); Plugin.logger.LogInfo((object)$"Host: Got {___quotaFulfilled}"); } if (ConfigManager.OvertimeOverride.Value) { ___quotaFulfilled = ___profitQuota; } return true; } return false; } [HarmonyPatch("SyncNewProfitQuotaClientRpc")] [HarmonyPrefix] private static void GetNewQuotaFulfilledClient(ref int ___quotaFulfilled, ref int ___profitQuota, ref int newProfitQuota, ref int overtimeBonus) { bool value = ConfigManager.EnableDebug.Value; if (value) { Plugin.logger.LogInfo((object)$"ClientRpc: Next quota {newProfitQuota}"); } if (currentOverfulfillment == 0) { currentOverfulfillment = ___quotaFulfilled - ___profitQuota; if (value) { Plugin.logger.LogInfo((object)$"ClientRpc: Required {___profitQuota}"); Plugin.logger.LogInfo((object)$"ClientRpc: Got {___quotaFulfilled}"); } } rolloverResult = CalculateQuotaRollover(currentOverfulfillment, newProfitQuota); if (ConfigManager.OvertimeOverride.Value) { overtimeBonus = CalculateOvertimeBonus(currentOverfulfillment - rolloverResult, TimeOfDay.Instance.daysUntilDeadline, TimeOfDay.Instance.timesFulfilledQuota); } else { overtimeBonus = CalculateOvertimeBonus(currentOverfulfillment, TimeOfDay.Instance.daysUntilDeadline, TimeOfDay.Instance.timesFulfilledQuota); } if (value) { Plugin.logger.LogInfo((object)$"ClientRpc: Overtime bonus {overtimeBonus}"); } } [HarmonyPatch("SyncNewProfitQuotaClientRpc")] [HarmonyPostfix] private static void SetNewQuotaFulfiledClient(ref int ___quotaFulfilled, ref int ___profitQuota) { if (___quotaFulfilled == 0 && ConfigManager.RolloverFraction.Value > 0 && currentOverfulfillment > 0) { ___quotaFulfilled = rolloverResult; Plugin.logger.LogInfo((object)$"New quota completion at: {___quotaFulfilled}"); } 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()); } } [HarmonyPatch("Awake")] [HarmonyPostfix] private static void SetQuotaVariables(ref QuotaSettings ___quotaVariables) { if (ConfigManager.ConfigQuota.Value) { if (ConfigManager.EnableDebug.Value) { Plugin.logger.LogInfo((object)"Quota variables:"); Plugin.logger.LogInfo((object)$"daysPerQuota: {ConfigManager.QuotaDaysPerCycle.Value}"); Plugin.logger.LogInfo((object)$"earlyFulfillStartDay: {ConfigManager.EarlyFulfillStartDay.Value}"); Plugin.logger.LogInfo((object)$"startingQuota: {ConfigManager.QuotaStartingQuota.Value}"); Plugin.logger.LogInfo((object)$"startingCredits: {ConfigManager.QuotaStartingCredits.Value}"); Plugin.logger.LogInfo((object)$"baseIncrease: {ConfigManager.QuotaBaseIncrease.Value}"); Plugin.logger.LogInfo((object)$"randomizerPortion: {ConfigManager.QuotaRandomizerPortion.Value}"); Plugin.logger.LogInfo((object)$"inverseSteepness: {ConfigManager.QuotaInverseSteepness.Value}"); Plugin.logger.LogInfo((object)"In game values:"); Plugin.logger.LogInfo((object)$"daysPerQuota: {___quotaVariables.deadlineDaysAmount}"); Plugin.logger.LogInfo((object)$"startingQuota: {___quotaVariables.startingQuota}"); Plugin.logger.LogInfo((object)$"startingCredits: {___quotaVariables.startingCredits}"); Plugin.logger.LogInfo((object)$"baseIncrease: {___quotaVariables.baseIncrease}"); Plugin.logger.LogInfo((object)$"randomizerPortion: {___quotaVariables.randomizerMultiplier}"); Plugin.logger.LogInfo((object)$"inverseSteepness: {___quotaVariables.increaseSteepness}"); } UpdateQuotaVariables(); if (ConfigManager.EnableDebug.Value) { Plugin.logger.LogInfo((object)"Set quota variables."); } } } public static void UpdateQuotaVariables() { if (Plugin.QuotaCompat) { return; } TimeOfDay instance = TimeOfDay.Instance; QuotaSettings value = Traverse.Create((object)instance).Field("quotaVariables").GetValue<QuotaSettings>(); if (ConfigManager.ConfigQuota.Value) { if (ConfigManager.QuotaDaysPerCycle.Value != value.deadlineDaysAmount) { Plugin.logger.LogInfo((object)$"Updating daysPerQuota from {value.deadlineDaysAmount} to {ConfigManager.QuotaDaysPerCycle.Value}"); value.deadlineDaysAmount = ConfigManager.QuotaDaysPerCycle.Value; } if (ConfigManager.QuotaStartingQuota.Value != value.startingQuota) { Plugin.logger.LogInfo((object)$"Updating startingQuota from {value.startingQuota} to {ConfigManager.QuotaStartingQuota.Value}"); value.startingQuota = ConfigManager.QuotaStartingQuota.Value; } if (ConfigManager.QuotaStartingCredits.Value != value.startingCredits) { Plugin.logger.LogInfo((object)$"Updating startingCredits from {value.startingCredits} to {ConfigManager.QuotaStartingCredits.Value}"); value.startingCredits = ConfigManager.QuotaStartingCredits.Value; } if ((float)ConfigManager.QuotaBaseIncrease.Value != value.baseIncrease) { Plugin.logger.LogInfo((object)$"Updating baseIncrease from {value.baseIncrease} to {ConfigManager.QuotaBaseIncrease.Value}"); value.baseIncrease = ConfigManager.QuotaBaseIncrease.Value; } if (ConfigManager.QuotaRandomizerPortion.Value != value.randomizerMultiplier) { Plugin.logger.LogInfo((object)$"Updating randomizerPortion from {value.randomizerMultiplier} to {ConfigManager.QuotaRandomizerPortion.Value}"); value.randomizerMultiplier = ConfigManager.QuotaRandomizerPortion.Value; } if (ConfigManager.QuotaInverseSteepness.Value != value.increaseSteepness) { Plugin.logger.LogInfo((object)$"Updating randomizerPortion from {value.increaseSteepness} to {ConfigManager.QuotaInverseSteepness.Value}"); value.increaseSteepness = ConfigManager.QuotaInverseSteepness.Value; } if (ConfigManager.EnableDebug.Value) { Plugin.logger.LogInfo((object)"Updated quota variables."); } } else { value.deadlineDaysAmount = 3; value.startingQuota = 130; value.startingCredits = 60; value.baseIncrease = 100f; value.randomizerMultiplier = 1f; value.increaseSteepness = 16f; if (ConfigManager.EnableDebug.Value) { Plugin.logger.LogInfo((object)"Reset quota variables."); } } } } } 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 ConfigFile Config { 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<float> OvertimeRatio { get; private set; } public static ConfigEntry<int> OvertimeEarlyBonus { get; private set; } public static ConfigEntry<float> OvertimeEarlyScaling { get; private set; } public static ConfigEntry<bool> EarlyFulfillment { get; private set; } public static ConfigEntry<int> EarlyFulfillStartDay { get; private set; } public static ConfigEntry<bool> ConfigQuota { get; private set; } public static ConfigEntry<int> QuotaDaysPerCycle { get; private set; } public static ConfigEntry<int> QuotaStartingQuota { get; private set; } public static ConfigEntry<int> QuotaStartingCredits { get; private set; } public static ConfigEntry<int> QuotaBaseIncrease { get; private set; } public static ConfigEntry<float> QuotaRandomizerPortion { get; private set; } public static ConfigEntry<float> QuotaInverseSteepness { 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 ConfigEntry<bool> EnableDebug { get; private set; } public static void Init(ConfigFile config) { if (Instance == null) { Instance = new ConfigManager(config); } } private static void MigrateIfExists<T>(string oldSection, string oldKey, ConfigEntry<T> newEntry) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Expected O, but got Unknown ConfigDefinition val = new ConfigDefinition(oldSection, oldKey); ConfigEntry<T> val2 = default(ConfigEntry<T>); if (!Config.TryGetEntry<T>(val, ref val2)) { return; } try { if (((ConfigEntryBase)val2).BoxedValue is T value) { newEntry.Value = value; } else { string serializedValue = ((ConfigEntryBase)val2).GetSerializedValue(); T value2 = (T)TypeDescriptor.GetConverter(typeof(T)).ConvertFromInvariantString(serializedValue); newEntry.Value = value2; } if (Plugin.logger != null && EnableDebug.Value) { Plugin.logger.LogInfo((object)$"Migrated config entry {oldSection}:{oldKey} with value {val2.Value} to {((ConfigEntryBase)newEntry).Definition.Section}:{((ConfigEntryBase)newEntry).Definition.Key}"); } } catch { } Config.Remove(val); Config.Save(); } private ConfigManager(ConfigFile config) { Config = 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>("Overtime Settings", "OvertimeOverride", true, "Set this to false to allow full overtime bonus even with rollover. (Not Recommended.)"); OvertimeRatio = config.Bind<float>("Overtime Settings", "OvertimeRatio", 0.2f, "The ratio of the overfulfilled quota that is rewarded as overtime bonus."); OvertimeEarlyBonus = config.Bind<int>("Overtime Settings", "OvertimeEarlyBonus", 20, "The base bonus awarded for overtime for each day earlier than the deadline."); OvertimeEarlyScaling = config.Bind<float>("Overtime Settings", "OvertimeEarlyScaling", 0f, "The scaling of the early bonus each quota."); EarlyFulfillment = config.Bind<bool>("Early Fulfillment", "EnableEarlyFulfillment", false, "Set this to true if you would like to reenable early quota advancements such as in vanilla."); EarlyFulfillStartDay = config.Bind<int>("Early Fulfillment", "RolloverEarlyFulfillmentStartDay", 0, "The day on which early fulfillment can start occurring, if enabled."); ConfigQuota = config.Bind<bool>("Quota Cycle Settings", "ConfigurableQuota", false, "If enabled, the quota properties will be calculated from the following settings instead of external settings or the vanilla ones. (These will be disabled automatically if a mod on the README compatibility list is detected.)"); QuotaDaysPerCycle = config.Bind<int>("Quota Cycle Settings", "QuotaDaysPerCycle", 3, "The number of days that make up a quota cycle. Vanilla is 3, with the fourth being a mandatory turn in day usually."); QuotaStartingQuota = config.Bind<int>("Quota Cycle Settings", "StartingQuota", 130, "The quota for the first cycle."); QuotaStartingCredits = config.Bind<int>("Quota Cycle Settings", "StartingCredits", 60, "The credits you start the game with."); QuotaBaseIncrease = config.Bind<int>("Quota Cycle Settings", "QuotaBaseIncrease", 100, "The base increase in quota for each cycle. Details on the quota calculation is on the README (and the wiki for LC)."); QuotaRandomizerPortion = config.Bind<float>("Quota Cycle Settings", "QuotaRandomizerPortion", 1f, "The ratio of the base increase that is added as a random amount to the quota increase each cycle. Details on the quota calculation is on the README (and the wiki for LC)."); QuotaInverseSteepness = config.Bind<float>("Quota Cycle Settings", "QuotaInverseSteepness", 16f, "The inverse of the steepness of the increase of the quota. (The name in game is a bit) Higher values make the quota increase more linear, while lower values make it more exponential. Details on the quota calculation is on the README (and the wiki for LC)."); 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."); EnableDebug = config.Bind<bool>("Debug", "Enable debug mode", false, "If enabled, a substantial amount of debug logs will be made."); MigrateIfExists<bool>("General", "RolloverOvertimeOverride", OvertimeOverride); MigrateIfExists<bool>("General", "RolloverEarlyFulfillment", EarlyFulfillment); } } [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__13_0; public static GenericButtonHandler <>9__13_1; public static GenericButtonHandler <>9__13_2; public static GenericButtonHandler <>9__13_3; public static GenericButtonHandler <>9__13_4; public static GenericButtonHandler <>9__13_5; public static GenericButtonHandler <>9__13_6; public static CanModifyDelegate <>9__13_19; public static EventHandler <>9__13_7; public static EventHandler <>9__13_8; public static EventHandler <>9__13_9; public static EventHandler <>9__13_10; public static EventHandler <>9__13_11; public static EventHandler <>9__13_12; public static EventHandler <>9__13_13; internal void <.ctor>b__13_0() { ConfigManager.OvertimeOverride.Value = false; ConfigManager.PenaltyUsed.Value = ConfigManager.PenaltyType.Asymptotic; ConfigManager.RolloverFraction.Value = 100; ConfigManager.RolloverThreshold.Value = 100; ConfigManager.RolloverPenalty.Value = 100; ConfigManager.EarlyFulfillment.Value = false; } internal void <.ctor>b__13_1() { ConfigManager.OvertimeOverride.Value = true; ConfigManager.PenaltyUsed.Value = ConfigManager.PenaltyType.Asymptotic; ConfigManager.RolloverFraction.Value = 100; ConfigManager.RolloverThreshold.Value = 100; ConfigManager.RolloverPenalty.Value = 100; ConfigManager.EarlyFulfillment.Value = true; } internal void <.ctor>b__13_2() { ConfigManager.OvertimeOverride.Value = true; ConfigManager.PenaltyUsed.Value = ConfigManager.PenaltyType.Logarithmic; ConfigManager.RolloverFraction.Value = 100; ConfigManager.RolloverThreshold.Value = 50; ConfigManager.RolloverPenalty.Value = 75; ConfigManager.EarlyFulfillment.Value = false; } internal void <.ctor>b__13_3() { ConfigManager.OvertimeOverride.Value = true; ConfigManager.PenaltyUsed.Value = ConfigManager.PenaltyType.Asymptotic; ConfigManager.RolloverFraction.Value = 100; ConfigManager.RolloverThreshold.Value = 100; ConfigManager.RolloverPenalty.Value = 0; ConfigManager.EarlyFulfillment.Value = false; } internal void <.ctor>b__13_4() { ConfigManager.OvertimeOverride.Value = true; ConfigManager.PenaltyUsed.Value = ConfigManager.PenaltyType.Asymptotic; ConfigManager.RolloverFraction.Value = 100; ConfigManager.RolloverThreshold.Value = 50; ConfigManager.RolloverPenalty.Value = 50; ConfigManager.EarlyFulfillment.Value = true; } internal void <.ctor>b__13_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__13_6() { ConfigManager.OvertimeOverride.Value = true; ConfigManager.PenaltyUsed.Value = ConfigManager.PenaltyType.Asymptotic; ConfigManager.RolloverFraction.Value = 0; ConfigManager.RolloverThreshold.Value = 100; ConfigManager.RolloverPenalty.Value = 100; } internal CanModifyResult <.ctor>b__13_19() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) return CanModifyResult.False("Press Apply to update this value."); } internal void <.ctor>b__13_7(object sender, EventArgs args) { TimeOfDayPatch.UpdateQuotaVariables(); } internal void <.ctor>b__13_8(object sender, EventArgs args) { if (ConfigManager.ConfigQuota.Value) { TimeOfDayPatch.UpdateQuotaVariables(); } } internal void <.ctor>b__13_9(object sender, EventArgs args) { if (ConfigManager.ConfigQuota.Value) { TimeOfDayPatch.UpdateQuotaVariables(); } } internal void <.ctor>b__13_10(object sender, EventArgs args) { if (ConfigManager.ConfigQuota.Value) { TimeOfDayPatch.UpdateQuotaVariables(); } } internal void <.ctor>b__13_11(object sender, EventArgs args) { if (ConfigManager.ConfigQuota.Value) { TimeOfDayPatch.UpdateQuotaVariables(); } } internal void <.ctor>b__13_12(object sender, EventArgs args) { if (ConfigManager.ConfigQuota.Value) { TimeOfDayPatch.UpdateQuotaVariables(); } } internal void <.ctor>b__13_13(object sender, EventArgs args) { if (ConfigManager.ConfigQuota.Value) { TimeOfDayPatch.UpdateQuotaVariables(); } } } public static LethalConfigManager Instance { get; private set; } public static ConfigEntry<int> ExampleQuota { get; private set; } public static ConfigEntry<int> ExampleRollover { get; private set; } public static void Init() { if (Instance == null) { Instance = new LethalConfigManager(); } } private LethalConfigManager() { //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Expected O, but got Unknown //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Expected O, but got Unknown //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Expected O, but got Unknown //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Expected O, but got Unknown //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Expected O, but got Unknown //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Expected O, but got Unknown //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Expected O, but got Unknown //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Expected O, but got Unknown //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Expected O, but got Unknown //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Expected O, but got Unknown //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Expected O, but got Unknown //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Expected O, but got Unknown //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Expected O, but got Unknown //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Expected O, but got Unknown //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: Expected O, but got Unknown //IL_023e: Unknown result type (might be due to invalid IL or missing references) //IL_0244: Expected O, but got Unknown //IL_0284: Unknown result type (might be due to invalid IL or missing references) //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_0291: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Expected O, but got Unknown //IL_02bc: Expected O, but got Unknown //IL_02b7: Unknown result type (might be due to invalid IL or missing references) //IL_02c1: Expected O, but got Unknown //IL_0348: Unknown result type (might be due to invalid IL or missing references) //IL_0352: Expected O, but got Unknown //IL_0359: Unknown result type (might be due to invalid IL or missing references) //IL_0363: Expected O, but got Unknown //IL_036a: Unknown result type (might be due to invalid IL or missing references) //IL_0374: Expected O, but got Unknown //IL_037b: Unknown result type (might be due to invalid IL or missing references) //IL_0385: Expected O, but got Unknown //IL_038e: Unknown result type (might be due to invalid IL or missing references) //IL_0398: Expected O, but got Unknown //IL_039f: Unknown result type (might be due to invalid IL or missing references) //IL_03a9: Expected O, but got Unknown //IL_03b2: Unknown result type (might be due to invalid IL or missing references) //IL_03bc: Expected O, but got Unknown //IL_02a6: Unknown result type (might be due to invalid IL or missing references) //IL_02ab: Unknown result type (might be due to invalid IL or missing references) //IL_02b1: Expected O, but got Unknown //IL_03ed: Unknown result type (might be due to invalid IL or missing references) //IL_03f7: Expected O, but got Unknown //IL_0428: Unknown result type (might be due to invalid IL or missing references) //IL_0432: Expected O, but got Unknown //IL_0463: Unknown result type (might be due to invalid IL or missing references) //IL_046d: Expected O, but got Unknown //IL_049e: Unknown result type (might be due to invalid IL or missing references) //IL_04a8: Expected O, but got Unknown //IL_04d9: Unknown result type (might be due to invalid IL or missing references) //IL_04e3: Expected O, but got Unknown //IL_0514: Unknown result type (might be due to invalid IL or missing references) //IL_051e: Expected O, but got Unknown //IL_0562: Unknown result type (might be due to invalid IL or missing references) //IL_056c: Expected O, but got Unknown //IL_0573: Unknown result type (might be due to invalid IL or missing references) //IL_057d: Expected O, but got Unknown //IL_0584: Unknown result type (might be due to invalid IL or missing references) //IL_058e: Expected O, but got Unknown //IL_0595: Unknown result type (might be due to invalid IL or missing references) //IL_059f: Expected O, but got Unknown //IL_05a6: Unknown result type (might be due to invalid IL or missing references) //IL_05b0: Expected O, but got Unknown //IL_05b7: Unknown result type (might be due to invalid IL or missing references) //IL_05c1: Expected O, but got Unknown //IL_05ca: Unknown result type (might be due to invalid IL or missing references) //IL_05d4: 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__13_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; ConfigManager.EarlyFulfillment.Value = false; }; <>c.<>9__13_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. Quota periods will play out instead of redeeming early.", "Classic Quota Rollover (Easiest)", (GenericButtonHandler)obj)); object obj2 = <>c.<>9__13_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; ConfigManager.EarlyFulfillment.Value = true; }; <>c.<>9__13_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. Quotas will advance when fulfilled as in Vanilla.", "Balanced Quota Rollover (Easy)", (GenericButtonHandler)obj2)); object obj3 = <>c.<>9__13_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; ConfigManager.EarlyFulfillment.Value = false; }; <>c.<>9__13_2 = val3; obj3 = (object)val3; } LethalConfigManager.AddConfigItem((BaseConfigItem)new GenericButtonConfigItem("Quick Settings", "ScaledDown", "Gradually reduces rollover out the more you turn in. No early fulfillment.", "Significant Rollover (Easy)", (GenericButtonHandler)obj3)); object obj4 = <>c.<>9__13_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; ConfigManager.EarlyFulfillment.Value = false; }; <>c.<>9__13_3 = val4; obj4 = (object)val4; } LethalConfigManager.AddConfigItem((BaseConfigItem)new GenericButtonConfigItem("Quick Settings", "HardCapped", "You can rollover exactly one quota's worth. No more. Early fulfillment disabled.", "Hard Capped (Easy)", (GenericButtonHandler)obj4)); object obj5 = <>c.<>9__13_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; ConfigManager.EarlyFulfillment.Value = true; }; <>c.<>9__13_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. Early fulfillment enabled, but only happens if you turn in early.", "Recommended (Medium)", (GenericButtonHandler)obj5)); object obj6 = <>c.<>9__13_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__13_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. Early fulfillment enabled anyway.", "Company Issued Rollover (Hard)", (GenericButtonHandler)obj6)); object obj7 = <>c.<>9__13_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__13_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)); ExampleQuota = ConfigManager.Config.Bind<int>("General", "ExampleQuota", 200, "Enter an example amount of quota to rollover (assuming a required 100 quota)."); IntInputFieldConfigItem val8 = new IntInputFieldConfigItem(ExampleQuota, false); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)val8); ExampleRollover = ConfigManager.Config.Bind<int>("General", "ExampleRollover", TimeOfDayPatch.CalculateQuotaRollover(ExampleQuota.Value - 100, 100), "After 100 quota is collected, this much will be rolled over (assuming the next quota is 100 for simplicity)."); ConfigEntry<int> exampleRollover = ExampleRollover; IntInputFieldOptions val9 = new IntInputFieldOptions { RequiresRestart = false }; object obj8 = <>c.<>9__13_19; if (obj8 == null) { CanModifyDelegate val10 = () => CanModifyResult.False("Press Apply to update this value."); <>c.<>9__13_19 = val10; obj8 = (object)val10; } ((BaseOptions)val9).CanModifyCallback = (CanModifyDelegate)obj8; IntInputFieldConfigItem ExampleRolloverItem = new IntInputFieldConfigItem(exampleRollover, val9); LethalConfigManager.AddConfigItem((BaseConfigItem)(object)ExampleRolloverItem); ExampleQuota.SettingChanged += delegate { ExampleRollover.Value = TimeOfDayPatch.CalculateQuotaRollover(ExampleQuota.Value - 100, 100); ((BaseConfigItem)ExampleRolloverItem).ApplyChanges(); }; ConfigManager.RolloverFraction.SettingChanged += delegate { ExampleRollover.Value = TimeOfDayPatch.CalculateQuotaRollover(ExampleQuota.Value - 100, 100); ((BaseConfigItem)ExampleRolloverItem).ApplyChanges(); }; ConfigManager.RolloverThreshold.SettingChanged += delegate { ExampleRollover.Value = TimeOfDayPatch.CalculateQuotaRollover(ExampleQuota.Value - 100, 100); ((BaseConfigItem)ExampleRolloverItem).ApplyChanges(); }; ConfigManager.RolloverPenalty.SettingChanged += delegate { ExampleRollover.Value = TimeOfDayPatch.CalculateQuotaRollover(ExampleQuota.Value - 100, 100); ((BaseConfigItem)ExampleRolloverItem).ApplyChanges(); }; ConfigManager.PenaltyUsed.SettingChanged += delegate { ExampleRollover.Value = TimeOfDayPatch.CalculateQuotaRollover(ExampleQuota.Value - 100, 100); ((BaseConfigItem)ExampleRolloverItem).ApplyChanges(); }; LethalConfigManager.AddConfigItem((BaseConfigItem)new BoolCheckBoxConfigItem(ConfigManager.OvertimeOverride, false)); LethalConfigManager.AddConfigItem((BaseConfigItem)new FloatInputFieldConfigItem(ConfigManager.OvertimeRatio, false)); LethalConfigManager.AddConfigItem((BaseConfigItem)new IntInputFieldConfigItem(ConfigManager.OvertimeEarlyBonus, false)); LethalConfigManager.AddConfigItem((BaseConfigItem)new FloatInputFieldConfigItem(ConfigManager.OvertimeEarlyScaling, false)); LethalConfigManager.AddConfigItem((BaseConfigItem)new BoolCheckBoxConfigItem(ConfigManager.EarlyFulfillment, false)); LethalConfigManager.AddConfigItem((BaseConfigItem)new IntInputFieldConfigItem(ConfigManager.EarlyFulfillStartDay, false)); LethalConfigManager.AddConfigItem((BaseConfigItem)new BoolCheckBoxConfigItem(ConfigManager.ConfigQuota, false)); ConfigManager.ConfigQuota.SettingChanged += delegate { TimeOfDayPatch.UpdateQuotaVariables(); }; LethalConfigManager.AddConfigItem((BaseConfigItem)new IntInputFieldConfigItem(ConfigManager.QuotaDaysPerCycle, false)); ConfigManager.QuotaDaysPerCycle.SettingChanged += delegate { if (ConfigManager.ConfigQuota.Value) { TimeOfDayPatch.UpdateQuotaVariables(); } }; LethalConfigManager.AddConfigItem((BaseConfigItem)new IntInputFieldConfigItem(ConfigManager.QuotaStartingQuota, false)); ConfigManager.QuotaStartingQuota.SettingChanged += delegate { if (ConfigManager.ConfigQuota.Value) { TimeOfDayPatch.UpdateQuotaVariables(); } }; LethalConfigManager.AddConfigItem((BaseConfigItem)new IntInputFieldConfigItem(ConfigManager.QuotaStartingCredits, false)); ConfigManager.QuotaStartingCredits.SettingChanged += delegate { if (ConfigManager.ConfigQuota.Value) { TimeOfDayPatch.UpdateQuotaVariables(); } }; LethalConfigManager.AddConfigItem((BaseConfigItem)new IntInputFieldConfigItem(ConfigManager.QuotaBaseIncrease, false)); ConfigManager.QuotaBaseIncrease.SettingChanged += delegate { if (ConfigManager.ConfigQuota.Value) { TimeOfDayPatch.UpdateQuotaVariables(); } }; LethalConfigManager.AddConfigItem((BaseConfigItem)new FloatInputFieldConfigItem(ConfigManager.QuotaRandomizerPortion, false)); ConfigManager.QuotaRandomizerPortion.SettingChanged += delegate { if (ConfigManager.ConfigQuota.Value) { TimeOfDayPatch.UpdateQuotaVariables(); } }; LethalConfigManager.AddConfigItem((BaseConfigItem)new FloatInputFieldConfigItem(ConfigManager.QuotaInverseSteepness, false)); ConfigManager.QuotaInverseSteepness.SettingChanged += delegate { if (ConfigManager.ConfigQuota.Value) { TimeOfDayPatch.UpdateQuotaVariables(); } }; LethalConfigManager.AddConfigItem((BaseConfigItem)(object)new EnumDropDownConfigItem<ConfigManager.ColorOptions>(ConfigManager.ScreenColoration, false)); LethalConfigManager.AddConfigItem((BaseConfigItem)new HexColorInputFieldConfigItem(ConfigManager.ColorUnderFulfilled, false)); LethalConfigManager.AddConfigItem((BaseConfigItem)new HexColorInputFieldConfigItem(ConfigManager.ColorFulfilled, false)); LethalConfigManager.AddConfigItem((BaseConfigItem)new HexColorInputFieldConfigItem(ConfigManager.ColorOverFulfilled, false)); LethalConfigManager.AddConfigItem((BaseConfigItem)new HexColorInputFieldConfigItem(ConfigManager.TextColorOverrideUnderFulfilled, false)); LethalConfigManager.AddConfigItem((BaseConfigItem)new HexColorInputFieldConfigItem(ConfigManager.TextColorOverrideFulfilled, false)); LethalConfigManager.AddConfigItem((BaseConfigItem)new HexColorInputFieldConfigItem(ConfigManager.TextColorOverrideOverFulfilled, false)); LethalConfigManager.AddConfigItem((BaseConfigItem)new BoolCheckBoxConfigItem(ConfigManager.EnableDebug, false)); } } } namespace LethalCompTime.Compat { [BepInDependency(/*Could not decode attribute arguments.*/)] internal class LobbyCompatibilityManager { public static LobbyCompatibilityManager Instance { get; private set; } public static void Init() { if (Instance == null) { Instance = new LobbyCompatibilityManager(); } } private LobbyCompatibilityManager() { PluginHelper.RegisterPlugin("LethalCompTime", new Version("1.4.0"), (CompatibilityLevel)0, (VersionStrictness)0); } } }