Decompiled source of Quick Menus v0.1.0

plugins/QuickMenus.dll

Decompiled a week ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using HarmonyLib;
using I2.Loc;
using Lamb.UI;
using Lamb.UI.BuildMenu;
using Lamb.UI.Menus.PlayerMenu;
using MMTools;
using Microsoft.CodeAnalysis;
using MonoMod.Utils;
using Shared;
using TMPro;
using UnityEngine;
using src.Extensions;
using src.UI.InfoCards;

[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-Thunderstore")]
[assembly: AssemblyDescription("QuickMenus")]
[assembly: AssemblyFileVersion("0.1.0.0")]
[assembly: AssemblyInformationalVersion("0.1.0+e7805d8de09036b338f108b72c58f7979c7b0810")]
[assembly: AssemblyProduct("QuickMenus")]
[assembly: AssemblyTitle("QuickMenus")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.1.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;
		}
	}
}
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;
}
namespace QuickMenus
{
	internal static class Localization
	{
		private static readonly Dictionary<string, Dictionary<string, string>> Strings = new Dictionary<string, Dictionary<string, string>>
		{
			{
				"English",
				new Dictionary<string, string>
				{
					{ "NameFollowerForms", "Follower Forms" },
					{ "NameBuildMenu", "Build Menu" },
					{ "NameTailorClothing", "Tailor / Clothing" },
					{ "NamePlayerUpgrades", "Player Upgrades / Fleeces" },
					{ "NameEnableFollowerForms", "Enable Follower Forms" },
					{ "NameEnableBuildMenu", "Enable Build Menu" },
					{ "NameEnableTailor", "Enable Tailor" },
					{ "NameEnablePlayerUpgrades", "Enable Player Upgrades" },
					{ "DescFollowerForms", "Open the follower forms/skins collection menu." },
					{ "DescBuildMenu", "Open the build menu." },
					{ "DescTailorClothing", "Open the tailor menu to craft and assign clothing." },
					{ "DescPlayerUpgrades", "Open the player upgrades menu — fleeces, doctrines, and crown abilities." },
					{ "DescEnableFollowerForms", "Enable the follower forms hotkey." },
					{ "DescEnableBuildMenu", "Enable the build menu hotkey." },
					{ "DescEnableTailor", "Enable the tailor menu hotkey." },
					{ "DescEnablePlayerUpgrades", "Enable the player upgrades hotkey." },
					{ "Structures", "Structures" },
					{ "Clothing", "Clothing" }
				}
			},
			{
				"French",
				new Dictionary<string, string>
				{
					{ "NameFollowerForms", "Formes de fidèles" },
					{ "NameBuildMenu", "Menu de construction" },
					{ "NameTailorClothing", "Tailleur / Vêtements" },
					{ "NamePlayerUpgrades", "Améliorations / Toisons" },
					{ "NameEnableFollowerForms", "Activer les formes de fidèles" },
					{ "NameEnableBuildMenu", "Activer le menu de construction" },
					{ "NameEnableTailor", "Activer le tailleur" },
					{ "NameEnablePlayerUpgrades", "Activer les améliorations" },
					{ "DescFollowerForms", "Ouvrir le menu de collection de formes/apparences de fidèles." },
					{ "DescBuildMenu", "Ouvrir le menu de construction." },
					{ "DescTailorClothing", "Ouvrir le menu du tailleur pour fabriquer et attribuer des vêtements." },
					{ "DescPlayerUpgrades", "Ouvrir le menu d’améliorations — toisons, doctrines et pouvoirs de la couronne." },
					{ "DescEnableFollowerForms", "Activer le raccourci des formes de fidèles." },
					{ "DescEnableBuildMenu", "Activer le raccourci du menu de construction." },
					{ "DescEnableTailor", "Activer le raccourci du tailleur." },
					{ "DescEnablePlayerUpgrades", "Activer le raccourci des améliorations." },
					{ "Structures", "Structures" },
					{ "Clothing", "Vêtements" }
				}
			},
			{
				"French (Canadian)",
				new Dictionary<string, string>
				{
					{ "NameFollowerForms", "Formes de fidèles" },
					{ "NameBuildMenu", "Menu de construction" },
					{ "NameTailorClothing", "Tailleur / Vêtements" },
					{ "NamePlayerUpgrades", "Améliorations / Toisons" },
					{ "NameEnableFollowerForms", "Activer les formes de fidèles" },
					{ "NameEnableBuildMenu", "Activer le menu de construction" },
					{ "NameEnableTailor", "Activer le tailleur" },
					{ "NameEnablePlayerUpgrades", "Activer les améliorations" },
					{ "DescFollowerForms", "Ouvrir le menu de collection de formes/apparences de fidèles." },
					{ "DescBuildMenu", "Ouvrir le menu de construction." },
					{ "DescTailorClothing", "Ouvrir le menu du tailleur pour fabriquer et attribuer des vêtements." },
					{ "DescPlayerUpgrades", "Ouvrir le menu d’améliorations — toisons, doctrines et pouvoirs de la couronne." },
					{ "DescEnableFollowerForms", "Activer le raccourci des formes de fidèles." },
					{ "DescEnableBuildMenu", "Activer le raccourci du menu de construction." },
					{ "DescEnableTailor", "Activer le raccourci du tailleur." },
					{ "DescEnablePlayerUpgrades", "Activer le raccourci des améliorations." },
					{ "Structures", "Structures" },
					{ "Clothing", "Vêtements" }
				}
			},
			{
				"German",
				new Dictionary<string, string>
				{
					{ "NameFollowerForms", "Anhängerformen" },
					{ "NameBuildMenu", "Baumenü" },
					{ "NameTailorClothing", "Schneider / Kleidung" },
					{ "NamePlayerUpgrades", "Spieler-Upgrades / Vliese" },
					{ "NameEnableFollowerForms", "Anhängerformen aktivieren" },
					{ "NameEnableBuildMenu", "Baumenü aktivieren" },
					{ "NameEnableTailor", "Schneider aktivieren" },
					{ "NameEnablePlayerUpgrades", "Spieler-Upgrades aktivieren" },
					{ "DescFollowerForms", "Öffnet das Menü der Anhängerformen/-skins." },
					{ "DescBuildMenu", "Öffnet das Baumenü." },
					{ "DescTailorClothing", "Öffnet das Schneidermenü zum Herstellen und Zuweisen von Kleidung." },
					{ "DescPlayerUpgrades", "Öffnet das Verbesserungsmenü — Vliese, Doktrinen und Kronenfähigkeiten." },
					{ "DescEnableFollowerForms", "Aktiviert die Tastenkombination für Anhängerformen." },
					{ "DescEnableBuildMenu", "Aktiviert die Tastenkombination für das Baumenü." },
					{ "DescEnableTailor", "Aktiviert die Tastenkombination für den Schneider." },
					{ "DescEnablePlayerUpgrades", "Aktiviert die Tastenkombination für Spieler-Upgrades." },
					{ "Structures", "Gebäude" },
					{ "Clothing", "Kleidung" }
				}
			},
			{
				"Spanish",
				new Dictionary<string, string>
				{
					{ "NameFollowerForms", "Formas de seguidores" },
					{ "NameBuildMenu", "Menú de construcción" },
					{ "NameTailorClothing", "Sastre / Ropa" },
					{ "NamePlayerUpgrades", "Mejoras / Vellones" },
					{ "NameEnableFollowerForms", "Activar formas de seguidores" },
					{ "NameEnableBuildMenu", "Activar menú de construcción" },
					{ "NameEnableTailor", "Activar sastre" },
					{ "NameEnablePlayerUpgrades", "Activar mejoras" },
					{ "DescFollowerForms", "Abrir el menú de colección de formas/aspectos de seguidores." },
					{ "DescBuildMenu", "Abrir el menú de construcción." },
					{ "DescTailorClothing", "Abrir el menú del sastre para crear y asignar ropa." },
					{ "DescPlayerUpgrades", "Abrir el menú de mejoras — vellones, doctrinas y habilidades de la corona." },
					{ "DescEnableFollowerForms", "Activar el atajo de formas de seguidores." },
					{ "DescEnableBuildMenu", "Activar el atajo del menú de construcción." },
					{ "DescEnableTailor", "Activar el atajo del sastre." },
					{ "DescEnablePlayerUpgrades", "Activar el atajo de mejoras." },
					{ "Structures", "Estructuras" },
					{ "Clothing", "Ropa" }
				}
			},
			{
				"Italian",
				new Dictionary<string, string>
				{
					{ "NameFollowerForms", "Forme dei seguaci" },
					{ "NameBuildMenu", "Menu costruzione" },
					{ "NameTailorClothing", "Sarto / Abbigliamento" },
					{ "NamePlayerUpgrades", "Miglioramenti / Velli" },
					{ "NameEnableFollowerForms", "Attiva forme dei seguaci" },
					{ "NameEnableBuildMenu", "Attiva menu costruzione" },
					{ "NameEnableTailor", "Attiva sarto" },
					{ "NameEnablePlayerUpgrades", "Attiva miglioramenti" },
					{ "DescFollowerForms", "Apri il menu della collezione di forme/aspetti dei seguaci." },
					{ "DescBuildMenu", "Apri il menu di costruzione." },
					{ "DescTailorClothing", "Apri il menu del sarto per creare e assegnare abbigliamento." },
					{ "DescPlayerUpgrades", "Apri il menu dei miglioramenti — velli, dottrine e abilità della corona." },
					{ "DescEnableFollowerForms", "Attiva la scorciatoia per le forme dei seguaci." },
					{ "DescEnableBuildMenu", "Attiva la scorciatoia per il menu di costruzione." },
					{ "DescEnableTailor", "Attiva la scorciatoia per il sarto." },
					{ "DescEnablePlayerUpgrades", "Attiva la scorciatoia per i miglioramenti." },
					{ "Structures", "Strutture" },
					{ "Clothing", "Abbigliamento" }
				}
			},
			{
				"Portuguese (Brazil)",
				new Dictionary<string, string>
				{
					{ "NameFollowerForms", "Formas de seguidores" },
					{ "NameBuildMenu", "Menu de construção" },
					{ "NameTailorClothing", "Alfaiate / Roupas" },
					{ "NamePlayerUpgrades", "Melhorias / Tosas" },
					{ "NameEnableFollowerForms", "Ativar formas de seguidores" },
					{ "NameEnableBuildMenu", "Ativar menu de construção" },
					{ "NameEnableTailor", "Ativar alfaiate" },
					{ "NameEnablePlayerUpgrades", "Ativar melhorias" },
					{ "DescFollowerForms", "Abrir o menu de coleção de formas/aparências de seguidores." },
					{ "DescBuildMenu", "Abrir o menu de construção." },
					{ "DescTailorClothing", "Abrir o menu do alfaiate para criar e atribuir roupas." },
					{ "DescPlayerUpgrades", "Abrir o menu de melhorias — tosas, doutrinas e habilidades da coroa." },
					{ "DescEnableFollowerForms", "Ativar o atalho de formas de seguidores." },
					{ "DescEnableBuildMenu", "Ativar o atalho do menu de construção." },
					{ "DescEnableTailor", "Ativar o atalho do alfaiate." },
					{ "DescEnablePlayerUpgrades", "Ativar o atalho de melhorias." },
					{ "Structures", "Estruturas" },
					{ "Clothing", "Roupas" }
				}
			},
			{
				"Dutch",
				new Dictionary<string, string>
				{
					{ "NameFollowerForms", "Volgelingvormen" },
					{ "NameBuildMenu", "Bouwmenu" },
					{ "NameTailorClothing", "Kleermaker / Kleding" },
					{ "NamePlayerUpgrades", "Spelerverbeteringen / Vachten" },
					{ "NameEnableFollowerForms", "Volgelingvormen inschakelen" },
					{ "NameEnableBuildMenu", "Bouwmenu inschakelen" },
					{ "NameEnableTailor", "Kleermaker inschakelen" },
					{ "NameEnablePlayerUpgrades", "Spelerverbeteringen inschakelen" },
					{ "DescFollowerForms", "Open het menu met de collectie volgelingvormen/-skins." },
					{ "DescBuildMenu", "Open het bouwmenu." },
					{ "DescTailorClothing", "Open het kleermakermenu om kleding te maken en toe te wijzen." },
					{ "DescPlayerUpgrades", "Open het verbeteringsmenu — vachten, doctrines en kroonvaardigheden." },
					{ "DescEnableFollowerForms", "Schakel de sneltoets voor volgelingvormen in." },
					{ "DescEnableBuildMenu", "Schakel de sneltoets voor het bouwmenu in." },
					{ "DescEnableTailor", "Schakel de sneltoets voor de kleermaker in." },
					{ "DescEnablePlayerUpgrades", "Schakel de sneltoets voor spelerverbeteringen in." },
					{ "Structures", "Gebouwen" },
					{ "Clothing", "Kleding" }
				}
			},
			{
				"Russian",
				new Dictionary<string, string>
				{
					{ "NameFollowerForms", "Формы последователей" },
					{ "NameBuildMenu", "Меню строительства" },
					{ "NameTailorClothing", "Портной / Одежда" },
					{ "NamePlayerUpgrades", "Улучшения / Руна" },
					{ "NameEnableFollowerForms", "Включить формы последователей" },
					{ "NameEnableBuildMenu", "Включить меню строительства" },
					{ "NameEnableTailor", "Включить портного" },
					{ "NameEnablePlayerUpgrades", "Включить улучшения" },
					{ "DescFollowerForms", "Открыть меню коллекции форм/обликов последователей." },
					{ "DescBuildMenu", "Открыть меню строительства." },
					{ "DescTailorClothing", "Открыть меню портного для создания и назначения одежды." },
					{ "DescPlayerUpgrades", "Открыть меню улучшений — руна, доктрины и способности короны." },
					{ "DescEnableFollowerForms", "Включить горячую клавишу для форм последователей." },
					{ "DescEnableBuildMenu", "Включить горячую клавишу для меню строительства." },
					{ "DescEnableTailor", "Включить горячую клавишу для портного." },
					{ "DescEnablePlayerUpgrades", "Включить горячую клавишу для улучшений." },
					{ "Structures", "Строения" },
					{ "Clothing", "Одежда" }
				}
			},
			{
				"Turkish",
				new Dictionary<string, string>
				{
					{ "NameFollowerForms", "Takipçi Formları" },
					{ "NameBuildMenu", "İnşa Menüsü" },
					{ "NameTailorClothing", "Terzi / Kıyafetler" },
					{ "NamePlayerUpgrades", "Oyuncu Geliştirmeleri / Post" },
					{ "NameEnableFollowerForms", "Takipçi Formlarını Etkinleştir" },
					{ "NameEnableBuildMenu", "İnşa Menüsünü Etkinleştir" },
					{ "NameEnableTailor", "Terziyi Etkinleştir" },
					{ "NameEnablePlayerUpgrades", "Oyuncu Geliştirmelerini Etkinleştir" },
					{ "DescFollowerForms", "Takipçi formları/görünüm koleksiyonu menüsünü aç." },
					{ "DescBuildMenu", "İnşa menüsünü aç." },
					{ "DescTailorClothing", "Kıyafet üretmek ve atamak için terzi menüsünü aç." },
					{ "DescPlayerUpgrades", "Geliştirmeler menüsünü aç — postlar, doktrinler ve taç yetenekleri." },
					{ "DescEnableFollowerForms", "Takipçi formları kısayolunu etkinleştir." },
					{ "DescEnableBuildMenu", "İnşa menüsü kısayolunu etkinleştir." },
					{ "DescEnableTailor", "Terzi kısayolunu etkinleştir." },
					{ "DescEnablePlayerUpgrades", "Oyuncu geliştirmeleri kısayolunu etkinleştir." },
					{ "Structures", "Yapılar" },
					{ "Clothing", "Kıyafetler" }
				}
			},
			{
				"Japanese",
				new Dictionary<string, string>
				{
					{ "NameFollowerForms", "信者の姿" },
					{ "NameBuildMenu", "建設メニュー" },
					{ "NameTailorClothing", "仕立屋 / 衣装" },
					{ "NamePlayerUpgrades", "プレイヤー強化 / フリース" },
					{ "NameEnableFollowerForms", "信者の姿を有効化" },
					{ "NameEnableBuildMenu", "建設メニューを有効化" },
					{ "NameEnableTailor", "仕立屋を有効化" },
					{ "NameEnablePlayerUpgrades", "プレイヤー強化を有効化" },
					{ "DescFollowerForms", "信者の姿/スキンコレクションメニューを開きます。" },
					{ "DescBuildMenu", "建設メニューを開きます。" },
					{ "DescTailorClothing", "仕立屋メニューを開いて衣装を作成・割り当てます。" },
					{ "DescPlayerUpgrades", "強化メニューを開きます — フリース、教義、王冠の能力。" },
					{ "DescEnableFollowerForms", "信者の姿のホットキーを有効にします。" },
					{ "DescEnableBuildMenu", "建設メニューのホットキーを有効にします。" },
					{ "DescEnableTailor", "仕立屋のホットキーを有効にします。" },
					{ "DescEnablePlayerUpgrades", "プレイヤー強化のホットキーを有効にします。" },
					{ "Structures", "建造物" },
					{ "Clothing", "衣装" }
				}
			},
			{
				"Korean",
				new Dictionary<string, string>
				{
					{ "NameFollowerForms", "추종자 형태" },
					{ "NameBuildMenu", "건설 메뉴" },
					{ "NameTailorClothing", "재단사 / 의상" },
					{ "NamePlayerUpgrades", "플레이어 강화 / 양털" },
					{ "NameEnableFollowerForms", "추종자 형태 활성화" },
					{ "NameEnableBuildMenu", "건설 메뉴 활성화" },
					{ "NameEnableTailor", "재단사 활성화" },
					{ "NameEnablePlayerUpgrades", "플레이어 강화 활성화" },
					{ "DescFollowerForms", "추종자 형태/스킨 컴렉션 메뉴를 엽니다." },
					{ "DescBuildMenu", "건설 메뉴를 엽니다." },
					{ "DescTailorClothing", "재단사 메뉴를 열어 의상을 제작하고 할당합니다." },
					{ "DescPlayerUpgrades", "강화 메뉴를 엽니다 — 양털, 교리, 왕관 능력." },
					{ "DescEnableFollowerForms", "추종자 형태 단축키를 활성화합니다." },
					{ "DescEnableBuildMenu", "건설 메뉴 단축키를 활성화합니다." },
					{ "DescEnableTailor", "재단사 단축키를 활성화합니다." },
					{ "DescEnablePlayerUpgrades", "플레이어 강화 단축키를 활성화합니다." },
					{ "Structures", "건축물" },
					{ "Clothing", "의상" }
				}
			},
			{
				"Chinese (Simplified)",
				new Dictionary<string, string>
				{
					{ "NameFollowerForms", "信徒形态" },
					{ "NameBuildMenu", "建造菜单" },
					{ "NameTailorClothing", "裁缝 / 服装" },
					{ "NamePlayerUpgrades", "玩家升级 / 羊毛衫" },
					{ "NameEnableFollowerForms", "启用信徒形态" },
					{ "NameEnableBuildMenu", "启用建造菜单" },
					{ "NameEnableTailor", "启用裁缝" },
					{ "NameEnablePlayerUpgrades", "启用玩家升级" },
					{ "DescFollowerForms", "打开信徒形态/皮肤收藏菜单。" },
					{ "DescBuildMenu", "打开建造菜单。" },
					{ "DescTailorClothing", "打开裁缝菜单以制作和分配服装。" },
					{ "DescPlayerUpgrades", "打开升级菜单——羊毛衫、教义和王冠能力。" },
					{ "DescEnableFollowerForms", "启用信徒形态快捷键。" },
					{ "DescEnableBuildMenu", "启用建造菜单快捷键。" },
					{ "DescEnableTailor", "启用裁缝快捷键。" },
					{ "DescEnablePlayerUpgrades", "启用玩家升级快捷键。" },
					{ "Structures", "建筑" },
					{ "Clothing", "服装" }
				}
			},
			{
				"Chinese (Traditional)",
				new Dictionary<string, string>
				{
					{ "NameFollowerForms", "信徒型態" },
					{ "NameBuildMenu", "建造選單" },
					{ "NameTailorClothing", "裁縫 / 服裝" },
					{ "NamePlayerUpgrades", "玩家升級 / 羊毛衫" },
					{ "NameEnableFollowerForms", "啟用信徒型態" },
					{ "NameEnableBuildMenu", "啟用建造選單" },
					{ "NameEnableTailor", "啟用裁縫" },
					{ "NameEnablePlayerUpgrades", "啟用玩家升級" },
					{ "DescFollowerForms", "開啟信徒型態/外觀收藏選單。" },
					{ "DescBuildMenu", "開啟建造選單。" },
					{ "DescTailorClothing", "開啟裁縫選單以製作和分配服裝。" },
					{ "DescPlayerUpgrades", "開啟升級選單——羊毛衫、教義和王冠能力。" },
					{ "DescEnableFollowerForms", "啟用信徒型態快捷鍵。" },
					{ "DescEnableBuildMenu", "啟用建造選單快捷鍵。" },
					{ "DescEnableTailor", "啟用裁縫快捷鍵。" },
					{ "DescEnablePlayerUpgrades", "啟用玩家升級快捷鍵。" },
					{ "Structures", "建築" },
					{ "Clothing", "服裝" }
				}
			},
			{
				"Arabic",
				new Dictionary<string, string>
				{
					{ "NameFollowerForms", "أشكال الأتباع" },
					{ "NameBuildMenu", "قائمة البناء" },
					{ "NameTailorClothing", "الخياط / الملابس" },
					{ "NamePlayerUpgrades", "ترقيات اللاعب / الجلود" },
					{ "NameEnableFollowerForms", "تفعيل أشكال الأتباع" },
					{ "NameEnableBuildMenu", "تفعيل قائمة البناء" },
					{ "NameEnableTailor", "تفعيل الخياط" },
					{ "NameEnablePlayerUpgrades", "تفعيل ترقيات اللاعب" },
					{ "DescFollowerForms", "افتح قائمة مجموعة أشكال/مظاهر الأتباع." },
					{ "DescBuildMenu", "افتح قائمة البناء." },
					{ "DescTailorClothing", "افتح قائمة الخياط لصنع وتعيين الملابس." },
					{ "DescPlayerUpgrades", "افتح قائمة الترقيات — الجلود والعقائد وقدرات التاج." },
					{ "DescEnableFollowerForms", "تفعيل مفتاح الاختصار لأشكال الأتباع." },
					{ "DescEnableBuildMenu", "تفعيل مفتاح الاختصار لقائمة البناء." },
					{ "DescEnableTailor", "تفعيل مفتاح الاختصار للخياط." },
					{ "DescEnablePlayerUpgrades", "تفعيل مفتاح الاختصار لترقيات اللاعب." },
					{ "Structures", "المباني" },
					{ "Clothing", "الملابس" }
				}
			}
		};

