Decompiled source of Cult of QoL Collection v2.3.0

plugins/CultOfQoL.dll

Decompiled 3 weeks ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Reflection.Emit;
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 CultOfQoL.Core;
using CultOfQoL.Core.Routines;
using CultOfQoL.Patches.Followers;
using CultOfQoL.Patches.Gameplay;
using CultOfQoL.Patches.Systems;
using CultOfQoL.Patches.UI;
using DG.Tweening;
using DG.Tweening.Core;
using HarmonyLib;
using JetBrains.Annotations;
using Lamb.UI;
using Lamb.UI.FollowerInteractionWheel;
using Lamb.UI.FollowerSelect;
using Lamb.UI.MainMenu;
using Lamb.UI.PauseMenu;
using LeTai.Asset.TranslucentImage;
using MMTools;
using Map;
using Microsoft.CodeAnalysis;
using MonoMod.Utils;
using Newtonsoft.Json;
using Shared;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
using src.UI;
using src.UI.Menus;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETFramework,Version=v4.8.1", FrameworkDisplayName = ".NET Framework 4.8.1")]
[assembly: AssemblyCompany("p1xel8ted")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyDescription("CultOfQoL")]
[assembly: AssemblyFileVersion("2.3.0")]
[assembly: AssemblyInformationalVersion("2.3.0+5acbc3ac0762e1727bf9a302bb55ad3281e490f0")]
[assembly: AssemblyProduct("CultOfQoL")]
[assembly: AssemblyTitle("CultOfQoL")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("2.3.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 Shared
{
	internal sealed class ConfigurationManagerAttributes
	{
		public delegate void CustomHotkeyDrawerFunc(ConfigEntryBase setting, ref bool isCurrentlyAcceptingInput);

		public bool? ShowRangeAsPercent;

		public Action<ConfigEntryBase> CustomDrawer;

		public CustomHotkeyDrawerFunc CustomHotkeyDrawer;

		public bool? Browsable;

		public string Category;

		public object DefaultValue;

		public bool? HideDefaultButton;

		public bool? HideSettingName;

		public string Description;

		public string DispName;

		public int? Order;

		public bool? ReadOnly;

		public bool? IsAdvanced;

		public Func<object, string> ObjToStr;

		public Func<string, object> StrToObj;
	}
	public static class Extensions
	{
		public static bool TryAdd<TKey, TValue>(this Dictionary<TKey, TValue> dictionary, TKey key, TValue value)
		{
			if (dictionary.ContainsKey(key))
			{
				return false;
			}
			dictionary.Add(key, value);
			return true;
		}

		public static bool IsMealWithMeat(this ITEM_TYPE itemType)
		{
			string[] source = new string[3] { "meat", "fish", "mixed" };
			string itemName = ((object)(ITEM_TYPE)(ref itemType)).ToString().ToLower();
			return source.Any((string check) => itemName.Contains(check));
		}

		public static bool IsMixedMeal(this ITEM_TYPE itemType)
		{
			string[] source = new string[1] { "mixed" };
			string itemName = ((object)(ITEM_TYPE)(ref itemType)).ToString().ToLower();
			return source.Any((string check) => itemName.Contains(check));
		}

		public static void AddRange<T>(this SortedSet<T> set, IEnumerable<T> elements)
		{
			foreach (T element in elements)
			{
				set.Add(element);
			}
		}

		public static bool TryReplace(this string source, string oldValue, string newValue, out string result)
		{
			if (source == null)
			{
				throw new ArgumentNullException("source");
			}
			if (oldValue == null)
			{
				throw new ArgumentNullException("oldValue");
			}
			result = source.Replace(oldValue, newValue);
			return (object)source != result;
		}

		public static string GetPath(this GameObject obj)
		{
			if (!((Object)(object)obj.transform.parent == (Object)null))
			{
				return ((Component)obj.transform.parent).gameObject.GetPath() + "/" + ((Object)obj).name;
			}
			return ((Object)obj).name;
		}

		public static bool Contains(this string source, string toCheck, StringComparison comparison)
		{
			if (source == null)
			{
				throw new ArgumentNullException("source");
			}
			if (toCheck == null)
			{
				throw new ArgumentNullException("toCheck");
			}
			return source.IndexOf(toCheck, comparison) >= 0;
		}
	}
	public static class Helpers
	{
		private static class StorefrontDetector
		{
			private static readonly string[] PiracyFiles = new string[42]
			{
				"SmartSteamEmu.ini", "codex.ini", "steam_emu.ini", "goldberg_emulator.dll", "3dmgame.dll", "ALI213.dll", "crack", "crack.exe", "steam_api64_o.dll", "steamclient_loader.dll",
				"CODEX", "Goldberg", "REVOLT", "SKIDROW", "PROPHET", "CPY", "PLAZA", "FLT", "FLT.dll", "HOODLUM",
				"EMPRESS", "VALVEEMPRESS", "DARKSiDERS", "RAZOR1911", "TENOKE", "DOGE", "BAT", "P2P", "nosTEAM", "FCKDRM",
				"unarc.dll", "uninstall.exe", "setup.exe", "INSTALLER", "steam_api64.cdx.dll", "Launcher.exe", "Redist", "RLD!", "fix.exe", "crackfix",
				"ReadMe.txt", "README.nfo"
			};

			public static string DetectStorefront()
			{
				string dir = Directory.GetCurrentDirectory();
				string text = "Unknown";
				if (File.Exists(Path.Combine(dir, "steam_api.dll")) || File.Exists(Path.Combine(dir, "steam_api64.dll")) || File.Exists(Path.Combine(dir, "steam_appid.txt")) || Directory.Exists(Path.Combine(dir, "steam_settings")))
				{
					text = "Steam";
				}
				else if (Directory.GetFiles(dir, "goggame-*.info").Any() || File.Exists(Path.Combine(dir, "galaxy.dll")))
				{
					text = "GOG";
				}
				else if (File.Exists(Path.Combine(dir, "EOSSDK-Win64-Shipping.dll")) || File.Exists(Path.Combine(dir, "EpicOnlineServices.dll")) || Directory.Exists(Path.Combine(dir, ".egstore")))
				{
					text = "Epic";
				}
				else if (IsProcessRunning("steam"))
				{
					text = "Steam (process only)";
				}
				else if (IsProcessRunning("GalaxyClient"))
				{
					text = "GOG (process only)";
				}
				else if (IsProcessRunning("EpicGamesLauncher"))
				{
					text = "Epic (process only)";
				}
				if (PiracyFiles.Any((string pirate) => File.Exists(Path.Combine(dir, pirate)) || Directory.Exists(Path.Combine(dir, pirate))))
				{
					text += " + Possible Pirated/Cracked Files Found!";
				}
				return text;
			}

			private static bool IsProcessRunning(string name)
			{
				return Process.GetProcessesByName(name).Length != 0;
			}
		}

		[CompilerGenerated]
		private sealed class <FilterEnumerator>d__17 : IEnumerator<object>, IDisposable, IEnumerator
		{
			private int <>1__state;

			private object <>2__current;

			public IEnumerator original;

			public Type[] typesToRemove;

			object IEnumerator<object>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <FilterEnumerator>d__17(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					break;
				case 1:
					<>1__state = -1;
					break;
				}
				while (original.MoveNext())
				{
					object current = original.Current;
					if (current != null && !ArrayExtensions.Contains<Type>(typesToRemove, current.GetType()))
					{
						<>2__current = current;
						<>1__state = 1;
						return true;
					}
				}
				return false;
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		internal static List<Follower> AllFollowers => FollowerManager.Followers.SelectMany((KeyValuePair<FollowerLocation, List<Follower>> followerList) => followerList.Value).ToList();

		public static void PrintModLoaded(string plugin, ManualLogSource logger)
		{
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			string text = Application.version.Replace("\r", "").Replace("\n", "");
			string buildGUID = Application.buildGUID;
			Platform current = PlatformHelper.Current;
			string text2 = StorefrontDetector.DetectStorefront();
			logger.LogInfo((object)"==========================================");
			logger.LogInfo((object)("  Plugin Loaded: " + plugin));
			logger.LogInfo((object)("  Version   : " + text + " (BuildGUID: " + buildGUID + ")"));
			logger.LogInfo((object)$"  Platform  : {current}");
			logger.LogInfo((object)("  Storefront: " + text2));
			logger.LogInfo((object)"==========================================");
		}

		private static FollowerTask_ClearRubble GetRubbleTask()
		{
			SortedList<float, FollowerTask> sortedList = new SortedList<float, FollowerTask>();
			List<Structures_Rubble> allStructuresOfType = StructureManager.GetAllStructuresOfType<Structures_Rubble>();
			foreach (Structures_Rubble item in allStructuresOfType)
			{
				item.GetAvailableTasks((ScheduledActivity)0, sortedList);
			}
			FollowerTask? obj = sortedList.Values.FirstOrDefault();
			return (FollowerTask_ClearRubble)(object)((obj is FollowerTask_ClearRubble) ? obj : null);
		}

		private static FollowerTask_Janitor GetJanitorTask()
		{
			SortedList<float, FollowerTask> sortedList = new SortedList<float, FollowerTask>();
			List<Structures_JanitorStation> allStructuresOfType = StructureManager.GetAllStructuresOfType<Structures_JanitorStation>();
			foreach (Structures_JanitorStation item in allStructuresOfType)
			{
				item.GetAvailableTasks((ScheduledActivity)0, sortedList);
			}
			FollowerTask? obj = sortedList.Values.FirstOrDefault();
			return (FollowerTask_Janitor)(object)((obj is FollowerTask_Janitor) ? obj : null);
		}

		private static FollowerTask_Refinery GetRefineryTask()
		{
			SortedList<float, FollowerTask> sortedList = new SortedList<float, FollowerTask>();
			List<Structures_Refinery> allStructuresOfType = StructureManager.GetAllStructuresOfType<Structures_Refinery>();
			foreach (Structures_Refinery item in allStructuresOfType)
			{
				item.GetAvailableTasks((ScheduledActivity)0, sortedList);
			}
			FollowerTask? obj = sortedList.Values.FirstOrDefault();
			return (FollowerTask_Refinery)(object)((obj is FollowerTask_Refinery) ? obj : null);
		}

		private static FollowerTask_Undertaker GetMorgueTask()
		{
			SortedList<float, FollowerTask> sortedList = new SortedList<float, FollowerTask>();
			List<Structures_Morgue> allStructuresOfType = StructureManager.GetAllStructuresOfType<Structures_Morgue>();
			foreach (Structures_Morgue item in allStructuresOfType)
			{
				item.GetAvailableTasks((ScheduledActivity)0, sortedList);
			}
			FollowerTask? obj = sortedList.Values.FirstOrDefault();
			return (FollowerTask_Undertaker)(object)((obj is FollowerTask_Undertaker) ? obj : null);
		}

		private static void StartTask(FollowerBrain brain, FollowerTask task)
		{
			brain.CompleteCurrentTask();
			brain.HardSwapToTask(task);
		}

		private static void StartTaskFromCommand(FollowerBrain brain, FollowerCommands command)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_01aa: Expected I4, but got Unknown
			//IL_01ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b7: Expected O, but got Unknown
			//IL_0235: Unknown result type (might be due to invalid IL or missing references)
			switch ((int)command)
			{
			case 14:
				StartTask(brain, (FollowerTask)new FollowerTask_ChopTrees());
				break;
			case 17:
				StartTask(brain, (FollowerTask)(object)GetRubbleTask());
				break;
			case 27:
				StartTask(brain, (FollowerTask)(object)GetPrayTask());
				break;
			case 47:
				StartTask(brain, (FollowerTask)(object)GetFarmTask());
				break;
			case 28:
				StartTask(brain, (FollowerTask)(object)GetBuildTask());
				break;
			case 30:
				StartTask(brain, (FollowerTask)(object)GetKitchenTask());
				break;
			case 58:
				StartTask(brain, (FollowerTask)(object)GetJanitorTask());
				break;
			case 64:
				StartTask(brain, (FollowerTask)(object)GetRefineryTask());
				break;
			case 81:
				StartTask(brain, (FollowerTask)(object)GetMorgueTask());
				break;
			case 88:
				StartTask(brain, (FollowerTask)(object)GetBrewTask());
				break;
			default:
				StartTask(brain, GetRandomTask(brain));
				throw new ArgumentOutOfRangeException("command", command, null);
			case 0:
			case 1:
			case 2:
			case 3:
			case 4:
			case 5:
			case 6:
			case 7:
			case 8:
			case 9:
			case 10:
			case 11:
			case 12:
			case 13:
			case 15:
			case 16:
			case 18:
			case 19:
			case 20:
			case 21:
			case 22:
			case 23:
			case 24:
			case 25:
			case 26:
			case 29:
			case 31:
			case 32:
			case 33:
			case 34:
			case 35:
			case 36:
			case 37:
			case 38:
			case 39:
			case 40:
			case 41:
			case 42:
			case 43:
			case 44:
			case 45:
			case 46:
			case 48:
			case 49:
			case 50:
			case 51:
			case 52:
			case 53:
			case 54:
			case 55:
			case 56:
			case 57:
			case 59:
			case 60:
			case 61:
			case 62:
			case 63:
			case 65:
			case 66:
			case 67:
			case 68:
			case 69:
			case 70:
			case 71:
			case 72:
			case 73:
			case 74:
			case 75:
			case 76:
			case 77:
			case 78:
			case 79:
			case 80:
			case 82:
			case 83:
			case 84:
			case 85:
			case 86:
			case 87:
			case 89:
			case 90:
			case 91:
			case 92:
			case 93:
			case 94:
			case 95:
			case 96:
			case 97:
			case 98:
			case 99:
			case 100:
			case 101:
			case 102:
			case 103:
			case 104:
				break;
			}
		}

		private static FollowerTask_Cook GetKitchenTask()
		{
			SortedList<float, FollowerTask> sortedList = new SortedList<float, FollowerTask>();
			List<Structures_Kitchen> allStructuresOfType = StructureManager.GetAllStructuresOfType<Structures_Kitchen>();
			foreach (Structures_Kitchen item in allStructuresOfType)
			{
				((Structures_CookingFire)item).GetAvailableTasks((ScheduledActivity)0, sortedList);
			}
			FollowerTask? obj = sortedList.Values.FirstOrDefault();
			return (FollowerTask_Cook)(object)((obj is FollowerTask_Cook) ? obj : null);
		}

		private static FollowerTask GetRandomTask(FollowerBrain brain)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			List<FollowerTask> desiredTask_Work = FollowerBrain.GetDesiredTask_Work(brain.Location);
			return desiredTask_Work.FirstOrDefault();
		}

		private static FollowerTask_Brew GetBrewTask()
		{
			SortedList<float, FollowerTask> sortedList = new SortedList<float, FollowerTask>();
			List<Structures_Pub> allStructuresOfType = StructureManager.GetAllStructuresOfType<Structures_Pub>();
			foreach (Structures_Pub item in allStructuresOfType)
			{
				item.GetAvailableTasks((ScheduledActivity)0, sortedList);
			}
			FollowerTask? obj = sortedList.Values.FirstOrDefault();
			return (FollowerTask_Brew)(object)((obj is FollowerTask_Brew) ? obj : null);
		}

		private static FollowerTask_Farm GetFarmTask()
		{
			SortedList<float, FollowerTask> sortedList = new SortedList<float, FollowerTask>();
			List<Structures_FarmerStation> allStructuresOfType = StructureManager.GetAllStructuresOfType<Structures_FarmerStation>();
			foreach (Structures_FarmerStation item in allStructuresOfType)
			{
				item.GetAvailableTasks((ScheduledActivity)0, sortedList);
			}
			FollowerTask? obj = sortedList.Values.FirstOrDefault();
			return (FollowerTask_Farm)(object)((obj is FollowerTask_Farm) ? obj : null);
		}

		public static bool IsMultiplierActive(float value)
		{
			return !Mathf.Approximately(value, 1f);
		}

		private static FollowerTask_Pray GetPrayTask()
		{
			SortedList<float, FollowerTask> sortedList = new SortedList<float, FollowerTask>();
			List<Structures_Shrine> allStructuresOfType = StructureManager.GetAllStructuresOfType<Structures_Shrine>();
			foreach (Structures_Shrine item in allStructuresOfType)
			{
				item.GetAvailableTasks((ScheduledActivity)0, sortedList);
			}
			FollowerTask? obj = sortedList.Values.FirstOrDefault();
			return (FollowerTask_Pray)(object)((obj is FollowerTask_Pray) ? obj : null);
		}

		private static FollowerTask_Build GetBuildTask()
		{
			SortedList<float, FollowerTask> sortedList = new SortedList<float, FollowerTask>();
			List<Structures_BuildSite> allStructuresOfType = StructureManager.GetAllStructuresOfType<Structures_BuildSite>();
			foreach (Structures_BuildSite item in allStructuresOfType)
			{
				item.GetAvailableTasks((ScheduledActivity)0, sortedList);
			}
			FollowerTask? obj = sortedList.Values.FirstOrDefault();
			return (FollowerTask_Build)(object)((obj is FollowerTask_Build) ? obj : null);
		}

		[IteratorStateMachine(typeof(<FilterEnumerator>d__17))]
		public static IEnumerator FilterEnumerator(IEnumerator original, Type[] typesToRemove)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <FilterEnumerator>d__17(0)
			{
				original = original,
				typesToRemove = typesToRemove
			};
		}
	}
}
namespace CultOfQoL
{
	[BepInPlugin("p1xel8ted.cotl.CultOfQoLCollection", "The Cult of QoL Collection", "2.3.0")]
	[BepInDependency("com.bepis.bepinex.configurationmanager", "18.3")]
	public class Plugin : BaseUnityPlugin
	{
		private const string PluginGuid = "p1xel8ted.cotl.CultOfQoLCollection";

		internal const string PluginName = "The Cult of QoL Collection";

		private const string PluginVer = "2.3.0";

		private const string RestartGameMessage = "You must restart the game for these changes to take effect, as in totally exit to desktop and restart the game.\n\n** indicates a restart is required if the setting is changed.";

		private const string GeneralSection = "01. General";

		private const string MenuCleanupSection = "02. Menu Cleanup";

		private const string GoldenFleeceSection = "03. Golden Fleece";

		private const string PlayerSection = "05. Player Damage";

		private const string SavesSection = "06. Saves";

		private const string WeatherSection = "07. Weather";

		private const string NotificationsSection = "13. Notifications";

		private const string FollowersSection = "14. Followers";

		private const string GameSpeedSection = "10. Game Speed";

		private const string CapacitySection = "12. Capacities";

		private const string AutoInteractSection = "11. Auto-Interact (Chests)";

		private const string MinesSection = "08. Mines";

		private const string MassSection = "16. Mass Actions";

		private const string StructureSection = "09. Structures";

		private const string TraitsSection = "15. Traits";

		private const string LootSection = "17. Loot";

		private const string PostProcessingSection = "18. Post Processing";

		private const string RitualSection = "19. Rituals";

		private const string GameMechanicsSection = "04. Game Mechanics";

		private const string ResetAllSettingsSection = "20. Reset All Settings";

		private bool _cachedDirectLoadValue;

		private bool _cachedEnableQuickSaveValue;

		private bool _cachedDisableAdsValue;

		private KeyboardShortcut _cachedDirectLoadSkipKey;

		private KeyboardShortcut _cachedSaveShortcut;

		private UIMainMenuController _cachedUIMainMenuController;

		private Component[] _cachedAdComponents;

		private bool _configCacheValid;

		private static bool _showConfirmationDialog;

		internal static ConfigFile ConfigInstance;

		private static ConfigEntry<bool> EnableLogging { get; set; }

		internal static ConfigEntry<bool> EnableQuickSaveShortcut { get; set; }

		internal static ConfigEntry<KeyboardShortcut> SaveKeyboardShortcut { get; set; }

		internal static ConfigEntry<bool> SaveOnQuitToDesktop { get; private set; }

		internal static ConfigEntry<bool> SaveOnQuitToMenu { get; private set; }

		internal static ConfigEntry<bool> DirectLoadSave { get; private set; }

		internal static ConfigEntry<int> SaveSlotToLoad { get; private set; }

		internal static ConfigEntry<KeyboardShortcut> DirectLoadSkipKey { get; set; }

		internal static ConfigEntry<bool> DisableAds { get; set; }

		internal static ConfigEntry<bool> HideNewGameButtons { get; private set; }

		internal static ConfigEntry<bool> SkipDevIntros { get; private set; }

		internal static ConfigEntry<bool> SkipCrownVideo { get; private set; }

		internal static ConfigEntry<bool> EasyFishing { get; private set; }

		internal static ConfigEntry<bool> FastCollecting { get; private set; }

		internal static ConfigEntry<bool> RemoveMenuClutter { get; private set; }

		internal static ConfigEntry<bool> RemoveTwitchButton { get; private set; }

		internal static ConfigEntry<KeyboardShortcut> ResetTimeScaleKey { get; private set; }

		internal static ConfigEntry<KeyboardShortcut> IncreaseGameSpeedKey { get; private set; }

		internal static ConfigEntry<KeyboardShortcut> DecreaseGameSpeedKey { get; private set; }

		internal static ConfigEntry<bool> AllLootMagnets { get; private set; }

		internal static ConfigEntry<float> MagnetRangeMultiplier { get; private set; }

		private static ConfigEntry<bool> MainMenuGlitch { get; set; }

		internal static ConfigEntry<bool> ReverseGoldenFleeceDamageChange { get; private set; }

		internal static ConfigEntry<bool> AdjustRefineryRequirements { get; private set; }

		internal static ConfigEntry<bool> NoNegativeTraits { get; private set; }

		internal static ConfigEntry<bool> UseUnlockedTraitsOnly { get; private set; }

		internal static ConfigEntry<bool> IncludeImmortal { get; private set; }

		internal static ConfigEntry<bool> IncludeDisciple { get; private set; }

		internal static ConfigEntry<bool> ShowNotificationsWhenRemovingTraits { get; private set; }

		internal static ConfigEntry<bool> ShowNotificationsWhenAddingTraits { get; private set; }

		internal static ConfigEntry<bool> CleanseIllnessAndExhaustionOnLevelUp { get; private set; }

		internal static ConfigEntry<bool> UnlockTwitchItems { get; private set; }