		internal static string NameFollowerForms => Get("NameFollowerForms");

		internal static string NameBuildMenu => Get("NameBuildMenu");

		internal static string NameTailorClothing => Get("NameTailorClothing");

		internal static string NamePlayerUpgrades => Get("NamePlayerUpgrades");

		internal static string NameEnableFollowerForms => Get("NameEnableFollowerForms");

		internal static string NameEnableBuildMenu => Get("NameEnableBuildMenu");

		internal static string NameEnableTailor => Get("NameEnableTailor");

		internal static string NameEnablePlayerUpgrades => Get("NameEnablePlayerUpgrades");

		internal static string DescFollowerForms => Get("DescFollowerForms");

		internal static string DescBuildMenu => Get("DescBuildMenu");

		internal static string DescTailorClothing => Get("DescTailorClothing");

		internal static string DescPlayerUpgrades => Get("DescPlayerUpgrades");

		internal static string DescEnableFollowerForms => Get("DescEnableFollowerForms");

		internal static string DescEnableBuildMenu => Get("DescEnableBuildMenu");

		internal static string DescEnableTailor => Get("DescEnableTailor");

		internal static string DescEnablePlayerUpgrades => Get("DescEnablePlayerUpgrades");

		internal static string Structures => Get("Structures");

		internal static string Clothing => Get("Clothing");

		private static string Get(string key)
		{
			string key2 = LocalizationManager.CurrentLanguage ?? "English";
			if (Strings.TryGetValue(key2, out var value) && value.TryGetValue(key, out var value2))
			{
				return value2;
			}
			if (!Strings["English"].TryGetValue(key, out var value3))
			{
				return key;
			}
			return value3;
		}
	}
	[BepInPlugin("p1xel8ted.cotl.quickmenus", "Quick Menus", "0.1.0")]
	[BepInDependency("com.bepis.bepinex.configurationmanager", "18.4.1")]
	public class Plugin : BaseUnityPlugin
	{
		private const string PluginGuid = "p1xel8ted.cotl.quickmenus";

		private const string PluginName = "Quick Menus";

		private const string PluginVer = "0.1.0";

		private static float _savedTimeScale = 1f;

		private static UIMenuBase _activeMenu;

		private static string _activeMenuKey;

		internal static ManualLogSource Log { get; private set; }

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

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

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

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

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

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

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

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

		private void Awake()
		{
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Expected O, but got Unknown
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b8: Expected O, but got Unknown
			//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0107: Unknown result type (might be due to invalid IL or missing references)
			//IL_0111: Expected O, but got Unknown
			//IL_0130: Unknown result type (might be due to invalid IL or missing references)
			//IL_0160: Unknown result type (might be due to invalid IL or missing references)
			//IL_016a: Expected O, but got Unknown
			//IL_01ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b5: Expected O, but got Unknown
			//IL_01f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0200: Expected O, but got Unknown
			//IL_0241: Unknown result type (might be due to invalid IL or missing references)
			//IL_024b: Expected O, but got Unknown
			//IL_028c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0296: Expected O, but got Unknown
			Log = ((BaseUnityPlugin)this).Logger;
			FollowerFormsKey = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("01. Hotkeys", "Follower Forms", new KeyboardShortcut((KeyCode)283, Array.Empty<KeyCode>()), new ConfigDescription(Localization.DescFollowerForms, (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 8,
					DispName = Localization.NameFollowerForms
				}
			}));
			BuildMenuKey = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("01. Hotkeys", "Build Menu", new KeyboardShortcut((KeyCode)284, Array.Empty<KeyCode>()), new ConfigDescription(Localization.DescBuildMenu, (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 7,
					DispName = Localization.NameBuildMenu
				}
			}));
			TailorKey = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("01. Hotkeys", "Tailor / Clothing", new KeyboardShortcut((KeyCode)285, Array.Empty<KeyCode>()), new ConfigDescription(Localization.DescTailorClothing, (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 6,
					DispName = Localization.NameTailorClothing
				}
			}));
			PlayerUpgradesKey = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("01. Hotkeys", "Player Upgrades / Fleeces", new KeyboardShortcut((KeyCode)286, Array.Empty<KeyCode>()), new ConfigDescription(Localization.DescPlayerUpgrades, (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 5,
					DispName = Localization.NamePlayerUpgrades
				}
			}));
			EnableFollowerForms = ((BaseUnityPlugin)this).Config.Bind<bool>("02. Toggles", "Enable Follower Forms", true, new ConfigDescription(Localization.DescEnableFollowerForms, (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 4,
					DispName = Localization.NameEnableFollowerForms
				}
			}));
			EnableBuildMenu = ((BaseUnityPlugin)this).Config.Bind<bool>("02. Toggles", "Enable Build Menu", true, new ConfigDescription(Localization.DescEnableBuildMenu, (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 3,
					DispName = Localization.NameEnableBuildMenu
				}
			}));
			EnableTailor = ((BaseUnityPlugin)this).Config.Bind<bool>("02. Toggles", "Enable Tailor", true, new ConfigDescription(Localization.DescEnableTailor, (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 2,
					DispName = Localization.NameEnableTailor
				}
			}));
			EnablePlayerUpgrades = ((BaseUnityPlugin)this).Config.Bind<bool>("02. Toggles", "Enable Player Upgrades", true, new ConfigDescription(Localization.DescEnablePlayerUpgrades, (AcceptableValueBase)null, new object[1]
			{
				new ConfigurationManagerAttributes
				{
					Order = 1,
					DispName = Localization.NameEnablePlayerUpgrades
				}
			}));
			Harmony.CreateAndPatchAll(Assembly.GetExecutingAssembly(), "p1xel8ted.cotl.quickmenus");
			Helpers.PrintModLoaded("Quick Menus", ((BaseUnityPlugin)this).Logger);
		}

		private void Update()
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
			KeyboardShortcut value;
			if (EnableFollowerForms.Value)
			{
				value = FollowerFormsKey.Value;
				if (((KeyboardShortcut)(ref value)).IsDown())
				{
					HandleKey("forms", OpenFollowerFormsMenu);
					return;
				}
			}
			if (EnableBuildMenu.Value)
			{
				value = BuildMenuKey.Value;
				if (((KeyboardShortcut)(ref value)).IsDown())
				{
					HandleKey("build", OpenBuildMenu);
					return;
				}
			}
			if (EnableTailor.Value)
			{
				value = TailorKey.Value;
				if (((KeyboardShortcut)(ref value)).IsDown())
				{
					HandleKey("tailor", OpenTailorMenu);
					return;
				}
			}
			if (EnablePlayerUpgrades.Value)
			{
				value = PlayerUpgradesKey.Value;
				if (((KeyboardShortcut)(ref value)).IsDown())
				{
					HandleKey("upgrades", OpenPlayerUpgradesMenu);
				}
			}
		}

		private static void HandleKey(string key, Action open)
		{
			if ((Object)(object)_activeMenu != (Object)null)
			{
				bool num = _activeMenuKey == key;
				_activeMenu.Hide(true);
				if (num)
				{
					return;
				}
			}
			else if (!CanOpenMenu())
			{
				return;
			}
			_activeMenuKey = key;
			open();
		}

		private static bool CanOpenMenu()
		{
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: Invalid comparison between Unknown and I4
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_0069: Invalid comparison between Unknown and I4
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_006e: Invalid comparison between Unknown and I4
			if ((Object)(object)MonoSingleton<UIManager>.Instance == (Object)null)
			{
				return false;
			}
			List<UIMenuBase> activeMenus = UIMenuBase.ActiveMenus;
			if (activeMenus != null && activeMenus.Count > 0)
			{
				return false;
			}
			if (MMTransition.IsPlaying)
			{
				return false;
			}
			if (GameManager.InMenu)
			{
				return false;
			}
			if ((Object)(object)PlayerFarming.Instance == (Object)null)
			{
				return false;
			}
			StateMachine state = PlayerFarming.Instance.state;
			if ((Object)(object)state == (Object)null)
			{
				return false;
			}
			State cURRENT_STATE = state.CURRENT_STATE;
			bool flag = (((int)cURRENT_STATE == 13 || (int)cURRENT_STATE == 33 || (int)cURRENT_STATE == 49) ? true : false);
			return !flag;
		}

		private static void PauseGame()
		{
			_savedTimeScale = Time.timeScale;
			PlayerFarming.Instance.state.CURRENT_STATE = (State)13;
			HUD_Manager.Instance.Hide(false, 0, false);
			Time.timeScale = 0f;
		}

		private static void ResumeGame()
		{
			_activeMenu = null;
			_activeMenuKey = null;
			Time.timeScale = _savedTimeScale;
			PlayerFarming.SetStateForAllPlayers((State)0, false, (PlayerFarming)null);
			HUD_Manager.Instance.Show(0, false);
		}

		private static void OpenFollowerFormsMenu()
		{
			UIFollowerFormsMenuController followerFormsMenuTemplate = MonoSingleton<UIManager>.Instance.FollowerFormsMenuTemplate;
			if ((Object)(object)followerFormsMenuTemplate == (Object)null)
			{
				Log.LogWarning((object)"FollowerFormsMenuTemplate is not loaded.");
				return;
			}
			PauseGame();
			UIMenuBase obj = (_activeMenu = (UIMenuBase)(object)GameObjectExtensions.Instantiate<UIFollowerFormsMenuController>(followerFormsMenuTemplate));
			obj.Show(false);
			obj.OnHidden = (Action)Delegate.Combine(obj.OnHidden, new Action(ResumeGame));
		}

		private static void OpenBuildMenu()
		{
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_0063: Expected O, but got Unknown
			UIBuildMenuController buildMenuTemplate = MonoSingleton<UIManager>.Instance.BuildMenuTemplate;
			if ((Object)(object)buildMenuTemplate == (Object)null)
			{
				Log.LogWarning((object)"BuildMenuTemplate is not loaded.");
				return;
			}
			PauseGame();
			UIBuildMenuController val = (UIBuildMenuController)(object)(_activeMenu = (UIMenuBase)(object)GameObjectExtensions.Instantiate<UIBuildMenuController>(buildMenuTemplate));
			((UIMenuBase)val).Show(false);
			val._controlPrompts.HideAcceptButton();
			Object.Destroy((Object)(object)val._editBuildingsText);
			val._editBuildingsText = new GameObject("Dummy");
			val._editBuildingsText.SetActive(false);
			Localize[] componentsInChildren = ((Component)val).GetComponentsInChildren<Localize>(true);
			foreach (Localize val2 in componentsInChildren)
			{
				if (!((Object)(object)val2._text == (Object)null) && !(((Object)((Component)val2).gameObject).name != "Header Text"))
				{
					((Behaviour)val2).enabled = false;
					((TMP_Text)val2._text).text = Localization.Structures;
					break;
				}
			}
			((UIMenuBase)val).OnHidden = (Action)Delegate.Combine(((UIMenuBase)val).OnHidden, new Action(ResumeGame));
		}

		private static void OpenTailorMenu()
		{
			//IL_01a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b8: Unknown result type (might be due to invalid IL or missing references)
			List<Structures_Tailor> allStructuresOfType = StructureManager.GetAllStructuresOfType<Structures_Tailor>();
			Structures_Tailor val = ((allStructuresOfType != null && allStructuresOfType.Count > 0) ? allStructuresOfType[0] : null);
			UITailorMenuController tailorMenuControllerTemplate = MonoSingleton<UIManager>.Instance.TailorMenuControllerTemplate;
			if ((Object)(object)tailorMenuControllerTemplate == (Object)null)
			{
				Log.LogWarning((object)"TailorMenuControllerTemplate is not loaded.");
				return;
			}
			PauseGame();
			UITailorMenuController val2 = (UITailorMenuController)(object)(_activeMenu = (UIMenuBase)(object)GameObjectExtensions.Instantiate<UITailorMenuController>(tailorMenuControllerTemplate));
			((MMTabNavigatorBase<UIPauseDetailsMenuTab>)(object)val2.tabNavigator).DefaultTabIndex = 1;
			val2.Show(val, false);
			UIPauseDetailsMenuTab[] tabs = ((MMTabNavigatorBase<UIPauseDetailsMenuTab>)(object)val2.tabNavigator)._tabs;
			((Component)tabs[0]).gameObject.SetActive(false);
			((Component)tabs[1]).gameObject.SetActive(false);
			((Component)tabs[2]).gameObject.SetActive(false);
			((MMTabNavigatorBase<UIPauseDetailsMenuTab>)(object)val2.tabNavigator).SetNavigationVisibility(false);
			UIBuildMenuController buildMenuTemplate = MonoSingleton<UIManager>.Instance.BuildMenuTemplate;
			if ((Object)(object)buildMenuTemplate != (Object)null)
			{
				Transform[] componentsInChildren = ((Component)buildMenuTemplate).GetComponentsInChildren<Transform>(true);
				foreach (Transform val3 in componentsInChildren)
				{
					if (!(((Object)val3).name != "Header Text"))
					{
						GameObject obj = Object.Instantiate<GameObject>(((Component)val3).gameObject, ((Component)val2.tabNavigator).transform);
						obj.SetActive(true);
						Localize component = obj.GetComponent<Localize>();
						if ((Object)(object)component != (Object)null)
						{
							((Behaviour)component).enabled = false;
						}
						TextMeshProUGUI component2 = obj.GetComponent<TextMeshProUGUI>();
						if ((Object)(object)component2 != (Object)null)
						{
							((TMP_Text)component2).text = Localization.Clothing;
						}
						break;
					}
				}
			}
			((Component)val2._cookButton).gameObject.SetActive(false);
			((Component)val2._cookButtonRectTransform).gameObject.SetActive(false);
			((Component)val2._tailorQueue).gameObject.SetActive(false);
			val2.addToQueueButton.SetActive(false);
			val2.removeToQueueButton.SetActive(false);
			RectTransform component3 = ((Component)val2._scrollView).GetComponent<RectTransform>();
			Vector2 offsetMin = component3.offsetMin;
			offsetMin.y = 0f;
			component3.offsetMin = offsetMin;
			((UIMenuBase)val2).OnHidden = (Action)Delegate.Combine(((UIMenuBase)val2).OnHidden, new Action(ResumeGame));
		}

		private static void OpenPlayerUpgradesMenu()
		{
			UIPlayerUpgradesMenuController playerUpgradesMenuTemplate = MonoSingleton<UIManager>.Instance.PlayerUpgradesMenuTemplate;
			if ((Object)(object)playerUpgradesMenuTemplate == (Object)null)
			{
				Log.LogWarning((object)"PlayerUpgradesMenuTemplate is not loaded.");
				return;
			}
			PauseGame();
			UIPlayerUpgradesMenuController menu = GameObjectExtensions.Instantiate<UIPlayerUpgradesMenuController>(playerUpgradesMenuTemplate);
			_activeMenu = (UIMenuBase)(object)menu;
			((UIMenuBase)menu).Show(false);
			((Component)menu._ritualItem).gameObject.SetActive(false);
			menu._ritualItemAlert.SetActive(false);
			((Component)menu._crystalDoctrineItem).gameObject.SetActive(false);
			menu._crystalDoctrineItemAlert.SetActive(false);
			Transform[] componentsInChildren = ((Component)menu).GetComponentsInChildren<Transform>(true);
			foreach (Transform val in componentsInChildren)
			{
				if (!(((Object)val).name != "Ritual Content"))
				{
					((Component)val).gameObject.SetActive(false);
					break;
				}
			}
			menu._crownHeader.SetActive(false);
			menu._crownContainer.SetActive(false);
			menu._crownDLCContainer.SetActive(false);
			((Component)menu._crownAbilityCount).gameObject.SetActive(false);
			Object.Destroy((Object)(object)menu._controlPrompts._acceptPromptContainer);
			Localize componentInChildren = menu._fleeceHeader.GetComponentInChildren<Localize>();
			if ((Object)(object)componentInChildren != (Object)null)
			{
				Localize[] componentsInChildren2 = ((Component)menu).GetComponentsInChildren<Localize>(true);
				foreach (Localize val2 in componentsInChildren2)
				{
					if (!(((Object)((Component)val2).gameObject).name != "Header"))
					{
						val2.SetTerm(componentInChildren.mTerm);
						break;
					}
				}
			}
			menu._fleeceHeader.SetActive(false);
			UIPlayerUpgradesMenuController obj = menu;
			((UIMenuBase)obj).OnShow = (Action)Delegate.Combine(((UIMenuBase)obj).OnShow, (Action)delegate
			{
				menu._crownHeader.SetActive(false);
				menu._crownContainer.SetActive(false);
				menu._crownDLCContainer.SetActive(false);
				((Component)menu._crownAbilityCount).gameObject.SetActive(false);
			});
			UIPlayerUpgradesMenuController obj2 = menu;
			((UIMenuBase)obj2).OnHidden = (Action)Delegate.Combine(((UIMenuBase)obj2).OnHidden, new Action(ResumeGame));
		}
	}
	[HarmonyPatch(typeof(FleeceInfoCard), "Update")]
	internal static class FleeceInfoCardPatch
	{
		[HarmonyPrefix]
		private static void Prefix(FleeceInfoCard __instance)
		{
			if (Time.timeScale == 0f)
			{
				__instance.selectionDelay -= Time.unscaledDeltaTime;
			}
		}
	}
}
namespace Shared
{
	public static class Helpers
	{
		private static class StorefrontDetector
		{
			private static readonly string[] PiracyFiles = new string[65]
			{
				"SmartSteamEmu.ini", "codex.ini", "steam_emu.ini", "goldberg_emulator.dll", "steamclient_loader.dll", "steam_api64_o.dll", "steam_api.cdx", "steam_api64.cdx.dll", "steam_interfaces.txt", "local_save.txt",
				"valve.ini", "codex64.dll", "coldclient.dll", "ColdClientLoader.ini", "steamless.dll", "GreenLuma", "CreamAPI.dll", "cream_api.ini", "ScreamAPI.dll", "OnlineFix.dll",
				"OnlineFix.url", "online-fix.me", "CODEX", "SKIDROW", "CPY", "PLAZA", "HOODLUM", "EMPRESS", "TENOKE", "PROPHET",
				"REVOLT", "DARKSiDERS", "RAZOR1911", "FLT", "FLT.dll", "RUNE", "RUNE.ini", "TiNYiSO", "RELOADED", "RLD!",
				"DOGE", "BAT", "P2P", "ElAmigos", "FitGirl", "DODI", "xatab", "KaOs", "IGG", "Masquerade",
				"3dmgame.dll", "ALI213.dll", "crack", "crack.exe", "Crack.nfo", "crackfix", "CrackOnly", "fix.exe", "gamefix.dll", "SKIDROW.ini",
				"nosTEAM", "NoSteam", "FCKDRM", "Goldberg", "VALVEEMPRESS"
			};

			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__6 : 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__6(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();

		private static bool ContainsIgnoreCase(this string source, string value)
		{
			if (source == null)
			{
				return false;
			}
			return source.IndexOf(value, StringComparison.OrdinalIgnoreCase) >= 0;
		}

		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)"==========================================");
		}

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