		internal static ConfigEntry<bool> LumberAndMiningStationsDontAge { get; private set; }

		internal static ConfigEntry<float> LumberAndMiningStationsAgeMultiplier { get; private set; }

		internal static ConfigEntry<bool> CollectTitheFromOldFollowers { get; private set; }

		internal static ConfigEntry<bool> IntimidateOldFollowers { get; private set; }

		internal static ConfigEntry<bool> EnableGameSpeedManipulation { get; private set; }

		internal static ConfigEntry<bool> ShortenGameSpeedIncrements { get; private set; }

		internal static ConfigEntry<float> SlowDownTimeMultiplier { get; private set; }

		internal static ConfigEntry<bool> DisableGameOver { get; private set; }

		internal static ConfigEntry<bool> FastRitualSermons { get; private set; }

		internal static ConfigEntry<bool> TurnOffSpeakersAtNight { get; private set; }

		internal static ConfigEntry<bool> ThriceMultiplyTarotCardLuck { get; private set; }

		internal static ConfigEntry<bool> RareTarotCardsOnly { get; private set; }

		internal static ConfigEntry<bool> EnableAutoCollect { get; private set; }

		internal static ConfigEntry<int> TriggerAmount { get; private set; }

		internal static ConfigEntry<float> AutoInteractRangeMulti { get; private set; }

		internal static ConfigEntry<bool> AutoCollectFromFarmStationChests { get; private set; }

		internal static ConfigEntry<bool> AddExhaustedToHealingBay { get; private set; }

		internal static ConfigEntry<bool> NotifyOfScarecrowTraps { get; private set; }

		internal static ConfigEntry<bool> NotifyOfNoFuel { get; private set; }

		internal static ConfigEntry<bool> NotifyOfBedCollapse { get; private set; }

		internal static ConfigEntry<bool> GiveFollowersNewNecklaces { get; private set; }

		internal static ConfigEntry<bool> RandomWeatherChangeWhenExitingArea { get; private set; }

		internal static ConfigEntry<bool> ChangeWeatherOnPhaseChange { get; private set; }

		internal static ConfigEntry<Color> LightSnowColor { get; private set; }

		internal static ConfigEntry<Color> LightWindColor { get; private set; }

		internal static ConfigEntry<Color> LightRainColor { get; private set; }

		internal static ConfigEntry<Color> MediumRainColor { get; private set; }

		internal static ConfigEntry<Color> HeavyRainColor { get; private set; }

		private static ConfigEntry<Weather.WeatherCombo> WeatherDropDown { get; set; }

		internal static ConfigEntry<bool> ShowPhaseNotifications { get; private set; }

		internal static ConfigEntry<bool> ShowWeatherChangeNotifications { get; private set; }

		internal static ConfigEntry<float> SoulCapacityMulti { get; private set; }

		internal static ConfigEntry<float> SiloCapacityMulti { get; private set; }

		internal static ConfigEntry<bool> UseMultiplesOf32 { get; private set; }

		internal static ConfigEntry<float> BaseDamageMultiplier { get; private set; }

		internal static ConfigEntry<float> FleeceDamageMulti { get; private set; }

		internal static ConfigEntry<bool> DisableRunSpeedInDungeons { get; private set; }

		internal static ConfigEntry<bool> DisableRunSpeedInCombat { get; private set; }

		internal static ConfigEntry<bool> RemoveHelpButtonInPauseMenu { get; private set; }

		internal static ConfigEntry<bool> RemoveTwitchButtonInPauseMenu { get; private set; }

		internal static ConfigEntry<bool> RemovePhotoModeButtonInPauseMenu { get; private set; }

		internal static ConfigEntry<float> RunSpeedMulti { get; private set; }

		internal static ConfigEntry<float> DodgeSpeedMulti { get; private set; }

		internal static ConfigEntry<float> LungeSpeedMulti { get; private set; }

		internal static ConfigEntry<bool> OnlyShowDissenters { get; private set; }

		internal static ConfigEntry<bool> DisablePropagandaSpeakerAudio { get; private set; }

		internal static ConfigEntry<bool> RemoveLevelLimit { get; private set; }

		internal static ConfigEntry<bool> MassBribe { get; private set; }

		internal static ConfigEntry<bool> MassFertilize { get; private set; }

		internal static ConfigEntry<bool> MassBless { get; private set; }

		internal static ConfigEntry<bool> MassRomance { get; private set; }

		internal static ConfigEntry<bool> MassBully { get; private set; }

		internal static ConfigEntry<bool> MassReassure { get; private set; }

		internal static ConfigEntry<bool> MassReeducate { get; private set; }

		internal static ConfigEntry<bool> MassExtort { get; private set; }

		internal static ConfigEntry<bool> MassPetDog { get; private set; }

		internal static ConfigEntry<bool> MassIntimidate { get; private set; }

		internal static ConfigEntry<bool> MassInspire { get; private set; }

		internal static ConfigEntry<bool> MassWater { get; private set; }

		internal static ConfigEntry<bool> MakeOldFollowersWork { get; private set; }

		internal static ConfigEntry<bool> MassCollectFromBeds { get; private set; }

		internal static ConfigEntry<bool> MassCollectFromOuthouses { get; private set; }

		internal static ConfigEntry<bool> MassCollectFromOfferingShrines { get; private set; }

		internal static ConfigEntry<bool> MassCollectFromPassiveShrines { get; private set; }

		internal static ConfigEntry<bool> MassCollectFromCompost { get; private set; }

		internal static ConfigEntry<bool> MassCollectFromHarvestTotems { get; private set; }

		internal static WriteOnce<float> RunSpeed { get; } = new WriteOnce<float>();


		internal static WriteOnce<float> DodgeSpeed { get; } = new WriteOnce<float>();


		internal static UIMainMenuController UIMainMenuController { get; set; }

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

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

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

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

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

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

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

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

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

		public static ConfigEntry<float> RitualCooldownTime { get; private set; }

		public static ConfigEntry<bool> AddSpiderWebsToOfferings { get; set; }

		public static ConfigEntry<bool> AddCrystalShardsToOfferings { get; set; }

		public static ConfigEntry<bool> CookedMeatMealsContainBone { get; set; }

		public static ConfigEntry<bool> ProduceSpiderWebsFromLumber { get; set; }

		public static ConfigEntry<int> SpiderWebsPerLogs { get; set; }

		public static ConfigEntry<bool> ProduceCrystalShardsFromStone { get; set; }

		public static ConfigEntry<int> CrystalShardsPerStone { get; set; }

		internal static ManualLogSource Log { get; private set; }

		internal static PopupManager PopupManager { get; private set; }

		private void Awake()
		{
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0065: 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_0102: Unknown result type (might be due to invalid IL or missing references)
			//IL_010c: Expected O, but got Unknown
			//IL_0141: Unknown result type (might be due to invalid IL or missing references)
			//IL_014b: Expected O, but got Unknown
			//IL_0180: Unknown result type (might be due to invalid IL or missing references)
			//IL_018a: Expected O, but got Unknown
			//IL_01bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c9: Expected O, but got Unknown
			//IL_01fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0208: 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_0292: Unknown result type (might be due to invalid IL or missing references)
			//IL_029c: Expected O, but got Unknown
			//IL_02d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_02db: Expected O, but got Unknown
			//IL_0310: Unknown result type (might be due to invalid IL or missing references)
			//IL_031a: Expected O, but got Unknown
			//IL_0378: Unknown result type (might be due to invalid IL or missing references)
			//IL_0382: Expected O, but got Unknown
			//IL_03c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d3: Expected O, but got Unknown
			//IL_043c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0446: Expected O, but got Unknown
			//IL_04a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ae: Expected O, but got Unknown
			//IL_04e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ed: Expected O, but got Unknown
			//IL_0522: Unknown result type (might be due to invalid IL or missing references)
			//IL_052c: Expected O, but got Unknown
			//IL_0567: Unknown result type (might be due to invalid IL or missing references)
			//IL_0571: Expected O, but got Unknown
			//IL_05b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_05c2: Expected O, but got Unknown
			//IL_0632: Unknown result type (might be due to invalid IL or missing references)
			//IL_063c: Expected O, but got Unknown
			//IL_069a: Unknown result type (might be due to invalid IL or missing references)
			//IL_06a4: Expected O, but got Unknown
			//IL_06d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_06e3: Expected O, but got Unknown
			//IL_072a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0734: Expected O, but got Unknown
			//IL_07a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_07ae: Expected O, but got Unknown
			//IL_080c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0816: Expected O, but got Unknown
			//IL_084b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0855: Expected O, but got Unknown
			//IL_088a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0894: Expected O, but got Unknown
			//IL_08c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_08d3: Expected O, but got Unknown
			//IL_0907: Unknown result type (might be due to invalid IL or missing references)
			//IL_092c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0936: Expected O, but got Unknown
			//IL_0981: Unknown result type (might be due to invalid IL or missing references)
			//IL_098b: Expected O, but got Unknown
			//IL_09bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_09e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_09ee: Expected O, but got Unknown
			//IL_0a4e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a58: Expected O, but got Unknown
			//IL_0ab7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ac1: Expected O, but got Unknown
			//IL_0b1f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b29: Expected O, but got Unknown
			//IL_0b7a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b9f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ba9: Expected O, but got Unknown
			//IL_0bd1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bf6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c00: Expected O, but got Unknown
			//IL_0c28: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c4d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c57: Expected O, but got Unknown
			//IL_0c7f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ca4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cae: Expected O, but got Unknown
			//IL_0cd6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cfb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d05: Expected O, but got Unknown
			//IL_0d3a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d44: Expected O, but got Unknown
			//IL_0da8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0db2: Expected O, but got Unknown
			//IL_0de3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ded: Expected O, but got Unknown
			//IL_0e5d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e67: Expected O, but got Unknown
			//IL_0eef: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ef9: Expected O, but got Unknown
			//IL_0f57: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f61: Expected O, but got Unknown
			//IL_0fbf: Unknown result type (might be due to invalid IL or missing references)
			//IL_0fc9: Expected O, but got Unknown
			//IL_0ffe: Unknown result type (might be due to invalid IL or missing references)
			//IL_1008: Expected O, but got Unknown
			//IL_103d: Unknown result type (might be due to invalid IL or missing references)
			//IL_1047: Expected O, but got Unknown
			//IL_10c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_10cc: Expected O, but got Unknown
			//IL_1147: Unknown result type (might be due to invalid IL or missing references)
			//IL_1151: Expected O, but got Unknown
			//IL_11b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_11c0: Expected O, but got Unknown
			//IL_11fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_1206: Expected O, but got Unknown
			//IL_1242: Unknown result type (might be due to invalid IL or missing references)
			//IL_124c: Expected O, but got Unknown
			//IL_1281: Unknown result type (might be due to invalid IL or missing references)
			//IL_128b: Expected O, but got Unknown
			//IL_12ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_12f4: Expected O, but got Unknown
			//IL_1353: Unknown result type (might be due to invalid IL or missing references)
			//IL_135d: Expected O, but got Unknown
			//IL_13bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_13c6: Expected O, but got Unknown
			//IL_142c: Unknown result type (might be due to invalid IL or missing references)
			//IL_1436: Expected O, but got Unknown
			//IL_1495: Unknown result type (might be due to invalid IL or missing references)
			//IL_149f: Expected O, but got Unknown
			//IL_1505: Unknown result type (might be due to invalid IL or missing references)
			//IL_150f: Expected O, but got Unknown
			//IL_156d: Unknown result type (might be due to invalid IL or missing references)
			//IL_1577: Expected O, but got Unknown
			//IL_15ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_15b6: Expected O, but got Unknown
			//IL_15d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_15f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_1603: Expected O, but got Unknown
			//IL_1621: Unknown result type (might be due to invalid IL or missing references)
			//IL_1646: Unknown result type (might be due to invalid IL or missing references)
			//IL_1650: Expected O, but got Unknown
			//IL_166e: Unknown result type (might be due to invalid IL or missing references)
			//IL_1693: Unknown result type (might be due to invalid IL or missing references)
			//IL_169d: Expected O, but got Unknown
			//IL_16dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_16e7: Expected O, but got Unknown
			//IL_1757: Unknown result type (might be due to invalid IL or missing references)
			//IL_1761: Expected O, but got Unknown
			//IL_17bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_17c9: Expected O, but got Unknown
			//IL_1839: Unknown result type (might be due to invalid IL or missing references)
			//IL_1843: Expected O, but got Unknown
			//IL_18ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_18b6: Expected O, but got Unknown
			//IL_1914: Unknown result type (might be due to invalid IL or missing references)
			//IL_191e: Expected O, but got Unknown
			//IL_1966: Unknown result type (might be due to invalid IL or missing references)
			//IL_1970: Expected O, but got Unknown
			//IL_19b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_19c1: Expected O, but got Unknown
			//IL_1a1f: Unknown result type (might be due to invalid IL or missing references)
			//IL_1a29: Expected O, but got Unknown
			//IL_1a99: Unknown result type (might be due to invalid IL or missing references)
			//IL_1aa3: Expected O, but got Unknown
			//IL_1b13: Unknown result type (might be due to invalid IL or missing references)
			//IL_1b1d: Expected O, but got Unknown
			//IL_1b7b: Unknown result type (might be due to invalid IL or missing references)
			//IL_1b85: Expected O, but got Unknown
			//IL_1bba: Unknown result type (might be due to invalid IL or missing references)
			//IL_1bc4: Expected O, but got Unknown
			//IL_1bf9: Unknown result type (might be due to invalid IL or missing references)
			//IL_1c03: Expected O, but got Unknown
			//IL_1c38: Unknown result type (might be due to invalid IL or missing references)
			//IL_1c42: Expected O, but got Unknown
			//IL_1ca0: Unknown result type (might be due to invalid IL or missing references)
			//IL_1caa: Expected O, but got Unknown
			//IL_1d08: Unknown result type (might be due to invalid IL or missing references)
			//IL_1d12: Expected O, but got Unknown
			//IL_1d47: Unknown result type (might be due to invalid IL or missing references)
			//IL_1d51: Expected O, but got Unknown
			//IL_1d86: Unknown result type (might be due to invalid IL or missing references)
			//IL_1d90: Expected O, but got Unknown
			//IL_1dc5: Unknown result type (might be due to invalid IL or missing references)
			//IL_1dcf: Expected O, but got Unknown
			//IL_1e04: Unknown result type (might be due to invalid IL or missing references)
			//IL_1e0e: Expected O, but got Unknown
			//IL_1e4e: Unknown result type (might be due to invalid IL or missing references)
			//IL_1e58: Expected O, but got Unknown
			//IL_1eca: Unknown result type (might be due to invalid IL or missing references)
			//IL_1ed4: Expected O, but got Unknown
			//IL_1f46: Unknown result type (might be due to invalid IL or missing references)
			//IL_1f50: Expected O, but got Unknown
			//IL_1fae: Unknown result type (might be due to invalid IL or missing references)
			//IL_1fb8: Expected O, but got Unknown
			//IL_2016: Unknown result type (might be due to invalid IL or missing references)
			//IL_2020: Expected O, but got Unknown
			//IL_207e: Unknown result type (might be due to invalid IL or missing references)
			//IL_2088: Expected O, but got Unknown
			//IL_20e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_20f0: Expected O, but got Unknown
			//IL_214e: Unknown result type (might be due to invalid IL or missing references)
			//IL_2158: Expected O, but got Unknown
			//IL_218d: Unknown result type (might be due to invalid IL or missing references)
			//IL_2197: Expected O, but got Unknown
			//IL_21cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_21d7: Expected O, but got Unknown
			//IL_220d: Unknown result type (might be due to invalid IL or missing references)
			//IL_2217: Expected O, but got Unknown
			//IL_2258: Unknown result type (might be due to invalid IL or missing references)
			//IL_2262: Expected O, but got Unknown
			//IL_22cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_22d6: Expected O, but got Unknown
			//IL_2340: Unknown result type (might be due to invalid IL or missing references)
			//IL_234a: Expected O, but got Unknown
			//IL_23b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_23be: Expected O, but got Unknown
			//IL_2428: Unknown result type (might be due to invalid IL or missing references)
			//IL_2432: Expected O, but got Unknown
			//IL_249c: Unknown result type (might be due to invalid IL or missing references)
			//IL_24a6: Expected O, but got Unknown
			//IL_2505: Unknown result type (might be due to invalid IL or missing references)
			//IL_250f: Expected O, but got Unknown
			//IL_2544: Unknown result type (might be due to invalid IL or missing references)
			//IL_254e: Expected O, but got Unknown
			//IL_2583: Unknown result type (might be due to invalid IL or missing references)
			//IL_258d: Expected O, but got Unknown
			//IL_25c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_25cc: Expected O, but got Unknown
			//IL_2601: Unknown result type (might be due to invalid IL or missing references)
			//IL_260b: Expected O, but got Unknown
			//IL_2640: Unknown result type (might be due to invalid IL or missing references)
			//IL_264a: Expected O, but got Unknown
			//IL_268a: Unknown result type (might be due to invalid IL or missing references)
			//IL_2694: Expected O, but got Unknown
			//IL_26fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_2707: Expected O, but got Unknown
			//IL_2770: Unknown result type (might be due to invalid IL or missing references)
			//IL_277a: Expected O, but got Unknown
			//IL_27e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_27ed: Expected O, but got Unknown
			//IL_284b: Unknown result type (might be due to invalid IL or missing references)
			//IL_2855: Expected O, but got Unknown
			//IL_28c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_28cf: Expected O, but got Unknown
			//IL_292d: Unknown result type (might be due to invalid IL or missing references)
			//IL_2937: Expected O, but got Unknown
			//IL_2995: Unknown result type (might be due to invalid IL or missing references)
			//IL_299f: Expected O, but got Unknown
			//IL_2a2c: Unknown result type (might be due to invalid IL or missing references)
			//IL_2a36: Expected O, but got Unknown
			HideBepInEx();
			ConfigInstance = ((BaseUnityPlugin)this).Config;
			Log = ((BaseUnityPlugin)this).Logger;
			PopupManager = ((Component)this).gameObject.AddComponent<PopupManager>();
			EnableLogging = ConfigInstance.Bind<bool>("01. General", "Enable Logging", false, new ConfigDescription("Enable/disable logging.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 5
				}
			}));
			EnableLogging.SettingChanged += delegate
			{
				ConfigCache.MarkDirty("EnableLogging");
			};
			SkipDevIntros = ConfigInstance.Bind<bool>("01. General", "Skip Intros", false, new ConfigDescription("Skip splash screens.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 3
				}
			}));
			SkipCrownVideo = ConfigInstance.Bind<bool>("01. General", "Skip Crown Video", false, new ConfigDescription("Skips the video when the lamb gets given the crown.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 2
				}
			}));
			UnlockTwitchItems = ConfigInstance.Bind<bool>("01. General", "Unlock Twitch Items", false, new ConfigDescription("Unlock pre-order DLC, Twitch plush, and Twitch drops. Paid DLC is excluded on purpose.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 1
				}
			}));
			RemoveMenuClutter = ConfigInstance.Bind<bool>("02. Menu Cleanup", "Remove Extra Menu Buttons", false, new ConfigDescription("Removes credits/road-map/discord buttons from the menus.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 6
				}
			}));
			RemoveTwitchButton = ConfigInstance.Bind<bool>("02. Menu Cleanup", "Remove Twitch Buttons", false, new ConfigDescription("Removes twitch buttons from the menus.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 5
				}
			}));
			DisableAds = ConfigInstance.Bind<bool>("02. Menu Cleanup", "Disable Ads", false, new ConfigDescription("Disables the new ad 'feature'.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 4
				}
			}));
			DisableAds.SettingChanged += delegate
			{
				InvalidateConfigCache();
			};
			RemoveHelpButtonInPauseMenu = ConfigInstance.Bind<bool>("02. Menu Cleanup", "Remove Help Button In Pause Menu", false, new ConfigDescription("Removes the help button in the pause menu.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 3
				}
			}));
			RemoveTwitchButtonInPauseMenu = ConfigInstance.Bind<bool>("02. Menu Cleanup", "Remove Twitch Button In Pause Menu", false, new ConfigDescription("Removes the twitch button in the pause menu.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 2
				}
			}));
			RemovePhotoModeButtonInPauseMenu = ConfigInstance.Bind<bool>("02. Menu Cleanup", "Remove Photo Mode Button In Pause Menu", false, new ConfigDescription("Removes the photo mode button in the pause menu.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 1
				}
			}));
			MainMenuGlitch = ConfigInstance.Bind<bool>("02. Menu Cleanup", "Main Menu Glitch", true, new ConfigDescription("Controls the sudden dark-mode switch effect.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 0
				}
			}));
			MainMenuGlitch.SettingChanged += delegate
			{
				UpdateMenuGlitch();
			};
			ReverseGoldenFleeceDamageChange = ConfigInstance.Bind<bool>("03. Golden Fleece", "Reverse Golden Fleece Change", false, new ConfigDescription("Reverts the default damage increase to 10% instead of 5%.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 4
				}
			}));
			FleeceDamageMulti = ConfigInstance.Bind<float>("03. Golden Fleece", "Fleece Damage Multiplier", 1f, new ConfigDescription("The custom damage multiplier to use. Based off the games default 5%.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(-10f, 10f), new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 1
				}
			}));
			FleeceDamageMulti.SettingChanged += delegate
			{
				FleeceDamageMulti.Value = Mathf.Round(FleeceDamageMulti.Value * 4f) / 4f;
			};
			EasyFishing = ConfigInstance.Bind<bool>("04. Game Mechanics", "Disable Fishing Mini-Game", false, new ConfigDescription("Fishing mini-game cheese. Just cast and let the mod do the rest.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					DispName = "Disable Fishing Mini-Game**",
					Order = 5
				}
			}));
			EasyFishing.SettingChanged += delegate
			{
				ShowRestartMessage();
			};
			DisableGameOver = ConfigInstance.Bind<bool>("04. Game Mechanics", "No More Game-Over", false, new ConfigDescription("Disables the game over function when you have 0 followers for consecutive days.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 4
				}
			}));
			ThriceMultiplyTarotCardLuck = ConfigInstance.Bind<bool>("04. Game Mechanics", "3x Tarot Luck", false, new ConfigDescription("Luck changes with game difficulty, this will multiply your luck multiplier by 3 for drawing rarer tarot cards.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 3
				}
			}));
			RareTarotCardsOnly = ConfigInstance.Bind<bool>("04. Game Mechanics", "Rare Tarot Cards Only", false, new ConfigDescription("Only draw rare tarot cards.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 2
				}
			}));
			SinBossLimit = ConfigInstance.Bind<int>("04. Game Mechanics", "Sin Boss Limit", 3, new ConfigDescription("Bishop kills required to unlock Sin. Default is 3.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 5), new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 1
				}
			}));
			BaseDamageMultiplier = ConfigInstance.Bind<float>("05. Player Damage", "Base Damage Multiplier", 1f, new ConfigDescription("The base damage multiplier to use.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(-10f, 10f), new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 5
				}
			}));
			BaseDamageMultiplier.SettingChanged += delegate
			{
				BaseDamageMultiplier.Value = Mathf.Round(BaseDamageMultiplier.Value * 4f) / 4f;
			};
			RunSpeedMulti = ConfigInstance.Bind<float>("05. Player Damage", "Run Speed Multiplier", 1f, new ConfigDescription("How much faster the player runs.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(-10f, 10f), new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 7
				}
			}));
			RunSpeedMulti.SettingChanged += delegate
			{
				RunSpeedMulti.Value = Mathf.Round(RunSpeedMulti.Value * 4f) / 4f;
			};
			DisableRunSpeedInDungeons = ConfigInstance.Bind<bool>("05. Player Damage", "Disable Run Speed In Dungeons", true, new ConfigDescription("Disables the run speed multiplier in dungeons.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 6
				}
			}));
			DisableRunSpeedInCombat = ConfigInstance.Bind<bool>("05. Player Damage", "Disable Run Speed In Combat", true, new ConfigDescription("Disables the run speed multiplier in combat.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 5
				}
			}));
			DodgeSpeedMulti = ConfigInstance.Bind<float>("05. Player Damage", "Dodge Speed Multiplier", 1f, new ConfigDescription("How much faster the player dodges.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(-10f, 10f), new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 3
				}
			}));
			DodgeSpeedMulti.SettingChanged += delegate
			{
				DodgeSpeedMulti.Value = Mathf.Round(DodgeSpeedMulti.Value * 4f) / 4f;
			};
			LungeSpeedMulti = ConfigInstance.Bind<float>("05. Player Damage", "Lunge Speed Multiplier", 1f, new ConfigDescription("How much faster the player lunges.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(-10f, 10f), new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 1
				}
			}));
			LungeSpeedMulti.SettingChanged += delegate
			{
				LungeSpeedMulti.Value = Mathf.Round(LungeSpeedMulti.Value * 4f) / 4f;
			};
			SaveOnQuitToDesktop = ConfigInstance.Bind<bool>("06. Saves", "Save On Quit To Desktop", false, new ConfigDescription("Modify the confirmation dialog to save the game when you quit to desktop.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 8
				}
			}));
			SaveOnQuitToMenu = ConfigInstance.Bind<bool>("06. Saves", "Save On Quit To Menu", false, new ConfigDescription("Modify the confirmation dialog to save the game when you quit to menu.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 7
				}
			}));
			HideNewGameButtons = ConfigInstance.Bind<bool>("06. Saves", "Hide New Game Button (s)", false, new ConfigDescription("Hides the new game button if you have at least one save game.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 6
				}
			}));
			EnableQuickSaveShortcut = ConfigInstance.Bind<bool>("06. Saves", "Enable Quick Save Shortcut", false, new ConfigDescription("Enable/disable the quick save keyboard shortcut.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 5
				}
			}));
			EnableQuickSaveShortcut.SettingChanged += delegate
			{
				InvalidateConfigCache();
			};
			SaveKeyboardShortcut = ConfigInstance.Bind<KeyboardShortcut>("06. Saves", "Save Keyboard Shortcut", new KeyboardShortcut((KeyCode)286, Array.Empty<KeyCode>()), new ConfigDescription("The keyboard shortcut to save the game.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 4
				}
			}));
			SaveKeyboardShortcut.SettingChanged += delegate
			{
				InvalidateConfigCache();
			};
			DirectLoadSave = ConfigInstance.Bind<bool>("06. Saves", "Direct Load Save", false, new ConfigDescription("Directly load the specified save game instead of showing the save menu.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 3
				}
			}));
			DirectLoadSave.SettingChanged += delegate
			{
				InvalidateConfigCache();
			};
			DirectLoadSkipKey = ConfigInstance.Bind<KeyboardShortcut>("06. Saves", "Direct Load Skip Key", new KeyboardShortcut((KeyCode)304, Array.Empty<KeyCode>()), new ConfigDescription("The keyboard shortcut to skip the auto-load when loading the game.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 2
				}
			}));
			DirectLoadSkipKey.SettingChanged += delegate
			{
				InvalidateConfigCache();
			};
			SaveSlotToLoad = ConfigInstance.Bind<int>("06. Saves", "Save Slot To Load", 1, new ConfigDescription("The save slot to load.", (AcceptableValueBase)(object)new AcceptableValueList<int>(new int[3] { 1, 2, 3 }), new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 1
				}
			}));
			SaveSlotToLoad.SettingChanged += delegate
			{
				if (!SaveAndLoad.SaveExist(SaveSlotToLoad.Value))
				{
					L("The slot you have select doesn't contain a save game.");
				}
				else
				{
					L($"Save slot to load changed to {SaveSlotToLoad.Value}");
				}
			};
			ChangeWeatherOnPhaseChange = ConfigInstance.Bind<bool>("07. Weather", "Change Weather On Phase Change", false, new ConfigDescription("By default, the game changes weather when you exit a structure, or on a new day. Enabling this makes the weather change on each phase i.e. morning, noon, evening, night.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 9
				}
			}));
			ChangeWeatherOnPhaseChange.SettingChanged += delegate
			{
				ConfigCache.MarkDirty("ChangeWeatherOnPhaseChange");
			};
			RandomWeatherChangeWhenExitingArea = ConfigInstance.Bind<bool>("07. Weather", "Random Weather Change When Exiting Area", false, new ConfigDescription("When exiting a building/area, the weather will change to a random weather type instead of the previous weather.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 8
				}
			}));
			RandomWeatherChangeWhenExitingArea.SettingChanged += delegate
			{
				ConfigCache.MarkDirty("RandomWeatherChangeWhenExitingArea");
			};
			LightSnowColor = ConfigInstance.Bind<Color>("07. Weather", "Light Snow Color", new Color(0.016f, 0f, 1f, 0.15f), new ConfigDescription("Control the colour of the screen when there is light snow.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 7
				}
			}));
			LightWindColor = ConfigInstance.Bind<Color>("07. Weather", "Light Wind Color", new Color(0.016f, 0f, 1f, 0.15f), new ConfigDescription("Control the colour of the screen when there is light wind.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 6
				}
			}));
			LightRainColor = ConfigInstance.Bind<Color>("07. Weather", "Light Rain Color", new Color(0.016f, 0f, 1f, 0.15f), new ConfigDescription("Control the colour of the screen when there is light rain.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 5
				}
			}));
			MediumRainColor = ConfigInstance.Bind<Color>("07. Weather", "Medium Rain Color", new Color(0.016f, 0f, 1f, 0.15f), new ConfigDescription("Control the colour of the screen when there is medium rain.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 4
				}
			}));
			HeavyRainColor = ConfigInstance.Bind<Color>("07. Weather", "Heavy Rain Color", new Color(0.016f, 0f, 1f, 0.45f), new ConfigDescription("Control the colour of the screen when there is heavy rain.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 3
				}
			}));
			WeatherDropDown = ConfigInstance.Bind<Weather.WeatherCombo>("07. Weather", "Weather Dropdown", Weather.WeatherCombo.HeavyRain, new ConfigDescription("Select the type of weather you want to test to see the effect your chosen colour has.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 2
				}
			}));
			ConfigInstance.Bind<bool>("07. Weather", "Test Weather", true, new ConfigDescription("Test Weather Color", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 1,
					HideDefaultButton = true,
					CustomDrawer = TestWeather
				}
			}));
			LumberAndMiningStationsDontAge = ConfigInstance.Bind<bool>("08. Mines", "Infinite Lumber & Mining Stations", false, new ConfigDescription("Lumber and mining stations should never run out and collapse. Takes 1st priority.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 3
				}
			}));
			LumberAndMiningStationsDontAge.SettingChanged += delegate
			{
				ConfigCache.MarkDirty("LumberAndMiningStationsDontAge");
			};
			LumberAndMiningStationsAgeMultiplier = ConfigInstance.Bind<float>("08. Mines", "Lumber & Mining Stations Age Multiplier", 1f, new ConfigDescription("How much slower (or faster) the lumber and mining stations age. Default is 1.0f.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(-10f, 10f), new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 2
				}
			}));
			LumberAndMiningStationsAgeMultiplier.SettingChanged += delegate
			{
				ConfigCache.MarkDirty("LumberAndMiningStationsAgeMultiplier");
			};
			LumberAndMiningStationsAgeMultiplier.SettingChanged += delegate
			{
				LumberAndMiningStationsAgeMultiplier.Value = Mathf.Round(LumberAndMiningStationsAgeMultiplier.Value * 4f) / 4f;
			};
			TurnOffSpeakersAtNight = ConfigInstance.Bind<bool>("09. Structures", "Turn Off Speakers At Night", false, new ConfigDescription("Turns the speakers off, and stops fuel consumption at night time.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 9
				}
			}));
			TurnOffSpeakersAtNight.SettingChanged += delegate
			{
				ConfigCache.MarkDirty("TurnOffSpeakersAtNight");
			};
			DisablePropagandaSpeakerAudio = ConfigInstance.Bind<bool>("09. Structures", "Disable Propaganda Speaker Audio", false, new ConfigDescription("Disables the audio from propaganda speakers.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 8
				}
			}));
			DisablePropagandaSpeakerAudio.SettingChanged += delegate
			{
				ConfigCache.MarkDirty("DisablePropagandaSpeakerAudio");
			};
			AddExhaustedToHealingBay = ConfigInstance.Bind<bool>("09. Structures", "Add Exhausted To Healing Bay", false, new ConfigDescription("Allows you to select exhausted followers for rest and relaxation in the healing bays.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 7
				}
			}));
			OnlyShowDissenters = ConfigInstance.Bind<bool>("09. Structures", "Only Show Dissenters In Prison Menu", false, new ConfigDescription("Only show dissenting followers when interacting with the prison.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 6
				}
			}));
			AdjustRefineryRequirements = ConfigInstance.Bind<bool>("09. Structures", "Adjust Refinery Requirements", false, new ConfigDescription("Where possible, halves the materials needed to convert items in the refinery. Rounds up.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 5
				}
			}));
			AdjustRefineryRequirements.SettingChanged += delegate
			{
				ConfigCache.MarkDirty("AdjustRefineryRequirements");
			};
			int num = Mathf.RoundToInt(HarvestTotem.EFFECTIVE_DISTANCE);
			HarvestTotemRange = ConfigInstance.Bind<int>("09. Structures", "Harvest Totem Range", num, new ConfigDescription($"The range of the harvest totem. Default is {num}.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(3, 14), new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 4
				}
			}));
			HarvestTotemRange.SettingChanged += delegate
			{
				HarvestTotem.EFFECTIVE_DISTANCE = Mathf.RoundToInt((float)HarvestTotemRange.Value);
			};
			int num2 = Mathf.RoundToInt(Structures_PropagandaSpeaker.EFFECTIVE_DISTANCE);
			PropagandaSpeakerRange = ConfigInstance.Bind<int>("09. Structures", "Propaganda Speaker Range", num2, new ConfigDescription($"The range of the propaganda speaker. Default is {num2}.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 20), new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 3
				}
			}));
			PropagandaSpeakerRange.SettingChanged += delegate
			{
				Structures_PropagandaSpeaker.EFFECTIVE_DISTANCE = Mathf.RoundToInt((float)PropagandaSpeakerRange.Value);
			};
			FarmStationRange = ConfigInstance.Bind<int>("09. Structures", "Farm Station Range", 6, new ConfigDescription("The range of the farm station. Default is 6.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 20), new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 2
				}
			}));
			FarmPlotSignRange = ConfigInstance.Bind<int>("09. Structures", "Farm Plot Range", 5, new ConfigDescription("The range of the farm plot sign. Default is 5.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 20), new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 1
				}
			}));
			FarmPlotSignRange = ConfigInstance.Bind<int>("09. Structures", "Farm Plot Sign Range", 5, new ConfigDescription("The range of the farm plot sign. Default is 5.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 20), new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 0
				}
			}));
			CookedMeatMealsContainBone = ConfigInstance.Bind<bool>("09. Structures", "Cooked Meat Meals Contain Bone", false, new ConfigDescription("Meat + fish meals will spawn 1 - 3 bones when cooked.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = -1
				}
			}));
			CookedMeatMealsContainBone.SettingChanged += delegate
			{
				ConfigCache.MarkDirty("CookedMeatMealsContainBone");
			};
			AddSpiderWebsToOfferings = ConfigInstance.Bind<bool>("09. Structures", "Add Spider Webs To Offerings", false, new ConfigDescription("Adds Spider Webs to the Offering Shrines default offerings.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = -2
				}
			}));
			AddSpiderWebsToOfferings.SettingChanged += delegate
			{
				ConfigCache.MarkDirty("AddSpiderWebsToOfferings");
			};
			AddCrystalShardsToOfferings = ConfigInstance.Bind<bool>("09. Structures", "Add Crystals To Offerings", false, new ConfigDescription("Adds Crystal Shards to the Offering Shrines rare offerings.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = -3
				}
			}));
			AddCrystalShardsToOfferings.SettingChanged += delegate
			{
				ConfigCache.MarkDirty("AddCrystalShardsToOfferings");
			};
			ProduceSpiderWebsFromLumber = ConfigInstance.Bind<bool>("09. Structures", "Lumber Stations Produce Spider Webs", false, new ConfigDescription("Lumber stations will produce spider webs from logs collected.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = -4
				}
			}));
			ProduceSpiderWebsFromLumber.SettingChanged += delegate
			{
				ConfigCache.MarkDirty("ProduceSpiderWebsFromLumber");
			};
			SpiderWebsPerLogs = ConfigInstance.Bind<int>("09. Structures", "Spider Webs Per Logs", 5, new ConfigDescription("Number of logs needed to produce 1 spider web.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 20), new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = -5
				}
			}));
			SpiderWebsPerLogs.SettingChanged += delegate
			{
				ConfigCache.MarkDirty("SpiderWebsPerLogs");
			};
			ProduceCrystalShardsFromStone = ConfigInstance.Bind<bool>("09. Structures", "Mining Stations Produce Crystal Shards", false, new ConfigDescription("Mining stations will produce crystal shards from stone collected.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = -6
				}
			}));
			ProduceCrystalShardsFromStone.SettingChanged += delegate
			{
				ConfigCache.MarkDirty("ProduceCrystalShardsFromStone");
			};
			CrystalShardsPerStone = ConfigInstance.Bind<int>("09. Structures", "Crystal Shards Per Stone", 5, new ConfigDescription("Number of stone needed to produce 1 crystal shard.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 20), new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = -7
				}
			}));
			CrystalShardsPerStone.SettingChanged += delegate
			{
				ConfigCache.MarkDirty("CrystalShardsPerStone");
			};
			EnableGameSpeedManipulation = ConfigInstance.Bind<bool>("10. Game Speed", "Enable Game Speed Manipulation", false, new ConfigDescription("Use left/right arrows keys to increase/decrease game speed in 0.25 increments. Up arrow to reset to default.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 8
				}
			}));
			ShortenGameSpeedIncrements = ConfigInstance.Bind<bool>("10. Game Speed", "Shorten Game Speed Increments", false, new ConfigDescription("Increments in steps of 1, instead of 0.25.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 7
				}
			}));
			ResetTimeScaleKey = ConfigInstance.Bind<KeyboardShortcut>("10. Game Speed", "Reset Time Scale Key", new KeyboardShortcut((KeyCode)273, Array.Empty<KeyCode>()), new ConfigDescription("The keyboard shortcut to reset the game speed to 1.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 6
				}
			}));
			IncreaseGameSpeedKey = ConfigInstance.Bind<KeyboardShortcut>("10. Game Speed", "Increase Game Speed Key", new KeyboardShortcut((KeyCode)275, Array.Empty<KeyCode>()), new ConfigDescription("The keyboard shortcut to increase the game speed.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 5
				}
			}));
			DecreaseGameSpeedKey = ConfigInstance.Bind<KeyboardShortcut>("10. Game Speed", "Decrease Game Speed Key", new KeyboardShortcut((KeyCode)276, Array.Empty<KeyCode>()), new ConfigDescription("The keyboard shortcut to decrease the game speed.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 4
				}
			}));
			FastCollecting = ConfigInstance.Bind<bool>("10. Game Speed", "Speed Up Collection", false, new ConfigDescription("Increases the rate you can collect from the shrines, and other structures.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					DispName = "Speed Up Collection**",
					Order = 3
				}
			}));
			FastCollecting.SettingChanged += delegate
			{
				ShowRestartMessage();
			};
			SlowDownTimeMultiplier = ConfigInstance.Bind<float>("10. Game Speed", "Slow Down Time Multiplier", 1f, new ConfigDescription("The multiplier to use for slow down time. For example, the default value of 2 is making the day twice as long.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(-10f, 10f), new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 1
				}
			}));
			SlowDownTimeMultiplier.SettingChanged += delegate
			{
				SlowDownTimeMultiplier.Value = Mathf.Round(SlowDownTimeMultiplier.Value * 4f) / 4f;
			};
			FastRitualSermons = ConfigInstance.Bind<bool>("10. Game Speed", "Fast Rituals & Sermons", false, new ConfigDescription("Speeds up rituals and sermons.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 0
				}
			}));
			FastRitualSermons.SettingChanged += delegate
			{
				if (!FastRitualSermons.Value)
				{
					RitualSermonSpeed.RitualRunning = false;
					GameManager.SetTimeScale(1f);
				}
			};
			RitualCooldownTime = ConfigInstance.Bind<float>("10. Game Speed", "Ritual Cooldown Time Multiplier", 1f, new ConfigDescription("Scales ritual cooldown duration.\n• 2.0 = Double cooldown (slower)\n• 1.0 = Normal cooldown\n• 0.5 = 50% of normal (faster)\n• 0.25 = 25% of normal (much faster)\n\nDrag left to reduce cooldown time.\nAllowed range: 0.1x to 2.0x.\n\n<i>Note: Applies only to newly performed rituals.</i>", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.1f, 2f), new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 0
				}
			}));
			RitualCooldownTime.SettingChanged += delegate
			{
				RitualCooldownTime.Value = Mathf.Round(RitualCooldownTime.Value * 4f) / 4f;
			};
			EnableAutoCollect = ConfigInstance.Bind<bool>("11. Auto-Interact (Chests)", "Enable Auto Collect", false, new ConfigDescription("Makes chests automatically send you the resources when you're nearby.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 6,
					DispName = "Enable Auto Collect**"
				}
			}));
			EnableAutoCollect.SettingChanged += delegate
			{
				ShowRestartMessage();
			};
			AutoCollectFromFarmStationChests = ConfigInstance.Bind<bool>("11. Auto-Interact (Chests)", "Auto Collect From Farm Station Chests", false, new ConfigDescription("Automatically collect from farm station chests.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 5
				}
			}));
			TriggerAmount = ConfigInstance.Bind<int>("11. Auto-Interact (Chests)", "Trigger Amount", 5, new ConfigDescription("The amount of resources needed to trigger the auto-interact.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 100), new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 4,
					ShowRangeAsPercent = false
				}
			}));
			AutoInteractRangeMulti = ConfigInstance.Bind<float>("11. Auto-Interact (Chests)", "Loot Magnet Range Multiplier", 1f, new ConfigDescription("Enter a multiplier to use for auto-collect range when using custom range.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(-10f, 10f), new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 1
				}
			}));
			AutoInteractRangeMulti.SettingChanged += delegate
			{
				AutoInteractRangeMulti.Value = Mathf.Round(AutoInteractRangeMulti.Value * 4f) / 4f;
			};
			UseMultiplesOf32 = ConfigInstance.Bind<bool>("12. Capacities", "Use Multiples of 32", true, new ConfigDescription("Use multiples of 32 for silo capacity.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 7
				}
			}));
			UseMultiplesOf32.SettingChanged += delegate
			{
				ConfigCache.MarkDirty("UseMultiplesOf32");
			};
			SiloCapacityMulti = ConfigInstance.Bind<float>("12. Capacities", "Silo Capacity Multiplier", 1f, new ConfigDescription("Enter a multiplier to use for silo capacity when using custom capacity.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(-10f, 10f), new object[2]
			{
				null,
				new ConfigurationManagerAttributes
				{
					Order = 4
				}
			}));
			SiloCapacityMulti.SettingChanged += delegate
			{
				SiloCapacityMulti.Value = Mathf.Round(SiloCapacityMulti.Value * 4f) / 4f;
				ConfigCache.MarkDirty("SiloCapacityMulti");
			};
			SoulCapacityMulti = ConfigInstance.Bind<float>("12. Capacities", "Soul Capacity Multiplier", 1f, new ConfigDescription("Enter a multiplier to use for soul capacity when using custom capacity.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(-10f, 10f), new object[2]
			{
				null,
				new ConfigurationManagerAttributes
				{
					Order = 1
				}
			}));
			SoulCapacityMulti.SettingChanged += delegate
			{
				SoulCapacityMulti.Value = Mathf.Round(SoulCapacityMulti.Value * 4f) / 4f;
				ConfigCache.MarkDirty("SoulCapacityMulti");
			};
			NotifyOfScarecrowTraps = ConfigInstance.Bind<bool>("13. Notifications", "Notify of Scarecrow Traps", false, new ConfigDescription("Display a notification when the farm scarecrows have caught a trap!", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 5
				}
			}));
			NotifyOfNoFuel = ConfigInstance.Bind<bool>("13. Notifications", "Notify of No Fuel", false, new ConfigDescription("Display a notification when a structure has run out of fuel.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 4
				}
			}));
			NotifyOfBedCollapse = ConfigInstance.Bind<bool>("13. Notifications", "Notify of Bed Collapse", false, new ConfigDescription("Display a notification when a bed has collapsed.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 3
				}
			}));
			ShowPhaseNotifications = ConfigInstance.Bind<bool>("13. Notifications", "Phase Notifications", false, new ConfigDescription("Show a notification when the time of day changes.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 2
				}
			}));
			ShowPhaseNotifications.SettingChanged += delegate
			{
				ConfigCache.MarkDirty("ShowPhaseNotifications");
			};
			ShowWeatherChangeNotifications = ConfigInstance.Bind<bool>("13. Notifications", "Weather Change Notifications", false, new ConfigDescription("Show a notification when the weather changes.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 1
				}
			}));
			ShowWeatherChangeNotifications.SettingChanged += delegate
			{
				ConfigCache.MarkDirty("ShowWeatherChangeNotifications");
			};
			GiveFollowersNewNecklaces = ConfigInstance.Bind<bool>("14. Followers", "Give Followers New Necklaces", false, new ConfigDescription("Followers will be able to receive new necklaces, with the old one being returned to you.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 8
				}
			}));
			CleanseIllnessAndExhaustionOnLevelUp = ConfigInstance.Bind<bool>("14. Followers", "Cleanse Illness and Exhaustion", false, new ConfigDescription("When a follower 'levels up', if they are sick or exhausted, the status is cleansed.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 7
				}
			}));
			CollectTitheFromOldFollowers = ConfigInstance.Bind<bool>("14. Followers", "Collect Tithe From Old Followers", false, new ConfigDescription("Enable collecting tithe from the elderly.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 6
				}
			}));
			IntimidateOldFollowers = ConfigInstance.Bind<bool>("14. Followers", "Intimidate Old Followers", false, new ConfigDescription("Enable intimidating the elderly.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 5
				}
			}));
			RemoveLevelLimit = ConfigInstance.Bind<bool>("14. Followers", "Remove Level Limit", false, new ConfigDescription("Removes the level limit for followers. They can now level up infinitely.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 4
				}
			}));
			MakeOldFollowersWork = ConfigInstance.Bind<bool>("14. Followers", "Make Old Followers Work", false, new ConfigDescription("Enable the elderly to work.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					DispName = "Make Old Followers Work**",
					Order = 3
				}
			}));
			MakeOldFollowersWork.SettingChanged += delegate
			{
				ShowRestartMessage();
			};
			MinRangeLifeExpectancy = ConfigInstance.Bind<int>("14. Followers", "Minimum Range Life Expectancy", 40, new ConfigDescription("The lowest possible life expectancy a follower can have. The game will randomly choose a value between this and the maximum value below. This must be less than the maximum.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 100), new object[1]
			{
				new ConfigurationManagerAttributes
				{
					ShowRangeAsPercent = false,
					Order = 2
				}
			}));
			MinRangeLifeExpectancy.SettingChanged += delegate
			{
				EnforceRangeSanity();
			};
			MaxRangeLifeExpectancy = ConfigInstance.Bind<int>("14. Followers", "Maximum Range Life Expectancy", 55, new ConfigDescription("The highest possible life expectancy a follower can have. The game will randomly choose a value between the minimum above and this value.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 100), new object[1]
			{
				new ConfigurationManagerAttributes
				{
					ShowRangeAsPercent = false,
					Order = 0
				}
			}));
			MaxRangeLifeExpectancy.SettingChanged += delegate
			{
				EnforceRangeSanity();
			};
			NoNegativeTraits = ConfigInstance.Bind<bool>("15. Traits", "No Negative Traits", false, new ConfigDescription("Negative traits will be replaced based on the configuration here.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 3
				}
			}));
			NoNegativeTraits.SettingChanged += delegate
			{
				UpdateNoNegativeTraits();
			};
			UseUnlockedTraitsOnly = ConfigInstance.Bind<bool>("15. Traits", "Use Unlocked Traits Only", true, new ConfigDescription("Only use unlocked traits when replacing negative traits.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 2
				}
			}));
			UseUnlockedTraitsOnly.SettingChanged += delegate
			{
				GenerateAvailableTraits();
			};
			IncludeImmortal = ConfigInstance.Bind<bool>("15. Traits", "Include Immortal", false, new ConfigDescription("Include the Immortal trait when replacing negative traits.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 1
				}
			}));
			IncludeImmortal.SettingChanged += delegate
			{
				GenerateAvailableTraits();
			};
			IncludeDisciple = ConfigInstance.Bind<bool>("15. Traits", "Include Disciple", false, new ConfigDescription("Include the Disciple trait when replacing negative traits.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 0
				}
			}));
			IncludeDisciple.SettingChanged += delegate
			{
				GenerateAvailableTraits();
			};
			ShowNotificationsWhenRemovingTraits = ConfigInstance.Bind<bool>("15. Traits", "Show Notifications When Removing Traits", false, new ConfigDescription("Show notifications when removing negative traits.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 0
				}
			}));
			ShowNotificationsWhenAddingTraits = ConfigInstance.Bind<bool>("15. Traits", "Show Notifications When Adding Traits", false, new ConfigDescription("Show notifications when adding positive traits.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 0
				}
			}));
			MassFertilize = ConfigInstance.Bind<bool>("16. Mass Actions", "Mass Fertilize", false, new ConfigDescription("When fertilizing a plot, all farm plots are fertilized at once.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 17
				}
			}));
			MassWater = ConfigInstance.Bind<bool>("16. Mass Actions", "Mass Water", false, new ConfigDescription("When watering a plot, all farm plots are watered at once.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 16
				}
			}));
			MassBribe = ConfigInstance.Bind<bool>("16. Mass Actions", "Mass Bribe", false, new ConfigDescription("When bribing a follower, all followers are bribed at once.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					DispName = "Mass Bribe**",
					Order = 15
				}
			}));
			MassBribe.SettingChanged += delegate
			{
				ShowRestartMessage();
			};
			MassBless = ConfigInstance.Bind<bool>("16. Mass Actions", "Mass Bless", false, new ConfigDescription("When blessing a follower, all followers are blessed at once.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					DispName = "Mass Bless**",
					Order = 14
				}
			}));
			MassBless.SettingChanged += delegate
			{
				ShowRestartMessage();
			};
			MassExtort = ConfigInstance.Bind<bool>("16. Mass Actions", "Mass Extort", false, new ConfigDescription("When extorting a follower, all followers are extorted at once.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					DispName = "Mass Extort**",
					Order = 13
				}
			}));
			MassExtort.SettingChanged += delegate
			{
				ShowRestartMessage();
			};
			MassPetDog = ConfigInstance.Bind<bool>("16. Mass Actions", "Mass Pet Dog", false, new ConfigDescription("When petting a a follower, all followers are petted at once.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					DispName = "Mass Pet Dog**",
					Order = 12
				}
			}));
			MassPetDog.SettingChanged += delegate
			{
				ShowRestartMessage();
			};
			MassIntimidate = ConfigInstance.Bind<bool>("16. Mass Actions", "Mass Intimidate", false, new ConfigDescription("When intimidating a follower, all followers are intimidated at once.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					DispName = "Mass Intimidate**",
					Order = 11
				}
			}));
			MassIntimidate.SettingChanged += delegate
			{
				ShowRestartMessage();
			};
			MassInspire = ConfigInstance.Bind<bool>("16. Mass Actions", "Mass Inspire", false, new ConfigDescription("When inspiring a follower, all followers are inspired at once.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					DispName = "Mass Inspire**",
					Order = 10
				}
			}));
			MassInspire.SettingChanged += delegate
			{
				ShowRestartMessage();
			};
			MassCollectFromBeds = ConfigInstance.Bind<bool>("16. Mass Actions", "Mass Collect From Beds", false, new ConfigDescription("When collecting resources from a bed, all beds are collected from at once.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 9
				}
			}));
			MassCollectFromOuthouses = ConfigInstance.Bind<bool>("16. Mass Actions", "Mass Collect From Outhouses", false, new ConfigDescription("When collecting resources from an outhouse, all outhouses are collected from at once.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 8
				}
			}));
			MassCollectFromOfferingShrines = ConfigInstance.Bind<bool>("16. Mass Actions", "Mass Collect From Offering Shrines", false, new ConfigDescription("When collecting resources from an offering shrine, all offering shrines are collected from at once.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 7
				}
			}));
			MassCollectFromPassiveShrines = ConfigInstance.Bind<bool>("16. Mass Actions", "Mass Collect From Passive Shrines", false, new ConfigDescription("When collecting resources from a passive shrine, all passive shrines are collected from at once.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 6
				}
			}));
			MassCollectFromCompost = ConfigInstance.Bind<bool>("16. Mass Actions", "Mass Collect From Compost", false, new ConfigDescription("When collecting resources from a compost, all composts are collected from at once.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 5
				}
			}));
			MassCollectFromHarvestTotems = ConfigInstance.Bind<bool>("16. Mass Actions", "Mass Collect From Harvest Totems", false, new ConfigDescription("When collecting resources from a harvest totem, all harvest totems are collected from at once.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 4
				}
			}));
			MassRomance = ConfigInstance.Bind<bool>("16. Mass Actions", "Mass Romance", false, new ConfigDescription("When romancing a follower, all followers are romanced at once.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					DispName = "Mass Romance**",
					Order = 3
				}
			}));
			MassRomance.SettingChanged += delegate
			{
				ShowRestartMessage();
			};
			MassBully = ConfigInstance.Bind<bool>("16. Mass Actions", "Mass Bully", false, new ConfigDescription("When bullying a follower, all followers are bullied at once.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					DispName = "Mass Bully**",
					Order = 2
				}
			}));
			MassBully.SettingChanged += delegate
			{
				ShowRestartMessage();
			};
			MassReassure = ConfigInstance.Bind<bool>("16. Mass Actions", "Mass Reassure", false, new ConfigDescription("When reassuring a follower, all followers are reassured at once.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					DispName = "Mass Reassure**",
					Order = 1
				}
			}));
			MassReassure.SettingChanged += delegate
			{
				ShowRestartMessage();
			};
			MassReeducate = ConfigInstance.Bind<bool>("16. Mass Actions", "Mass Reeducate", false, new ConfigDescription("When reeducating a follower, all followers are reeducated at once.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					DispName = "Mass Reeducate**",
					Order = 0
				}
			}));
			MassReeducate.SettingChanged += delegate
			{
				ShowRestartMessage();
			};
			AllLootMagnets = ConfigInstance.Bind<bool>("17. Loot", "All Loot Magnets", false, new ConfigDescription("All loot is magnetized to you.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 0
				}
			}));
			AllLootMagnets.SettingChanged += delegate
			{
				UpdateAllMagnets();
			};
			MagnetRangeMultiplier = ConfigInstance.Bind<float>("17. Loot", "Magnet Range Multiplier", 1f, new ConfigDescription("Apply a multiplier to the magnet range.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(-10f, 10f), new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 0
				}
			}));
			MagnetRangeMultiplier.SettingChanged += delegate
			{
				MagnetRangeMultiplier.Value = MagnetRangeMultiplier.Value * 4f / 4f;
				UpdateCustomMagnet();
			};
			VignetteEffect = ConfigInstance.Bind<bool>("18. Post Processing", "Vignette Effect", true, new ConfigDescription("Enable/disable the vignette effect.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 0
				}
			}));
			VignetteEffect.SettingChanged += delegate
			{
				PostProcessing.ToggleVignette();
			};
			ReverseEnrichmentNerf = ConfigInstance.Bind<bool>("19. Rituals", "Reverse Enrichment Nerf", false, new ConfigDescription("Reverts the nerf to the Ritual of Enrichment. Enabling this will automatically enable remove follower level cap.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 0
				}
			}));
			ReverseEnrichmentNerf.SettingChanged += delegate
			{
				if (ReverseEnrichmentNerf.Value && !RemoveLevelLimit.Value)
				{
					Log.LogInfo((object)"Enabling 'Remove Level Limit' as it is required for 'Reverse Enrichment Nerf'.");
					RemoveLevelLimit.Value = true;
				}
			};
			ConfigInstance.Bind<bool>("20. Reset All Settings", "Reset All Settings", false, new ConfigDescription("Set this to true and save the config file to reset all settings to default.", (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 0,
					HideDefaultButton = true,
					CustomDrawer = ResetAll
				}
			}));
			Harmony.CreateAndPatchAll(Assembly.GetExecutingAssembly(), "p1xel8ted.cotl.CultOfQoLCollection");
			SceneManager.sceneLoaded += OnSceneLoaded;
			Helpers.PrintModLoaded("The Cult of QoL Collection", ((BaseUnityPlugin)this).Logger);
		}

		private static void ResetAll(ConfigEntryBase entry)
		{
			if (_showConfirmationDialog)
			{
				DisplayConfirmationDialog();
			}
			else if (GUILayout.Button("Reset All Settings", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }))
			{
				_showConfirmationDialog = true;
			}
		}

		private static void DisplayConfirmationDialog()
		{
			GUILayout.Label("Are you sure you want to reset to default settings?", Array.Empty<GUILayoutOption>());
			GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
			if (GUILayout.Button("Yes", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }))
			{
				RecommendedSettingsAction();
				_showConfirmationDialog = false;
			}
			if (GUILayout.Button("No", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }))
			{
				_showConfirmationDialog = false;
			}
			GUILayout.EndHorizontal();
		}

		private static void RecommendedSettingsAction()
		{
			if (!(AccessTools.PropertyGetter(typeof(ConfigFile), "Entries").Invoke(ConfigInstance, null) is Dictionary<ConfigDefinition, ConfigEntryBase> source))
			{
				Log.LogError((object)"[Config] Unable to access config entries for reset.");
				return;
			}
			foreach (KeyValuePair<ConfigDefinition, ConfigEntryBase> item in from ent in source
				where ent.Value.BoxedValue != ent.Value.DefaultValue
				where ent.Key.Section != "20. Reset All Settings"
				select ent)
			{
				item.Value.BoxedValue = item.Value.DefaultValue;
				Log.LogInfo((object)$"[Config] Resetting {item.Key} to default value: {item.Value.DefaultValue}");
			}
		}

		private static void EnforceRangeSanity()
		{
			int value = MinRangeLifeExpectancy.Value;
			int value2 = MaxRangeLifeExpectancy.Value;
			if (value >= value2)
			{
				if (value > 1)
				{
					MinRangeLifeExpectancy.Value = value2 - 1;
					Log.LogWarning((object)$"[Config] Min was >= Max — adjusted Min to {value2 - 1}");
				}
				else if (value2 < 100)
				{
					MaxRangeLifeExpectancy.Value = value + 1;
					Log.LogWarning((object)$"[Config] Min was >= Max — adjusted Max to {value + 1}");
				}
				else
				{
					MinRangeLifeExpectancy.Value = 40;
					MaxRangeLifeExpectancy.Value = 55;
					Log.LogWarning((object)"[Config] Min/Max invalid and unresolvable — reset to defaults.");
				}
			}
		}

		private static void TestWeather(ConfigEntryBase entry)
		{
			if (!GUILayout.Button("Test Weather", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }))
			{
				return;
			}
			WeatherSystemController instance = WeatherSystemController.Instance;
			if (Object.op_Implicit((Object)(object)instance))
			{
				switch (WeatherDropDown.Value)
				{
				case Weather.WeatherCombo.LightRain:
					instance.SetWeather((WeatherType)1, (WeatherStrength)0, 2f);
					break;
				case Weather.WeatherCombo.MediumRain:
					instance.SetWeather((WeatherType)1, (WeatherStrength)1, 2f);
					break;
				case Weather.WeatherCombo.HeavyRain:
					instance.SetWeather((WeatherType)1, (WeatherStrength)2, 2f);
					break;
				case Weather.WeatherCombo.LightSnow:
					instance.SetWeather((WeatherType)3, (WeatherStrength)0, 2f);
					break;
				case Weather.WeatherCombo.LightWind:
					instance.SetWeather((WeatherType)2, (WeatherStrength)0, 2f);
					break;
				default:
					throw new ArgumentOutOfRangeException();
				}
			}
		}

		private static void UpdateNoNegativeTraits()
		{
			if (IsNoNegativePresent())
			{
				NoNegativeTraits.Value = false;
			}
			else if (NoNegativeTraits.Value)
			{
				CultOfQoL.Patches.Followers.NoNegativeTraits.UpdateAllFollowerTraits();
			}
			else
			{
				CultOfQoL.Patches.Followers.NoNegativeTraits.RestoreOriginalTraits();
			}
		}

		private static void GenerateAvailableTraits()
		{
			if (!IsNoNegativePresent())
			{
				CultOfQoL.Patches.Followers.NoNegativeTraits.GenerateAvailableTraits();
			}
		}

		private static void UpdateNavigationMode()
		{
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			MMButton[] array = Resources.FindObjectsOfTypeAll<MMButton>();
			MMButton[] array2 = array;
			foreach (MMButton val in array2)
			{
				Selectable selectable = val.Selectable;
				Navigation navigation = val.Selectable.navigation;
				((Navigation)(ref navigation)).mode = (Mode)3;
				selectable.navigation = navigation;
			}
		}

		private static void UpdateAllMagnets()
		{
			if (AllLootMagnets.Value)
			{
				PickUps.UpdateAllPickUps();
			}
			else
			{
				PickUps.RestoreAllPickUps();
			}
		}

		private static void UpdateCustomMagnet()
		{
			if (!Mathf.Approximately(MagnetRangeMultiplier.Value, 1f))
			{
				PickUps.UpdateAllPickUps();
			}
		}

		private static void OnSceneLoaded(Scene arg0, LoadSceneMode arg1)
		{
			UpdateMenuGlitch();
			UpdateNavigationMode();
			UpdateAllMagnets();
		}

		private static void UpdateMenuGlitch()
		{
			MainMenuController val = Object.FindObjectOfType<MainMenuController>();
			if (Object.op_Implicit((Object)(object)val))
			{
				val.doIntroGlitch = MainMenuGlitch.Value;
			}
		}

		public static void L(string message)
		{
			if (ConfigCache.GetCachedValue("EnableLogging", () => EnableLogging.Value))
			{
				Log.LogInfo((object)message);
			}
		}

		private static void ShowRestartMessage()
		{
			if (!PopupManager.ShowPopup)
			{
				PopupManager.ShowPopupDlg("You must restart the game for these changes to take effect, as in totally exit to desktop and restart the game.\n\n** indicates a restart is required if the setting is changed.", showCloseAndDontShowAgain: true);
			}
		}

		private static bool IsNoNegativePresent()
		{
			if (!CultOfQoL.Patches.Followers.NoNegativeTraits.IsNothingNegativePresent())
			{
				return false;
			}
			PopupManager.ShowPopupDlg("You have the 'Nothing Negative' mod by voidptr installed. Please remove it to use Cult of QoL's No Negative Traits feature.", showCloseAndDontShowAgain: false);
			return true;
		}

		private static void HideBepInEx()
		{
			((Object)Chainloader.ManagerObject).hideFlags = (HideFlags)61;
			((Object)((Component)ThreadingHelper.Instance).gameObject).hideFlags = (HideFlags)61;
			Object.DontDestroyOnLoad((Object)(object)Chainloader.ManagerObject);
			Object.DontDestroyOnLoad((Object)(object)((Component)ThreadingHelper.Instance).gameObject);
		}

		private void RefreshConfigCache()
		{
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			_cachedDirectLoadValue = DirectLoadSave.Value;
			_cachedEnableQuickSaveValue = EnableQuickSaveShortcut.Value;
			_cachedDisableAdsValue = DisableAds.Value;
			_cachedDirectLoadSkipKey = DirectLoadSkipKey.Value;
			_cachedSaveShortcut = SaveKeyboardShortcut.Value;
			_configCacheValid = true;
		}

		private void InvalidateConfigCache()
		{
			_configCacheValid = false;
		}

		private void Update()
		{
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			if (!_configCacheValid)
			{
				RefreshConfigCache();
			}
			if (_cachedDirectLoadValue && (((KeyboardShortcut)(ref _cachedDirectLoadSkipKey)).IsPressed() || ((KeyboardShortcut)(ref _cachedDirectLoadSkipKey)).IsUp() || ((KeyboardShortcut)(ref _cachedDirectLoadSkipKey)).IsDown()))
			{
				if (!MenuCleanupPatches.SkipAutoLoad)
				{
					Log.LogWarning((object)$"{((KeyboardShortcut)(ref _cachedDirectLoadSkipKey)).MainKey} pressed; skipping auto-load.");
				}
				MenuCleanupPatches.SkipAutoLoad = true;
			}
			if (_cachedEnableQuickSaveValue && ((KeyboardShortcut)(ref _cachedSaveShortcut)).IsUp())
			{
				SaveAndLoad.Save();
				NotificationCentre.Instance.PlayGenericNotification("Game Saved!", (Flair)0);
			}
			if (!_cachedDisableAdsValue)
			{
				return;
			}
			if (!Object.op_Implicit((Object)(object)_cachedUIMainMenuController))
			{
				_cachedUIMainMenuController = UIMainMenuController;
			}
			if (!Object.op_Implicit((Object)(object)_cachedUIMainMenuController))
			{
				return;
			}
			if (_cachedAdComponents == null)
			{
				_cachedAdComponents = ((Component)_cachedUIMainMenuController.ad).GetComponents<Component>();
			}
			if (((Component)_cachedUIMainMenuController.ad).gameObject.activeSelf)
			{
				Component[] cachedAdComponents = _cachedAdComponents;
				foreach (Component val in cachedAdComponents)
				{
					val.gameObject.SetActive(false);
				}
				((Component)_cachedUIMainMenuController.ad).gameObject.SetActive(false);
			}
		}
	}
}
namespace CultOfQoL.Patches.UI
{
	[HarmonyPatch]
	public static class MenuCleanupPatches
	{
		private static bool ReturningToMenu { get; set; }

		internal static bool SkipAutoLoad { get; set; }

		[HarmonyPostfix]
		[HarmonyPatch(typeof(MainMenu), "Start")]
		public static void MainMenu_Start(ref MainMenu __instance)
		{
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			MMButton[] componentsInChildren = ((Component)__inst