		[IteratorStateMachine(typeof(<FilterEnumerator>d__6))]
		public static IEnumerator FilterEnumerator(IEnumerator original, Type[] typesToRemove)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <FilterEnumerator>d__6(0)
			{
				original = original,
				typesToRemove = typesToRemove
			};
		}

		public static void LogCallStack(ManualLogSource logger, int skipFrames = 3, int maxFrames = 10)
		{
			StackTrace stackTrace = new StackTrace(fNeedFileInfo: false);
			int frameCount = stackTrace.FrameCount;
			for (int i = skipFrames; i < frameCount && i < maxFrames; i++)
			{
				MethodBase methodBase = stackTrace.GetFrame(i)?.GetMethod();
				logger.LogWarning((object)string.Format(arg1: (methodBase?.DeclaringType)?.FullName, format: "[Frame {0}] {1}.{2}", arg0: i, arg2: methodBase?.Name));
			}
		}

		public static Type GetCallingType(ICollection<Type> targetTypes, int skipFrames = 3, int maxFrames = 10)
		{
			StackTrace stackTrace = new StackTrace(fNeedFileInfo: false);
			int frameCount = stackTrace.FrameCount;
			for (int i = skipFrames; i < frameCount && i < maxFrames; i++)
			{
				Type type = stackTrace.GetFrame(i)?.GetMethod()?.DeclaringType;
				if (type != null && targetTypes.Contains(type))
				{
					return type;
				}
			}
			return null;
		}

		public static bool IsCalledFrom(string typeNameContains, string methodNameContains = null, int skipFrames = 3, int maxFrames = 10)
		{
			StackTrace stackTrace = new StackTrace(fNeedFileInfo: false);
			int frameCount = stackTrace.FrameCount;
			for (int i = skipFrames; i < frameCount && i < maxFrames; i++)
			{
				MethodBase methodBase = stackTrace.GetFrame(i)?.GetMethod();
				Type type = methodBase?.DeclaringType;
				if (!(type == null))
				{
					bool num = type.FullName.ContainsIgnoreCase(typeNameContains);
					bool flag = methodNameContains == null || methodBase.Name.ContainsIgnoreCase(methodNameContains);
					if (num && flag)
					{
						return true;
					}
				}
			}
			return false;
		}
	}
}