Decompiled source of MonsterSpawnerMod v1.0.4

MonsterSpawnerMod.dll

Decompiled 13 hours ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using System.Text;
using BepInEx;
using BepInEx.Configuration;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using Photon.Pun;
using UnityEngine;
using UnityEngine.SceneManagement;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("MonsterSpawnerMod")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("MonsterSpawnerMod")]
[assembly: AssemblyTitle("MonsterSpawnerMod")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[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 MonsterSpawnerMod
{
	[BepInPlugin("com.monsterspawner.gui", "Monster Spawn Menu", "1.0.0")]
	public class Plugin : BaseUnityPlugin
	{
		private struct Toast
		{
			public string msg;

			public bool error;

			public float timer;
		}

		private struct SpawnedEntry
		{
			public GameObject go;

			public int id;

			public string typeId;

			public string displayName;

			public bool fromMod;
		}

		public class SpawnedTag : MonoBehaviour
		{
		}

		private struct Monster
		{
			public string id;

			public string name;

			public string alias;

			public string searchKey;

			public int danger;

			public bool unused;

			public Monster(string id, string name, string alias, int danger, bool unused = false)
			{
				this.id = id;
				this.name = name;
				this.alias = alias;
				this.danger = danger;
				this.unused = unused;
				searchKey = (name + " " + alias + " " + id + (unused ? " unused ???" : "")).ToLowerInvariant();
			}
		}

		private struct PendingCapture
		{
			public string id;

			public string name;

			public int startFrame;

			public HashSet<int> snap;

			public HashSet<int> snapOff;
		}

		private const string DiscordIconB64 = "iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAAKlBMVEVHcExYZfJXZPFYZfJXZPBYZfL///9RX/JHV/HEyPqepffh5P2FjvVsd/StrBPNAAAABXRSTlMA1UaXEmpP0/0AAASaSURBVHicxVvbgqsgDFxBC97+/3cXtFaQXBDQzHnZU1tnTEKIBP7+StArpXXXdcMG94fWSvVFtyrg1l/eFJ1+WgVBHoh4jp0jP/CEhj6b/auhrS8Ua/kUXTszlNA3lFBK30hCX0G/SaiMhZuhB0FX0Kt6eo9iPzR4/B1lRqj1foSCSGhk/gO33dDM/AduuqGl+b/ohPlvKXiC3kOaP1fBc/x5Cp7kz1HwSPydYCPxYX5WQfP8k4LMSI3zLwwiK/dv8FMz0zv8eBi8EAA7kDB4JQB2wGHwHj+cj15zgAfghJdGwIF0JDyeAmMkI+HFCNxxjcMbBjDGGvBza8DPYXRlBvDkyzgvENMyj8sNEeq+AYy1jvzjYdOrdrvgRFjYQFd0Nw3gnm3ayT2mjcN8sf09/S7OE+KkGOqOAYx79k8Ia+2wLsvk/i3LOrj/RpedHVgJgQnYHBA83vGU7AcTq+DMBVwSNNeb54FTcKZD5ot25MkgjECoRsgMQbOU8X8+4GgNoPI8YHkmDIwJdJYHTKEDPLhAzEsC5fyfD3NrleGB0gjcwcShzshCaw3/57OSN+/4LGSTBHMPM22Cng2BSgNwJlBcCNRFgAcdBZoNgVp+ZiB0TBaoyQE/E5C5gInBiiR4gvRBT8ZgOguXgEyHihRQOwZ3kCNR0YOgBT9dF2hKQBsP0D7Q1Chs4wHaBx0lAK7ERleKgqNzdPUpPGwJC1ACwEposr4Ot2talK7+irWQ24jKqCPyEJSFpq81zdU981GGQwqoXEQIAEIgTOzxleBnqW4qCCgB6aMETxLzhMqA0CkSAIRANLNFE3U46QImIIKAEJA6MxrQkYGiR2R+mC0gfZBYQBAikZMB5UQU4sMQiME8CwAC8Cgk8gAQg5kCgOHbSED4IHGMhlEGZXBCAD4ZpbcJgz2mCaVBdSxKQsyG0H1OnusgPU0ATmFobazRggR+Jz4ygUnkrUcqBucjNBEQFRH8Uj4PFplyJuuvDPAUTgjAilK0GpnHEamV3QWsgkAzUY+W5a3KIUYA/mLyjoAOfzV7R4DGX07fEaCI1/PipSkI2Cjo8QWK8rWxGwI6aommemUgBJIJNbVIlQoY7ZLxpjAuQDJEBChqmS6dVcfB2mEiNcyT/076SyQE6IVKCxSFxrpsC7+X+DeTwV8GSkJkNj4WKtH5CLDl6CYdNxesU5R2XXqeVt+oMCvwE3Tl/tcxQK57I6QG3wJ6ewlyxh5W513rp6Fr1+KnbcVr8ozlepPMe9fyLn66pBiYiMbFuVxPLdNcJdAr4JfsQdFHzUtypSySwPUAwrCh6aOuFdcxsL/BxzejDlexXaOob8d1rdwL+cg7YPvm5oRxZZtWceeS79ttTUO2CTN4J2SwD0nvNqNzeXQIWQVZX7t2r8Wb1+Lte/kNDOJbOOQ3schv4xHfyPTeSMD45TeziW/nk9/QKL+lU35Tq/y2XvmNzfJbu+U3t8tv75c/4CB/xEP+kEvbmanwwJfwQac/+aNebYxQc9jtT/6435/4gccaCcKnThvSewgf+90ge/D50MD74jn2HbKH308VzY7//wMg6g7yNt7XjAAAAABJRU5ErkJggg==";

		private const string ModVersion = "v1.0.0";

		private const string BugReportUrl = "https://github.com/EliteXGHG/MonsterSpawner-Content-Warning/issues/new?title=";

		private bool _menu;

		private Rect _wRect = new Rect(20f, 20f, 400f, 600f);

		private Vector2 _scroll;

		private Vector2 _killScroll;

		private int spawnAmount = 1;

		private float sliderVal = 1f;

		private string _amtStr = "1";

		private int _lastAmt = 1;

		private bool showLegend;

		private string searchInput = "";

		private string cachedSearch = "\0";

		private Monster[] filtered = new Monster[0];

		private readonly List<string> favorites = new List<string>();

		private readonly List<string> recentSpawns = new List<string>();

		private readonly Queue<Toast> _toastQueue = new Queue<Toast>();

		private readonly List<Toast> _activeToasts = new List<Toast>();

		private const int MaxToasts = 3;

		private const int MaxQueued = 8;

		private ConfigEntry<KeyboardShortcut> _toggleKey;

		private ConfigEntry<bool> _closeOnEsc;

		private bool ready;

		private bool _showKillPanel;

		private bool _wasCursorVisible;

		private CursorLockMode _wasCursorLock;

		private bool _cursorSaved;

		private static bool MenuOpen;

		private bool _showBugPopup;

		private string _bugTitle = "";

		private string _bugDesc = "";

		private string _bugSteps = "";

		private string _bugError = "";

		private bool _bugOpenGithub = true;

		private readonly List<SpawnedEntry> _spawned = new List<SpawnedEntry>();

		private bool _confirmSpawnAll;

		private bool _confirmKillAll;

		private float _confirmTimerSpawn;

		private float _confirmTimerKill;

		private float _cleanTimer;

		private float _logTimer;

		private const int MaxBatchSpawn = 120;

		private const int SpawnPerFrame = 12;

		private readonly List<string> _spawnQueue = new List<string>();

		private bool _spawning;

		private readonly Monster[] allMonsters = new Monster[33]
		{
			new Monster("Streamer", "Streamer", "CW-000", 6),
			new Monster("Zombe", "Snail", "Snailman | Zombie | Snail Hugger | CW-001", 1),
			new Monster("Snatcho", "Snatcho", "Shadow Demon | Snatcher | Grabber Snake | Chokelegs | CW-002", 7),
			new Monster("Toolkit_Wisk", "Whisk", "Fan | Whisker | The Whisk | CW-003A", 4),
			new Monster("BigSlap", "Big Slap", "Titan | Tall Monster | Slapper | The Destroyer | CW-004", 10),
			new Monster("Slurper", "Slurper", "Ceiling Starfish | Ceiling Star | Starfish | CW-005", 3),
			new Monster("Dog", "Dog", "Gun Dog | GunDog | A.S.T.R.A | Robot Attack Dog | Machine Gun Dog | CW-006", 6),
			new Monster("Bombs", "Bomber", "Bomb Bot | The Bomber Man | CW-007", 5),
			new Monster("Knifo", "Knife Ghost", "Knife | Ghost | Knifo | Knif | CW-008", 5),
			new Monster("Spider", "Spider", "CW-009", 4),
			new Monster("Mouthe", "Mouthe", "Screamer | Smiling Little Screamer | The Mouthe | CW-010", 0),
			new Monster("Flicker", "Flicker", "Jellyfish | The Flicker | CW-012", 9),
			new Monster("EyeGuy", "Eye Guy", "Chicken | Eye Bird | CW-013", 3),
			new Monster("Weeping", "Weeping", "Maiden | Iron Maiden | The Weeping | Cage | CW-014", 7),
			new Monster("Ear", "Ear", "Sound Monster | Balala | Ear Monster | The Ear | CW-016", 3),
			new Monster("Jello", "Jelly", "Slime | Slime Critter | Slimer | Blob | CW-017", 1),
			new Monster("Harpooner", "Harpooner", "Hookman | Harpoon | CW-020", 7),
			new Monster("CamCreep", "Cam Creep", "Camera Monster | The Creep | CW-022", 6),
			new Monster("Puffo", "Puffo", "Blowfish | Babushka | Puff Ball | CW-023", 3),
			new Monster("Mime", "Mime", "Blinking Waldo | CW-024", 4),
			new Monster("ButtonRobot", "Robot Button", "Explosive Button | Button | CW-025", 5),
			new Monster("Worm", "Worm", "The Worm | Leech | CW-026", 1),
			new Monster("Fire", "Fire Monster", "Fire | Turtle | Fire Beast | Flame Turtle | Fire Horse | Bowser | Godzilla | Firebreather | CW-027", 6),
			new Monster("BlackHoleBot", "Black Hole Bot", "Drone | Gravity Monster | Black Hole Drone | CW-029", 4),
			new Monster("UltraKnifo", "Ultra Knifo", "Big Knifo | Knifo EX | Grown-Up Knife Ghost | CW-030", 6),
			new Monster("SnailSpawner", "Snail Spawner", "Giant Slug | Slug | CW-031", 6),
			new Monster("Arms", "Arms", "Accordion Man | CW-033", 2),
			new Monster("Toolkit_Fan", "Fan Tool", "CW-003B | unused", -1, unused: true),
			new Monster("Toolkit_Hammer", "Hammer Tool", "MCHAMMER | CW-003C", -1, unused: true),
			new Monster("Toolkit_Iron", "Iron Tool", "TonyStark | CW-003D", -1, unused: true),
			new Monster("Toolkit_Vaccuum", "Vacuum Tool", "SUCC | CW-003E", -1, unused: true),
			new Monster("Angler", "Angler", "CW-018 | unused", -1, unused: true),
			new Monster("Bites", "Bites", "CW-035 | unused", -1, unused: true)
		};

		private static readonly string[] DangerNames = new string[11]
		{
			"Harmless", "Small scratch", "Might cause a bit of harm", "Causes some harm", "Eats your HP", "Dangerous", "Very Dangerous", "Extremely Dangerous", "Do not approach", "You may be screwed",
			"Death is almost certain"
		};

		private static readonly Color[] DangerColors = (Color[])(object)new Color[10]
		{
			new Color(0.35f, 0.78f, 0.35f),
			new Color(0.45f, 0.78f, 0.4f),
			new Color(0.62f, 0.78f, 0.32f),
			new Color(0.78f, 0.78f, 0.28f),
			new Color(0.82f, 0.62f, 0.22f),
			new Color(0.88f, 0.48f, 0.18f),
			new Color(0.88f, 0.32f, 0.18f),
			new Color(0.88f, 0.2f, 0.2f),
			new Color(0.78f, 0.13f, 0.22f),
			new Color(0.68f, 0.08f, 0.18f)
		};

		private static readonly Color PillModBg = new Color(0.08f, 0.38f, 0.15f);

		private static readonly Color PillModFg = new Color(0.75f, 1f, 0.8f);

		private static readonly Color PillVanBg = new Color(0.3f, 0.33f, 0.4f);

		private static readonly Color PillVanFg = new Color(0.85f, 0.87f, 0.92f);

		private static readonly Color ColBg = new Color(0.06f, 0.06f, 0.06f);

		private static readonly Color ColDark = new Color(0.12f, 0.12f, 0.12f, 0.95f);

		private static readonly Color ColDarkH = new Color(0.18f, 0.18f, 0.18f, 0.95f);

		private static readonly Color ColGreen = new Color(0.05f, 0.45f, 0.1f);

		private static readonly Color ColGreenH = new Color(0.08f, 0.55f, 0.14f);

		private static readonly Color ColGreenTxt = new Color(0.2f, 1f, 0.4f);

		private static readonly Color ColRed = new Color(0.5f, 0.07f, 0.07f);

		private static readonly Color ColRedH = new Color(0.6f, 0.1f, 0.1f);

		private static readonly Color ColRedTxt = new Color(1f, 0.25f, 0.25f);

		private static readonly Color ColDiscord = new Color(0.35f, 0.44f, 0.96f);

		private static readonly Color ColBorder = Color.white;

		private static readonly Color ColBorderD = new Color(1f, 1f, 1f, 0.12f);

		private static readonly Color ColStar = new Color(0.96f, 0.77f, 0.26f);

		private static readonly Color ColTxt = Color.white;

		private static readonly Color ToastBgErr = new Color(0.5f, 0.07f, 0.07f, 0.5f);

		private static readonly Color ToastBgOk = new Color(0.05f, 0.35f, 0.1f, 0.5f);

		private static readonly Color ToastBdErr = new Color(1f, 0.15f, 0.15f, 0.5f);

		private static readonly Color ToastBdOk = new Color(0.1f, 1f, 0.25f, 0.5f);

		private static readonly Color RowEven = new Color(0.13f, 0.13f, 0.13f);

		private static readonly Color RowOdd = new Color(0.1f, 0.1f, 0.1f);

		private static readonly Color PanelBg = new Color(0.08f, 0.08f, 0.08f);

		private static readonly Color ToastShadow = new Color(0f, 0f, 0f, 0.2f);

		private const int PAD = 10;

		private const int BW = 2;

		private const int RAD = 12;

		private readonly Dictionary<long, Texture2D> _rrCache = new Dictionary<long, Texture2D>();

		private readonly Dictionary<int, Texture2D> _solidCache = new Dictionary<int, Texture2D>();

		private static Color[] _rrBuf;

		private GUIStyle _ls;

		private GUIStyle _ts;

		private GUIStyle _secS;

		private GUIStyle _fBtn;

		private GUIStyle _killBtn;

		private GUIStyle _killArrow;

		private GUIStyle _catBtn;

		private GUIStyle _monBtn;

		private GUIStyle _favOn;

		private GUIStyle _favOff;

		private GUIStyle _preset;

		private GUIStyle _amtField;

		private GUIStyle _legendBtn;

		private GUIStyle _footer;

		private GUIStyle _footerBtn;

		private GUIStyle _discordBtn;

		private GUIStyle _winStyle;

		private GUIStyle _searchField;

		private GUIStyle _searchHint;

		private GUIStyle _toastStyle;

		private GUIStyle _grabS;

		private GUIStyle _bugArea;

		private GUIStyle _bugSub;

		private GUIStyle _killCountStyle;

		private GUIStyle _pill;

		private Material _tickMat;

		private Texture2D _discordIcon;

		private GUIContent _discordContent;

		private GUIStyle[] _lvStyles;

		private GUIStyle[] _dvStyles;

		private GUISkin _skin;

		private static readonly int WinId = StableWinId();

		private readonly GUIContent _gcBuf = new GUIContent();

		private static readonly string _grabRaw = "grab grab grab grab grab grab grab grab grab grab grab";

		private static string _grabRich;

		private readonly Queue<string> _repLog = new Queue<string>();

		private const int RepCap = 40;

		private int _dragType;

		private Rect _dragTrack;

		private readonly HashSet<string> _closedSections = new HashSet<string>();

		private int _sceneCacheFrame = -1;

		private readonly List<GameObject> _sceneCache = new List<GameObject>();

		private int _snapFrame = -1;

		private readonly HashSet<int> _snapIds = new HashSet<int>();

		private readonly HashSet<int> _snapInactiveIds = new HashSet<int>();

		private HashSet<int> _snapShared;

		private HashSet<int> _snapInactiveShared;

		private readonly List<string> _monsterKeys = new List<string>();

		private readonly List<PendingCapture> _pendingCaptures = new List<PendingCapture>();

		private readonly List<GameObject> _freshBuf = new List<GameObject>(256);

		private bool _capturing;

		private float _vanillaTimer;

		private readonly HashSet<int> _modIds = new HashSet<int>();

		private readonly HashSet<int> _vanillaSeen = new HashSet<int>();

		private bool _isKilling;

		private float _killTimer;

		private static readonly Stack<List<Monster>> _pool = new Stack<List<Monster>>();

		private Texture2D MkT(Color c)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: 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_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0065: Expected O, but got Unknown
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			int key = ((int)(c.r * 255f) << 24) | ((int)(c.g * 255f) << 16) | ((int)(c.b * 255f) << 8) | (int)(c.a * 255f);
			if (_solidCache.TryGetValue(key, out var value) && (Object)(object)value != (Object)null)
			{
				return value;
			}
			value = new Texture2D(1, 1, (TextureFormat)4, false);
			value.SetPixel(0, 0, c);
			value.Apply();
			_solidCache[key] = value;
			return value;
		}

		private Texture2D MakeDiscordIcon(int w, int h)
		{
			//IL_02c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_02cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d4: Expected O, but got Unknown
			//IL_0163: Unknown result type (might be due to invalid IL or missing references)
			//IL_0168: Unknown result type (might be due to invalid IL or missing references)
			//IL_0212: Unknown result type (might be due to invalid IL or missing references)
			//IL_0217: Unknown result type (might be due to invalid IL or missing references)
			//IL_0297: Unknown result type (might be due to invalid IL or missing references)
			//IL_029c: Unknown result type (might be due to invalid IL or missing references)
			w = Mathf.Max(w, 8);
			h = Mathf.Max(h, 8);
			Color[] array = (Color[])(object)new Color[w * h];
			float num = 4f;
			float num2 = num - 0.5f;
			float num3 = 1f;
			float num4 = (float)w - 1f;
			float num5 = 3f;
			float num6 = (float)h - 0.5f;
			float num7 = 2.6f;
			float num8 = 5.5f;
			float num9 = (float)w - 5.5f;
			float num10 = 3f;
			float num11 = 1.5f;
			float num12 = (float)h * 0.52f;
			float num13 = 3.4f;
			for (int i = 0; i < h; i++)
			{
				float num14 = (float)i + 0.5f;
				for (int j = 0; j < w; j++)
				{
					float num15 = (float)j + 0.5f;
					float num16 = 0f;
					float num17 = -1f;
					if (num15 < num3 + num && num14 < num5 + num)
					{
						num16 = num3 + num - num15;
						num17 = num5 + num - num14;
					}
					else if (num15 > num4 - num && num14 < num5 + num)
					{
						num16 = num15 - (num4 - num);
						num17 = num5 + num - num14;
					}
					else if (num15 < num3 + num && num14 > num6 - num)
					{
						num16 = num3 + num - num15;
						num17 = num14 - (num6 - num);
					}
					else if (num15 > num4 - num && num14 > num6 - num)
					{
						num16 = num15 - (num4 - num);
						num17 = num14 - (num6 - num);
					}
					else if (num15 < num3 || num15 > num4 || num14 < num5 || num14 > num6)
					{
						array[i * w + j] = Color.clear;
						continue;
					}
					float num18 = 1f;
					if (num17 >= 0f)
					{
						num18 = Mathf.Clamp01(1f - (Mathf.Sqrt(num16 * num16 + num17 * num17) - num2));
					}
					float num19 = Mathf.Sqrt((num15 - num8) * (num15 - num8) + (num14 - num10) * (num14 - num10));
					float num20 = Mathf.Sqrt((num15 - num9) * (num15 - num9) + (num14 - num10) * (num14 - num10));
					float num21 = Mathf.Clamp01(num7 + 0.5f - Mathf.Min(num19, num20));
					float num22 = Mathf.Max(num18, num21);
					if (num22 <= 0f)
					{
						array[i * w + j] = Color.clear;
						continue;
					}
					float num23 = ((num15 < (float)w * 0.5f) ? ((float)w * 0.5f - num13) : ((float)w * 0.5f + num13));
					float num24 = num15 - num23;
					float num25 = num14 - num12;
					float num26 = Mathf.Clamp01(num11 + 0.5f - Mathf.Sqrt(num24 * num24 + num25 * num25));
					array[i * w + j] = new Color(1f, 1f, 1f, num22 * (1f - num26));
				}
			}
			Texture2D val = new Texture2D(w, h, (TextureFormat)4, false);
			val.SetPixels(array);
			val.Apply();
			return val;
		}

		private Texture2D RoundedRect(int w, int h, Color fill, int rad)
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: 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)
			//IL_0056: 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_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0227: Unknown result type (might be due to invalid IL or missing references)
			//IL_022d: Expected O, but got Unknown
			//IL_01d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01da: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0202: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b4: Unknown result type (might be due to invalid IL or missing references)
			if (w <= 0 || h <= 0 || rad <= 0)
			{
				return MkT(fill);
			}
			w = Mathf.Max(w, 2);
			h = Mathf.Max(h, 2);
			rad = Mathf.Min(rad, Mathf.Min(w, h) / 2);
			Color32 val = Color32.op_Implicit(fill);
			long key = (long)((ulong)(((long)w << 42) | ((long)h << 30)) | ((ulong)val.r << 22) | ((ulong)val.g << 14) | ((ulong)val.b << 6) | ((ulong)val.a << 2)) | (long)(rad & 0xFF);
			if (_rrCache.TryGetValue(key, out var value) && (Object)(object)value != (Object)null)
			{
				return value;
			}
			int num = w * h;
			Color[] array = ((_rrBuf != null && _rrBuf.Length == num) ? _rrBuf : (_rrBuf = (Color[])(object)new Color[num]));
			float num2 = rad;
			float num3 = num2 - 0.5f;
			for (int i = 0; i < h; i++)
			{
				int num4 = i * w;
				float num5 = i;
				for (int j = 0; j < w; j++)
				{
					float num6 = 0f;
					float num7 = 0f;
					if ((float)j < num2 && (float)i < num2)
					{
						num6 = num2 - (float)j;
						num7 = num2 - num5;
					}
					else if ((float)j >= (float)w - num2 && (float)i < num2)
					{
						num6 = (float)j - ((float)w - num2 - 1f);
						num7 = num2 - num5;
					}
					else if ((float)j < num2 && (float)i >= (float)h - num2)
					{
						num6 = num2 - (float)j;
						num7 = num5 - ((float)h - num2 - 1f);
					}
					else
					{
						if (!((float)j >= (float)w - num2) || !((float)i >= (float)h - num2))
						{
							array[num4 + j] = fill;
							continue;
						}
						num6 = (float)j - ((float)w - num2 - 1f);
						num7 = num5 - ((float)h - num2 - 1f);
					}
					float num8 = Mathf.Sqrt(num6 * num6 + num7 * num7);
					array[num4 + j] = new Color(fill.r, fill.g, fill.b, fill.a * Mathf.Clamp01(1f - (num8 - num3)));
				}
			}
			value = new Texture2D(w, h, (TextureFormat)4, false);
			value.SetPixels(array);
			value.Apply();
			_rrCache[key] = value;
			return value;
		}

		private Texture2D RoundedRect(int w, int h, Color fill, int rad, bool topL, bool topR, bool botR, bool botL)
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_0082: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_028d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0293: Expected O, but got Unknown
			//IL_023a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0240: Unknown result type (might be due to invalid IL or missing references)
			//IL_0246: Unknown result type (might be due to invalid IL or missing references)
			//IL_024c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0263: Unknown result type (might be due to invalid IL or missing references)
			//IL_0268: Unknown result type (might be due to invalid IL or missing references)
			//IL_0219: Unknown result type (might be due to invalid IL or missing references)
			//IL_021a: Unknown result type (might be due to invalid IL or missing references)
			if (w <= 0 || h <= 0 || rad <= 0)
			{
				return MkT(fill);
			}
			w = Mathf.Max(w, 2);
			h = Mathf.Max(h, 2);
			rad = Mathf.Min(rad, Mathf.Min(w, h) / 2);
			Color32 val = Color32.op_Implicit(fill);
			int num = (topL ? 8 : 0) | (topR ? 4 : 0) | (botR ? 2 : 0) | (botL ? 1 : 0);
			long key = (long)((ulong)(((long)w << 42) | ((long)h << 30)) | ((ulong)val.r << 22) | ((ulong)val.g << 14) | ((ulong)val.b << 6) | ((ulong)val.a << 2)) | (long)((rad & 0xFF) | 0x100 | (num << 9));
			if (_rrCache.TryGetValue(key, out var value) && (Object)(object)value != (Object)null)
			{
				return value;
			}
			int num2 = w * h;
			Color[] array = ((_rrBuf != null && _rrBuf.Length == num2) ? _rrBuf : (_rrBuf = (Color[])(object)new Color[num2]));
			float num3 = rad;
			float num4 = num3 - 0.5f;
			for (int i = 0; i < h; i++)
			{
				int num5 = i * w;
				float num6 = i;
				for (int j = 0; j < w; j++)
				{
					float num7 = 0f;
					float num8 = 0f;
					bool flag = false;
					if ((float)j < num3 && (float)i < num3 && topL)
					{
						num7 = num3 - (float)j;
						num8 = num3 - num6;
						flag = true;
					}
					else if ((float)j >= (float)w - num3 && (float)i < num3 && topR)
					{
						num7 = (float)j - ((float)w - num3 - 1f);
						num8 = num3 - num6;
						flag = true;
					}
					else if ((float)j < num3 && (float)i >= (float)h - num3 && botL)
					{
						num7 = num3 - (float)j;
						num8 = num6 - ((float)h - num3 - 1f);
						flag = true;
					}
					else if ((float)j >= (float)w - num3 && (float)i >= (float)h - num3 && botR)
					{
						num7 = (float)j - ((float)w - num3 - 1f);
						num8 = num6 - ((float)h - num3 - 1f);
						flag = true;
					}
					if (!flag)
					{
						array[num5 + j] = fill;
						continue;
					}
					float num9 = Mathf.Sqrt(num7 * num7 + num8 * num8);
					array[num5 + j] = new Color(fill.r, fill.g, fill.b, fill.a * Mathf.Clamp01(1f - (num9 - num4)));
				}
			}
			value = new Texture2D(w, h, (TextureFormat)4, false);
			value.SetPixels(array);
			value.Apply();
			_rrCache[key] = value;
			return value;
		}

		private static int StableWinId()
		{
			int num = 23;
			string text = "com.monsterspawner.gui";
			for (int i = 0; i < text.Length; i++)
			{
				num = num * 31 + text[i];
			}
			return num;
		}

		private void InitStyles()
		{
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Expected O, but got Unknown
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Expected O, but got Unknown
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_006f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_009a: Expected O, but got Unknown
			//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d5: Expected O, but got Unknown
			//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0104: Unknown result type (might be due to invalid IL or missing references)
			//IL_0110: Expected O, but got Unknown
			//IL_011b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0120: Unknown result type (might be due to invalid IL or missing references)
			//IL_0128: Unknown result type (might be due to invalid IL or missing references)
			//IL_012f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0136: Unknown result type (might be due to invalid IL or missing references)
			//IL_013d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0142: Unknown result type (might be due to invalid IL or missing references)
			//IL_014c: Expected O, but got Unknown
			//IL_0151: Expected O, but got Unknown
			//IL_015c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0161: Unknown result type (might be due to invalid IL or missing references)
			//IL_0169: Unknown result type (might be due to invalid IL or missing references)
			//IL_0170: Unknown result type (might be due to invalid IL or missing references)
			//IL_0177: Unknown result type (might be due to invalid IL or missing references)
			//IL_018c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0196: Unknown result type (might be due to invalid IL or missing references)
			//IL_019b: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a5: Expected O, but got Unknown
			//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_01b4: Expected O, but got Unknown
			//IL_01b9: Expected O, but got Unknown
			//IL_01c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01df: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0203: Unknown result type (might be due to invalid IL or missing references)
			//IL_020d: Unknown result type (might be due to invalid IL or missing references)
			//IL_022a: Unknown result type (might be due to invalid IL or missing references)
			//IL_023a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0240: Unknown result type (might be due to invalid IL or missing references)
			//IL_024a: Unknown result type (might be due to invalid IL or missing references)
			//IL_024f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0259: Expected O, but got Unknown
			//IL_0259: Unknown result type (might be due to invalid IL or missing references)
			//IL_025e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0268: Expected O, but got Unknown
			//IL_026d: Expected O, but got Unknown
			//IL_0278: Unknown result type (might be due to invalid IL or missing references)
			//IL_027d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0285: Unknown result type (might be due to invalid IL or missing references)
			//IL_0290: Unknown result type (might be due to invalid IL or missing references)
			//IL_0297: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_02db: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_02fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0306: Unknown result type (might be due to invalid IL or missing references)
			//IL_0317: Unknown result type (might be due to invalid IL or missing references)
			//IL_031d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0327: Unknown result type (might be due to invalid IL or missing references)
			//IL_032e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0338: Expected O, but got Unknown
			//IL_0338: Unknown result type (might be due to invalid IL or missing references)
			//IL_0344: Expected O, but got Unknown
			//IL_034f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0354: Unknown result type (might be due to invalid IL or missing references)
			//IL_035c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0363: Unknown result type (might be due to invalid IL or missing references)
			//IL_036a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0384: Unknown result type (might be due to invalid IL or missing references)
			//IL_038e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0395: Unknown result type (might be due to invalid IL or missing references)
			//IL_039f: Expected O, but got Unknown
			//IL_039f: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ab: Expected O, but got Unknown
			//IL_03b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_03bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_03eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_03fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0402: Unknown result type (might be due to invalid IL or missing references)
			//IL_040c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0417: Unknown result type (might be due to invalid IL or missing references)
			//IL_0428: Unknown result type (might be due to invalid IL or missing references)
			//IL_042e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0438: Unknown result type (might be due to invalid IL or missing references)
			//IL_0444: Expected O, but got Unknown
			//IL_044f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0454: Unknown result type (might be due to invalid IL or missing references)
			//IL_045c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0463: Unknown result type (might be due to invalid IL or missing references)
			//IL_046e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0475: Unknown result type (might be due to invalid IL or missing references)
			//IL_0480: Unknown result type (might be due to invalid IL or missing references)
			//IL_0490: Unknown result type (might be due to invalid IL or missing references)
			//IL_0496: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_04bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_04c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_04cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_04e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_04f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_04fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0505: Unknown result type (might be due to invalid IL or missing references)
			//IL_050a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0514: Expected O, but got Unknown
			//IL_0514: Unknown result type (might be due to invalid IL or missing references)
			//IL_0520: Expected O, but got Unknown
			//IL_052b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0530: Unknown result type (might be due to invalid IL or missing references)
			//IL_0538: Unknown result type (might be due to invalid IL or missing references)
			//IL_053f: Unknown result type (might be due to invalid IL or missing references)
			//IL_054a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0558: Unknown result type (might be due to invalid IL or missing references)
			//IL_0569: Unknown result type (might be due to invalid IL or missing references)
			//IL_056f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0579: Unknown result type (might be due to invalid IL or missing references)
			//IL_0587: Unknown result type (might be due to invalid IL or missing references)
			//IL_0598: Unknown result type (might be due to invalid IL or missing references)
			//IL_059e: Unknown result type (might be due to invalid IL or missing references)
			//IL_05a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_05b4: Expected O, but got Unknown
			//IL_05bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_05c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_05cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_05d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_05de: Unknown result type (might be due to invalid IL or missing references)
			//IL_05e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_05f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0608: Unknown result type (might be due to invalid IL or missing references)
			//IL_060e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0618: Unknown result type (might be due to invalid IL or missing references)
			//IL_0626: Unknown result type (might be due to invalid IL or missing references)
			//IL_063b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0641: Unknown result type (might be due to invalid IL or missing references)
			//IL_064b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0657: Expected O, but got Unknown
			//IL_0662: Unknown result type (might be due to invalid IL or missing references)
			//IL_0667: Unknown result type (might be due to invalid IL or missing references)
			//IL_066f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0676: Unknown result type (might be due to invalid IL or missing references)
			//IL_0681: Unknown result type (might be due to invalid IL or missing references)
			//IL_068c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0693: Unknown result type (might be due to invalid IL or missing references)
			//IL_069e: Unknown result type (might be due to invalid IL or missing references)
			//IL_06b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_06b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_06c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_06ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_06e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_06e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_06f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_06ff: Expected O, but got Unknown
			//IL_070a: Unknown result type (might be due to invalid IL or missing references)
			//IL_070f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0717: Unknown result type (might be due to invalid IL or missing references)
			//IL_0722: Unknown result type (might be due to invalid IL or missing references)
			//IL_0729: Unknown result type (might be due to invalid IL or missing references)
			//IL_0730: Unknown result type (might be due to invalid IL or missing references)
			//IL_073b: Unknown result type (might be due to invalid IL or missing references)
			//IL_074b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0751: Unknown result type (might be due to invalid IL or missing references)
			//IL_075b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0766: Unknown result type (might be due to invalid IL or missing references)
			//IL_0776: Unknown result type (might be due to invalid IL or missing references)
			//IL_077c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0786: Unknown result type (might be due to invalid IL or missing references)
			//IL_078b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0795: Expected O, but got Unknown
			//IL_0795: Unknown result type (might be due to invalid IL or missing references)
			//IL_07a1: Expected O, but got Unknown
			//IL_07ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_07b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_07b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_07c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_07c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_07cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_07d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_07dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_07e6: Expected O, but got Unknown
			//IL_07e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_07eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_07f5: Expected O, but got Unknown
			//IL_07fa: Expected O, but got Unknown
			//IL_0805: Unknown result type (might be due to invalid IL or missing references)
			//IL_080a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0812: Unknown result type (might be due to invalid IL or missing references)
			//IL_0819: Unknown result type (might be due to invalid IL or missing references)
			//IL_0824: Unknown result type (might be due to invalid IL or missing references)
			//IL_082b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0830: Unknown result type (might be due to invalid IL or missing references)
			//IL_083a: Expected O, but got Unknown
			//IL_083a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0848: Unknown result type (might be due to invalid IL or missing references)
			//IL_0858: Unknown result type (might be due to invalid IL or missing references)
			//IL_085e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0868: Unknown result type (might be due to invalid IL or missing references)
			//IL_0876: Unknown result type (might be due to invalid IL or missing references)
			//IL_0886: Unknown result type (might be due to invalid IL or missing references)
			//IL_088c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0896: Unknown result type (might be due to invalid IL or missing references)
			//IL_08a2: Expected O, but got Unknown
			//IL_08ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_08b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_08ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_08c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_08cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_08d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_08db: Expected O, but got Unknown
			//IL_08db: Unknown result type (might be due to invalid IL or missing references)
			//IL_08e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_08f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_08ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0909: Unknown result type (might be due to invalid IL or missing references)
			//IL_0917: Unknown result type (might be due to invalid IL or missing references)
			//IL_0927: Unknown result type (might be due to invalid IL or missing references)
			//IL_092d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0937: Unknown result type (might be due to invalid IL or missing references)
			//IL_0943: Expected O, but got Unknown
			//IL_094e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0953: Unknown result type (might be due to invalid IL or missing references)
			//IL_095b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0966: Unknown result type (might be due to invalid IL or missing references)
			//IL_0971: Unknown result type (might be due to invalid IL or missing references)
			//IL_098b: Unknown result type (might be due to invalid IL or missing references)
			//IL_099c: Unknown result type (might be due to invalid IL or missing references)
			//IL_09a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_09ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_09c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_09d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_09dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_09e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_09f3: Expected O, but got Unknown
			//IL_09fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a03: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a0b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a16: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a21: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a3b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a4c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a61: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a6b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a85: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a96: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a9c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0aa6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ab2: Expected O, but got Unknown
			//IL_0abd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ac2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0aca: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ad5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0adc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ae6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0af7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0afd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b07: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b11: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b22: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b28: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b32: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b3e: Expected O, but got Unknown
			//IL_0b49: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b4e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b56: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b61: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b68: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b8a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b9b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ba1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bab: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bcd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bde: Unknown result type (might be due to invalid IL or missing references)
			//IL_0be4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bee: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bfa: Expected O, but got Unknown
			//IL_0bff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c09: Expected O, but got Unknown
			//IL_0c0d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c13: Expected O, but got Unknown
			//IL_0cc9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cd3: Expected O, but got Unknown
			//IL_0cde: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ce3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cea: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cf2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cf9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d04: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d0b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d12: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d1d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d2e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d34: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d3e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d58: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d69: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d6f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d79: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d93: Unknown result type (might be due to invalid IL or missing references)
			//IL_0da4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0daa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0db4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0db9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0dc3: Expected O, but got Unknown
			//IL_0dc3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0dc8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0dd2: Expected O, but got Unknown
			//IL_0dd7: Expected O, but got Unknown
			//IL_0de2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0de7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0dee: Unknown result type (might be due to invalid IL or missing references)
			//IL_0df6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0dfd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e04: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e0a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e14: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e20: Expected O, but got Unknown
			//IL_0e41: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e61: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e81: Unknown result type (might be due to invalid IL or missing references)
			//IL_0eb4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ee8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f1c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f3d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f47: Expected O, but got Unknown
			//IL_0f6b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f9f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0fd3: Unknown result type (might be due to invalid IL or missing references)
			//IL_1009: Unknown result type (might be due to invalid IL or missing references)
			//IL_1013: Expected O, but got Unknown
			//IL_103e: Unknown result type (might be due to invalid IL or missing references)
			//IL_1043: Unknown result type (might be due to invalid IL or missing references)
			//IL_104a: Unknown result type (might be due to invalid IL or missing references)
			//IL_1059: Unknown result type (might be due to invalid IL or missing references)
			//IL_105f: Unknown result type (might be due to invalid IL or missing references)
			//IL_1069: Unknown result type (might be due to invalid IL or missing references)
			//IL_1070: Unknown result type (might be due to invalid IL or missing references)
			//IL_107f: Unknown result type (might be due to invalid IL or missing references)
			//IL_1085: Unknown result type (might be due to invalid IL or missing references)
			//IL_108f: Unknown result type (might be due to invalid IL or missing references)
			//IL_1096: Unknown result type (might be due to invalid IL or missing references)
			//IL_10a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_10ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_10b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_10bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_10cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_10d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_10db: Unknown result type (might be due to invalid IL or missing references)
			//IL_10e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_10f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_10f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_1101: Unknown result type (might be due to invalid IL or missing references)
			//IL_1108: Unknown result type (might be due to invalid IL or missing references)
			//IL_1117: Unknown result type (might be due to invalid IL or missing references)
			//IL_111d: Unknown result type (might be due to invalid IL or missing references)
			//IL_1127: Unknown result type (might be due to invalid IL or missing references)
			//IL_112e: Unknown result type (might be due to invalid IL or missing references)
			//IL_113d: Unknown result type (might be due to invalid IL or missing references)
			//IL_1143: Unknown result type (might be due to invalid IL or missing references)
			//IL_114d: Unknown result type (might be due to invalid IL or missing references)
			//IL_1152: Unknown result type (might be due to invalid IL or missing references)
			//IL_115c: Expected O, but got Unknown
			//IL_115c: Unknown result type (might be due to invalid IL or missing references)
			//IL_1161: Unknown result type (might be due to invalid IL or missing references)
			//IL_116b: Expected O, but got Unknown
			//IL_116b: Unknown result type (might be due to invalid IL or missing references)
			//IL_1170: Unknown result type (might be due to invalid IL or missing references)
			//IL_117a: Expected O, but got Unknown
			//IL_117a: Unknown result type (might be due to invalid IL or missing references)
			//IL_117b: Unknown result type (might be due to invalid IL or missing references)
			//IL_1185: Unknown result type (might be due to invalid IL or missing references)
			//IL_1192: Expected O, but got Unknown
			//IL_0c2c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c36: Expected O, but got Unknown
			//IL_11d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_11c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_11dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_11ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_11f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_11f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_1200: Unknown result type (might be due to invalid IL or missing references)
			//IL_1206: Unknown result type (might be due to invalid IL or missing references)
			//IL_120e: Expected O, but got Unknown
			//IL_121c: Unknown result type (might be due to invalid IL or missing references)
			//IL_1221: Unknown result type (might be due to invalid IL or missing references)
			//IL_1229: Unknown result type (might be due to invalid IL or missing references)
			//IL_122f: Unknown result type (might be due to invalid IL or missing references)
			//IL_123a: Expected O, but got Unknown
			//IL_0c66: Unknown result type (might be due to invalid IL or missing references)
			ready = true;
			int w = (int)(((Rect)(ref _wRect)).width - 20f);
			RectOffset overflow = new RectOffset(0, 0, 2, 3);
			GUIStyle val = new GUIStyle(GUI.skin.label)
			{
				fontSize = 11,
				alignment = (TextAnchor)3
			};
			val.normal.textColor = ColTxt;
			val.overflow = overflow;
			_ls = val;
			GUIStyle val2 = new GUIStyle(GUI.skin.label)
			{
				fontSize = 18,
				fontStyle = (FontStyle)1
			};
			val2.normal.textColor = Color.white;
			val2.overflow = overflow;
			_ts = val2;
			GUIStyle val3 = new GUIStyle(GUI.skin.label)
			{
				fontSize = 11,
				fontStyle = (FontStyle)1
			};
			val3.normal.textColor = Color.white;
			val3.overflow = overflow;
			_secS = val3;
			GUIStyle val4 = new GUIStyle(GUI.skin.label)
			{
				fontSize = 10
			};
			val4.normal.textColor = ColTxt;
			val4.alignment = (TextAnchor)4;
			val4.overflow = overflow;
			_footer = val4;
			_toastStyle = new GUIStyle(GUI.skin.label)
			{
				fontSize = 15,
				fontStyle = (FontStyle)1,
				alignment = (TextAnchor)4,
				wordWrap = true,
				overflow = new RectOffset(0, 0, 3, 4)
			};
			GUIStyle val5 = new GUIStyle(GUI.skin.label)
			{
				fontSize = 11,
				alignment = (TextAnchor)3,
				wordWrap = true
			};
			val5.normal.textColor = new Color(0.82f, 0.83f, 0.86f);
			val5.padding = new RectOffset(0, 0, 0, 0);
			val5.overflow = new RectOffset(0, 0, 0, 0);
			_bugSub = val5;
			GUIStyle val6 = new GUIStyle(GUI.skin.textArea)
			{
				fontSize = 11,
				alignment = (TextAnchor)0,
				wordWrap = true
			};
			val6.normal.background = RoundedRect(356, 62, ColDark, 6);
			val6.normal.textColor = Color.white;
			val6.focused.background = RoundedRect(356, 62, new Color(0.22f, 0.22f, 0.22f), 6);
			val6.focused.textColor = Color.white;
			val6.padding = new RectOffset(8, 8, 6, 6);
			val6.overflow = new RectOffset(0, 0, 0, 0);
			_bugArea = val6;
			GUIStyle val7 = new GUIStyle(GUI.skin.textField)
			{
				fontSize = 11,
				fixedHeight = 30f,
				alignment = (TextAnchor)3
			};
			val7.normal.background = RoundedRect(w, 30, ColDark, 12);
			val7.normal.textColor = ColTxt;
			val7.focused.background = RoundedRect(w, 30, new Color(0.22f, 0.22f, 0.22f), 12);
			val7.focused.textColor = Color.white;
			val7.hover.background = RoundedRect(w, 30, ColDarkH, 12);
			val7.hover.textColor = ColTxt;
			val7.padding = new RectOffset(10, 10, 0, 0);
			val7.overflow = overflow;
			_searchField = val7;
			GUIStyle val8 = new GUIStyle(GUI.skin.label)
			{
				fontSize = 11,
				fontStyle = (FontStyle)0,
				alignment = (TextAnchor)3
			};
			val8.normal.textColor = new Color(1f, 1f, 1f, 0.45f);
			val8.padding = new RectOffset(10, 10, 0, 0);
			val8.overflow = overflow;
			_searchHint = val8;
			GUIStyle val9 = new GUIStyle(GUI.skin.button)
			{
				fontSize = 10,
				fontStyle = (FontStyle)1,
				fixedHeight = 22f,
				fixedWidth = 34f
			};
			val9.normal.background = RoundedRect(34, 22, ColDark, 12);
			val9.normal.textColor = Color.white;
			val9.hover.background = RoundedRect(34, 22, ColDarkH, 12);
			val9.hover.textColor = Color.white;
			val9.overflow = overflow;
			_preset = val9;
			GUIStyle val10 = new GUIStyle(GUI.skin.textField)
			{
				fontSize = 11,
				fontStyle = (FontStyle)1,
				fixedHeight = 22f,
				alignment = (TextAnchor)4
			};
			val10.normal.background = RoundedRect(38, 22, ColDark, 5);
			val10.normal.textColor = Color.white;
			val10.hover.background = RoundedRect(38, 22, ColDarkH, 5);
			val10.hover.textColor = Color.white;
			val10.focused.background = RoundedRect(38, 22, new Color(0.22f, 0.22f, 0.22f), 5);
			val10.focused.textColor = Color.white;
			val10.padding = new RectOffset(2, 2, 0, 0);
			val10.overflow = overflow;
			_amtField = val10;
			GUIStyle val11 = new GUIStyle(GUI.skin.button)
			{
				fontSize = 12,
				fontStyle = (FontStyle)1,
				fixedHeight = 28f
			};
			val11.normal.background = RoundedRect(188, 28, ColGreen, 12);
			val11.normal.textColor = ColGreenTxt;
			val11.hover.background = RoundedRect(188, 28, ColGreenH, 12);
			val11.hover.textColor = ColGreenTxt;
			val11.overflow = overflow;
			_fBtn = val11;
			GUIStyle val12 = new GUIStyle(GUI.skin.button)
			{
				fontSize = 11,
				fontStyle = (FontStyle)1,
				fixedHeight = 28f,
				alignment = (TextAnchor)4
			};
			val12.normal.background = RoundedRect(188, 28, ColRed, 12, topL: true, topR: false, botR: false, botL: true);
			val12.normal.textColor = ColRedTxt;
			val12.hover.background = RoundedRect(188, 28, ColRedH, 12, topL: true, topR: false, botR: false, botL: true);
			val12.hover.textColor = ColRedTxt;
			val12.overflow = overflow;
			_killBtn = val12;
			GUIStyle val13 = new GUIStyle(GUI.skin.button)
			{
				fontSize = 11,
				fontStyle = (FontStyle)1,
				fixedHeight = 28f,
				fixedWidth = 28f,
				alignment = (TextAnchor)4
			};
			val13.normal.background = RoundedRect(28, 28, ColRed, 12, topL: false, topR: true, botR: true, botL: false);
			val13.normal.textColor = ColRedTxt;
			val13.hover.background = RoundedRect(28, 28, ColRedH, 12, topL: false, topR: true, botR: true, botL: false);
			val13.hover.textColor = ColRedTxt;
			val13.overflow = overflow;
			_killArrow = val13;
			GUIStyle val14 = new GUIStyle(GUI.skin.button)
			{
				fontSize = 9,
				fixedHeight = 16f,
				fontStyle = (FontStyle)1,
				alignment = (TextAnchor)4
			};
			val14.normal.background = RoundedRect(34, 16, ColRed, 4);
			val14.normal.textColor = ColRedTxt;
			val14.hover.background = RoundedRect(34, 16, ColRedH, 4);
			val14.hover.textColor = ColRedTxt;
			val14.padding = new RectOffset(0, 0, 0, 0);
			val14.overflow = overflow;
			_killCountStyle = val14;
			GUIStyle val15 = new GUIStyle(GUI.skin.label)
			{
				fontSize = 10,
				fontStyle = (FontStyle)1,
				alignment = (TextAnchor)4
			};
			val15.normal.textColor = Color.white;
			val15.padding = new RectOffset(0, 0, 0, 0);
			val15.overflow = new RectOffset(0, 0, 0, 0);
			_pill = val15;
			GUIStyle val16 = new GUIStyle(GUI.skin.button)
			{
				fontSize = 10,
				fontStyle = (FontStyle)1,
				fixedHeight = 24f,
				alignment = (TextAnchor)3,
				padding = new RectOffset(8, 8, 0, 0)
			};
			val16.normal.background = RoundedRect(362, 24, ColDark, 6);
			val16.normal.textColor = Color.white;
			val16.hover.background = RoundedRect(362, 24, ColDarkH, 6);
			val16.hover.textColor = Color.white;
			val16.overflow = overflow;
			_catBtn = val16;
			GUIStyle val17 = new GUIStyle(GUI.skin.button)
			{
				fontSize = 11,
				fixedHeight = 26f,
				alignment = (TextAnchor)3,
				padding = new RectOffset(6, 6, 0, 0)
			};
			val17.normal.background = RoundedRect(220, 26, ColDark, 5);
			val17.normal.textColor = ColTxt;
			val17.hover.background = RoundedRect(220, 26, ColDarkH, 5);
			val17.hover.textColor = Color.white;
			val17.overflow = overflow;
			_monBtn = val17;
			GUIStyle val18 = new GUIStyle(GUI.skin.button)
			{
				fontSize = 12,
				fixedHeight = 26f,
				fixedWidth = 26f
			};
			val18.normal.background = RoundedRect(26, 26, new Color(0.15f, 0.12f, 0.02f), 12);
			val18.normal.textColor = ColStar;
			val18.hover.background = RoundedRect(26, 26, new Color(0.22f, 0.18f, 0.04f), 12);
			val18.hover.textColor = ColStar;
			val18.overflow = overflow;
			_favOn = val18;
			GUIStyle val19 = new GUIStyle(GUI.skin.button)
			{
				fontSize = 12,
				fixedHeight = 26f,
				fixedWidth = 26f
			};
			val19.normal.background = RoundedRect(26, 26, new Color(0.1f, 0.1f, 0.1f), 12);
			val19.normal.textColor = new Color(0.5f, 0.5f, 0.5f);
			val19.hover.background = RoundedRect(26, 26, new Color(0.18f, 0.18f, 0.18f), 12);
			val19.hover.textColor = ColStar;
			val19.overflow = overflow;
			_favOff = val19;
			GUIStyle val20 = new GUIStyle(GUI.skin.button)
			{
				fontSize = 10,
				fixedHeight = 20f,
				alignment = (TextAnchor)4
			};
			val20.normal.background = RoundedRect(w, 20, ColDark, 12);
			val20.normal.textColor = ColTxt;
			val20.hover.background = RoundedRect(w, 20, ColDarkH, 12);
			val20.hover.textColor = ColTxt;
			val20.overflow = overflow;
			_legendBtn = val20;
			GUIStyle val21 = new GUIStyle(GUI.skin.button)
			{
				fontSize = 10,
				fixedHeight = 26f,
				alignment = (TextAnchor)4
			};
			val21.normal.background = RoundedRect(134, 26, new Color(0.22f, 0.22f, 0.22f, 0.95f), 12);
			val21.normal.textColor = Color.white;
			val21.hover.background = RoundedRect(134, 26, new Color(0.28f, 0.28f, 0.28f, 0.95f), 12);
			val21.hover.textColor = Color.white;
			val21.overflow = overflow;
			_footerBtn = val21;
			_discordIcon = new Texture2D(2, 2, (TextureFormat)4, false);
			try
			{
				Texture2D val22 = new Texture2D(2, 2, (TextureFormat)4, false);
				if (ImageConversion.LoadImage(val22, Convert.FromBase64String("iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAAKlBMVEVHcExYZfJXZPFYZfJXZPBYZfL///9RX/JHV/HEyPqepffh5P2FjvVsd/StrBPNAAAABXRSTlMA1UaXEmpP0/0AAASaSURBVHicxVvbgqsgDFxBC97+/3cXtFaQXBDQzHnZU1tnTEKIBP7+StArpXXXdcMG94fWSvVFtyrg1l/eFJ1+WgVBHoh4jp0jP/CEhj6b/auhrS8Ua/kUXTszlNA3lFBK30hCX0G/SaiMhZuhB0FX0Kt6eo9iPzR4/B1lRqj1foSCSGhk/gO33dDM/AduuqGl+b/ohPlvKXiC3kOaP1fBc/x5Cp7kz1HwSPydYCPxYX5WQfP8k4LMSI3zLwwiK/dv8FMz0zv8eBi8EAA7kDB4JQB2wGHwHj+cj15zgAfghJdGwIF0JDyeAmMkI+HFCNxxjcMbBjDGGvBza8DPYXRlBvDkyzgvENMyj8sNEeq+AYy1jvzjYdOrdrvgRFjYQFd0Nw3gnm3ayT2mjcN8sf09/S7OE+KkGOqOAYx79k8Ia+2wLsvk/i3LOrj/RpedHVgJgQnYHBA83vGU7AcTq+DMBVwSNNeb54FTcKZD5ot25MkgjECoRsgMQbOU8X8+4GgNoPI8YHkmDIwJdJYHTKEDPLhAzEsC5fyfD3NrleGB0gjcwcShzshCaw3/57OSN+/4LGSTBHMPM22Cng2BSgNwJlBcCNRFgAcdBZoNgVp+ZiB0TBaoyQE/E5C5gInBiiR4gvRBT8ZgOguXgEyHihRQOwZ3kCNR0YOgBT9dF2hKQBsP0D7Q1Chs4wHaBx0lAK7ERleKgqNzdPUpPGwJC1ACwEposr4Ot2talK7+irWQ24jKqCPyEJSFpq81zdU981GGQwqoXEQIAEIgTOzxleBnqW4qCCgB6aMETxLzhMqA0CkSAIRANLNFE3U46QImIIKAEJA6MxrQkYGiR2R+mC0gfZBYQBAikZMB5UQU4sMQiME8CwAC8Cgk8gAQg5kCgOHbSED4IHGMhlEGZXBCAD4ZpbcJgz2mCaVBdSxKQsyG0H1OnusgPU0ATmFobazRggR+Jz4ygUnkrUcqBucjNBEQFRH8Uj4PFplyJuuvDPAUTgjAilK0GpnHEamV3QWsgkAzUY+W5a3KIUYA/mLyjoAOfzV7R4DGX07fEaCI1/PipSkI2Cjo8QWK8rWxGwI6aommemUgBJIJNbVIlQoY7ZLxpjAuQDJEBChqmS6dVcfB2mEiNcyT/076SyQE6IVKCxSFxrpsC7+X+DeTwV8GSkJkNj4WKtH5CLDl6CYdNxesU5R2XXqeVt+oMCvwE3Tl/tcxQK57I6QG3wJ6ewlyxh5W513rp6Fr1+KnbcVr8ozlepPMe9fyLn66pBiYiMbFuVxPLdNcJdAr4JfsQdFHzUtypSySwPUAwrCh6aOuFdcxsL/BxzejDlexXaOob8d1rdwL+cg7YPvm5oRxZZtWceeS79ttTUO2CTN4J2SwD0nvNqNzeXQIWQVZX7t2r8Wb1+Lte/kNDOJbOOQ3schv4xHfyPTeSMD45TeziW/nk9/QKL+lU35Tq/y2XvmNzfJbu+U3t8tv75c/4CB/xEP+kEvbmanwwJfwQac/+aNebYxQc9jtT/6435/4gccaCcKnThvSewgf+90ge/D50MD74jn2HbKH308VzY7//wMg6g7yNt7XjAAAAABJRU5ErkJggg==")))
				{
					_discordIcon = new Texture2D(16, 16, (TextureFormat)4, false);
					for (int i = 0; i < 16; i++)
					{
						for (int j = 0; j < 16; j++)
						{
							_discordIcon.SetPixel(j, i, val22.GetPixelBilinear(((float)j + 0.5f) / 16f, ((float)i + 0.5f) / 16f));
						}
					}
					_discordIcon.Apply();
					Object.Destroy((Object)(object)val22);
				}
				else
				{
					_discordIcon = MakeDiscordIcon(22, 16);
				}
			}
			catch
			{
				_discordIcon = MakeDiscordIcon(22, 16);
			}
			_discordContent = new GUIContent("eliteghg_", (Texture)(object)_discordIcon);
			GUIStyle val23 = new GUIStyle(GUI.skin.button)
			{
				richText = true,
				fontSize = 10,
				fontStyle = (FontStyle)0,
				fixedHeight = 26f,
				alignment = (TextAnchor)4,
				imagePosition = (ImagePosition)0
			};
			val23.normal.background = RoundedRect(104, 26, ColDiscord, 12);
			val23.normal.textColor = Color.white;
			val23.hover.background = RoundedRect(104, 26, new Color(0.42f, 0.52f, 1f), 12);
			val23.hover.textColor = Color.white;
			val23.active.background = RoundedRect(104, 26, new Color(0.28f, 0.36f, 0.85f), 12);
			val23.active.textColor = Color.white;
			val23.padding = new RectOffset(0, 0, 0, 0);
			val23.margin = new RectOffset(0, 0, 0, 0);
			_discordBtn = val23;
			GUIStyle val24 = new GUIStyle(GUI.skin.label)
			{
				richText = true,
				fontSize = 9,
				fontStyle = (FontStyle)1,
				alignment = (TextAnchor)4
			};
			val24.normal.textColor = Color.white;
			val24.overflow = overflow;
			_grabS = val24;
			_skin = Object.Instantiate<GUISkin>(GUI.skin);
			_skin.scrollView.normal.background = MkT(Color.clear);
			_skin.box.normal.background = MkT(Color.clear);
			_skin.box.onNormal.background = MkT(Color.clear);
			_skin.verticalScrollbar.normal.background = RoundedRect(14, 40, new Color(0.08f, 0.08f, 0.08f), 7);
			_skin.verticalScrollbar.hover.background = RoundedRect(14, 40, new Color(0.1f, 0.1f, 0.1f), 7);
			_skin.verticalScrollbar.active.background = RoundedRect(14, 40, new Color(0.12f, 0.12f, 0.12f), 7);
			_skin.verticalScrollbar.border = new RectOffset(6, 6, 10, 10);
			_skin.verticalScrollbarThumb.normal.background = RoundedRect(14, 40, new Color(0.38f, 0.38f, 0.38f), 7);
			_skin.verticalScrollbarThumb.hover.background = RoundedRect(14, 40, new Color(0.52f, 0.52f, 0.52f), 7);
			_skin.verticalScrollbarThumb.active.background = RoundedRect(14, 40, new Color(0.62f, 0.62f, 0.62f), 7);
			_skin.verticalScrollbarThumb.fixedWidth = 0f;
			_skin.verticalScrollbarThumb.border = new RectOffset(6, 6, 10, 10);
			_skin.verticalScrollbar.fixedWidth = 14f;
			_skin.horizontalScrollbar.fixedHeight = 0f;
			GUIStyle val25 = new GUIStyle();
			val25.normal.background = MkT(Color.clear);
			val25.normal.textColor = Color.white;
			val25.focused.background = MkT(Color.clear);
			val25.focused.textColor = Color.white;
			val25.active.background = MkT(Color.clear);
			val25.active.textColor = Color.white;
			val25.onNormal.background = MkT(Color.clear);
			val25.onNormal.textColor = Color.white;
			val25.onFocused.background = MkT(Color.clear);
			val25.onFocused.textColor = Color.white;
			val25.onActive.background = MkT(Color.clear);
			val25.onActive.textColor = Color.white;
			val25.hover.background = MkT(Color.clear);
			val25.hover.textColor = Color.white;
			val25.border = new RectOffset(0, 0, 0, 0);
			val25.padding = new RectOffset(0, 0, 0, 0);
			val25.margin = new RectOffset(0, 0, 0, 0);
			val25.contentOffset = Vector2.zero;
			val25.fontSize = 11;
			_winStyle = val25;
			_lvStyles = (GUIStyle[])(object)new GUIStyle[11];
			_dvStyles = (GUIStyle[])(object)new GUIStyle[11];
			for (int k = 0; k < 11; k++)
			{
				Color textColor = (Color)((k == 0) ? new Color(0.75f, 0.77f, 0.8f) : DangerColors[k - 1]);
				GUIStyle[] lvStyles = _lvStyles;
				int num = k;
				GUIStyle val26 = new GUIStyle(_ls)
				{
					fontStyle = (FontStyle)1,
					fontSize = 10
				};
				val26.normal.textColor = textColor;
				lvStyles[num] = val26;
				GUIStyle[] dvStyles = _dvStyles;
				int num2 = k;
				GUIStyle val27 = new GUIStyle(_ls)
				{
					fontSize = 10
				};
				val27.normal.textColor = ColTxt;
				dvStyles[num2] = val27;
			}
			GUIStyle[] array = (GUIStyle[])(object)new GUIStyle[24]
			{
				_ls, _ts, _secS, _footer, _toastStyle, _searchField, _searchHint, _preset, _amtField, _fBtn,
				_killBtn, _killArrow, _killCountStyle, _pill, _bugArea, _bugSub, _catBtn, _monBtn, _favOn, _favOff,
				_legendBtn, _footerBtn, _discordBtn, _winStyle
			};
			foreach (GUIStyle obj2 in array)
			{
				obj2.margin.left = 0;
				obj2.margin.right = 0;
			}
			for (int m = 0; m < 11; m++)
			{
				_lvStyles[m].margin.left = 0;
				_lvStyles[m].margin.right = 0;
				_dvStyles[m].margin.left = 0;
				_dvStyles[m].margin.right = 0;
			}
			_skin.verticalScrollbar.margin.left = 0;
			_skin.verticalScrollbar.margin.right = 0;
		}

		private void Awake()
		{
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Expected O, but got Unknown
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Expected O, but got Unknown
			//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0104: Expected O, but got Unknown
			_toggleKey = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("General", "ToggleKey", new KeyboardShortcut((KeyCode)285, Array.Empty<KeyCode>()), "Key to open/close the spawner window");
			_closeOnEsc = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "CloseOnEsc", false, "Also close the window with Escape");
			BuildMonsterKeys();
			((BaseUnityPlugin)this).Logger.LogInfo((object)"[MS] MonsterSpawnerMod v1.0.0 loaded");
			try
			{
				Harmony val = new Harmony("com.monsterspawner.gui");
				MethodInfo method = typeof(GlobalInputHandler).GetMethod("CanTakeInput", BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic);
				if (method != null)
				{
					val.Patch((MethodBase)method, new HarmonyMethod(typeof(Plugin), "CanTakeInputPrefix", (Type[])null), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null);
				}
				else
				{
					((BaseUnityPlugin)this).Logger.LogError((object)"[MS] Harmony: CanTakeInput not found");
				}
				MethodInfo method2 = typeof(PlayerInput).GetMethod("Update", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
				if (method2 != null)
				{
					val.Patch((MethodBase)method2, new HarmonyMethod(typeof(Plugin), "PlayerInputPrefix", (Type[])null), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null);
				}
				else
				{
					((BaseUnityPlugin)this).Logger.LogError((object)"[MS] Harmony: PlayerInput.Update not found");
				}
			}
			catch (Exception ex)
			{
				((BaseUnityPlugin)this).Logger.LogError((object)("[MS] Harmony patch failed: " + ex));
			}
			try
			{
				string text = PlayerPrefs.GetString("MS_Favs", "");
				if (string.IsNullOrEmpty(text))
				{
					return;
				}
				string[] array = text.Split(',');
				foreach (string text2 in array)
				{
					if (!string.IsNullOrEmpty(text2) && !favorites.Contains(text2))
					{
						favorites.Add(text2);
					}
				}
			}
			catch
			{
			}
		}

		private void SaveFavorites()
		{
			try
			{
				PlayerPrefs.SetString("MS_Favs", string.Join(",", favorites.ToArray()));
				PlayerPrefs.Save();
			}
			catch
			{
			}
		}

		private static bool CanTakeInputPrefix(ref bool __result)
		{
			if (MenuOpen)
			{
				__result = false;
				return false;
			}
			return true;
		}

		private static bool PlayerInputPrefix(PlayerInput __instance)
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			if (!MenuOpen || __instance == null)
			{
				return true;
			}
			__instance.movementInput = Vector2.zero;
			__instance.lookInput = Vector2.zero;
			__instance.jumpWasPressed = false;
			__instance.jumpIsPressed = false;
			__instance.sprintIsPressed = false;
			__instance.interactWasPressed = false;
			__instance.interactIsPressed = false;
			return false;
		}

		private void OpenMenu()
		{
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			_wasCursorVisible = Cursor.visible;
			_wasCursorLock = Cursor.lockState;
			_cursorSaved = true;
			_menu = true;
			MenuOpen = true;
			Cursor.visible = true;
			Cursor.lockState = (CursorLockMode)0;
		}

		private void CloseMenu()
		{
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			_menu = false;
			MenuOpen = false;
			_showBugPopup = false;
			if (_cursorSaved)
			{
				try
				{
					Cursor.visible = _wasCursorVisible;
					Cursor.lockState = _wasCursorLock;
					return;
				}
				catch
				{
					Cursor.visible = false;
					Cursor.lockState = (CursorLockMode)1;
					return;
				}
			}
			Cursor.visible = false;
			Cursor.lockState = (CursorLockMode)1;
		}

		private void Update()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			KeyboardShortcut value = _toggleKey.Value;
			if (((KeyboardShortcut)(ref value)).IsDown())
			{
				if (_menu)
				{
					CloseMenu();
					_showBugPopup = false;
				}
				else if (!PhotonNetwork.IsMasterClient)
				{
					ShowToast("Only the host can use the spawner!", error: true);
				}
				else
				{
					OpenMenu();
				}
			}
			else if (_closeOnEsc.Value && Input.GetKeyDown((KeyCode)27) && _menu)
			{
				CloseMenu();
				_showBugPopup = false;
			}
			if (_showBugPopup && Input.GetKeyDown((KeyCode)27))
			{
				_showBugPopup = false;
			}
			UpdateToasts();
			if (_confirmTimerSpawn > 0f)
			{
				_confirmTimerSpawn -= Time.unscaledDeltaTime;
				if (_confirmTimerSpawn <= 0f)
				{
					_confirmSpawnAll = false;
				}
			}
			if (_confirmTimerKill > 0f)
			{
				_confirmTimerKill -= Time.unscaledDeltaTime;
				if (_confirmTimerKill <= 0f)
				{
					_confirmKillAll = false;
				}
			}
			_cleanTimer -= Time.unscaledDeltaTime;
			if (_cleanTimer <= 0f)
			{
				_cleanTimer = 2f;
				CleanDead();
			}
			if (Input.GetMouseButtonUp(0))
			{
				_dragType = 0;
			}
			if (_isKilling)
			{
				_killTimer -= Time.unscaledDeltaTime;
				if (_killTimer <= 0f)
				{
					_isKilling = false;
					((BaseUnityPlugin)this).Logger.LogWarning((object)"[MS-Kill] _isKilling safety reset (stuck for 5s)");
				}
			}
			if (_menu)
			{
				ScanVanilla();
			}
		}

		private void LateUpdate()
		{
			if (_menu)
			{
				Cursor.visible = true;
				Cursor.lockState = (CursorLockMode)0;
			}
		}

		private void OnGUI()
		{
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Invalid comparison between Unknown and I4
			//IL_00fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0137: Unknown result type (might be due to invalid IL or missing references)
			//IL_017e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0192: 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_01b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cb: Expected O, but got Unknown
			//IL_01c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cb: Unknown result type (might be due to invalid IL or missing references)
			if (!ready)
			{
				InitStyles();
			}
			if (_menu)
			{
				Cursor.visible = true;
				Cursor.lockState = (CursorLockMode)0;
				Event current = Event.current;
				if (_showBugPopup && current != null && ((int)current.type == 0 || (int)current.type == 1))
				{
					Rect val = BugCardRect();
					if (!((Rect)(ref val)).Contains(current.mousePosition))
					{
						current.Use();
					}
				}
				GUISkin skin = GUI.skin;
				if ((Object)(object)_skin != (Object)null)
				{
					GUI.skin = _skin;
				}
				try
				{
					float x = ((Rect)(ref _wRect)).x;
					float y = ((Rect)(ref _wRect)).y;
					float width = ((Rect)(ref _wRect)).width;
					float height = ((Rect)(ref _wRect)).height;
					int num = (int)width;
					int num2 = (int)height;
					for (int num3 = 3; num3 >= 0; num3--)
					{
						float num4 = (float)num3 / 3f;
						float num5 = 5f * num4;
						GUI.DrawTexture(new Rect(x - num5, y - num5, width + num5 * 2f, height + num5 * 2f), (Texture)(object)RoundedRect((int)(width + num5 * 2f), (int)(height + num5 * 2f), new Color(0f, 0f, 0f, 0.35f * (1f - num4)), 12 + (int)(num5 * 0.3f)));
					}
					int num6 = 3;
					GUI.DrawTexture(new Rect(x - (float)num6, y - (float)num6, width + (float)(num6 * 2), height + (float)(num6 * 2)), (Texture)(object)RoundedRect(num + num6 * 2, num2 + num6 * 2, ColBorder, 12));
					_wRect = GUI.Window(WinId, _wRect, new WindowFunction(DrawWindow), "", _winStyle);
					((Rect)(ref _wRect)).x = Mathf.Clamp(((Rect)(ref _wRect)).x, 0f - ((Rect)(ref _wRect)).width + 100f, (float)Screen.width - 100f);
					((Rect)(ref _wRect)).y = Mathf.Clamp(((Rect)(ref _wRect)).y, 0f, (float)Screen.height - 60f);
				}
				finally
				{
					GUI.skin = skin;
				}
			}
			DrawToast();
			if (_showBugPopup)
			{
				DrawBugReportPopup();
			}
		}

		private void DrawWindow(int id)
		{
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			GUI.DrawTexture(new Rect(0f, 0f, ((Rect)(ref _wRect)).width, ((Rect)(ref _wRect)).height), (Texture)(object)RoundedRect((int)((Rect)(ref _wRect)).width, (int)((Rect)(ref _wRect)).height, ColBg, 12));
			GUILayout.BeginVertical(Array.Empty<GUILayoutOption>());
			GUILayout.Space(4f);
			DrawContent();
			GUILayout.Space(4f);
			GUILayout.EndVertical();
			GUI.DragWindow(new Rect(0f, 0f, 10000f, 28f));
		}

		private void DrawBorder(Rect r, Color c)
		{
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0063: Unknown result type (might be due to invalid IL or missing references)
			int num = (int)((Rect)(ref r)).width;
			int num2 = (int)((Rect)(ref r)).height;
			GUI.DrawTexture(new Rect(((Rect)(ref r)).x - 1f, ((Rect)(ref r)).y - 1f, ((Rect)(ref r)).width + 2f, ((Rect)(ref r)).height + 2f), (Texture)(object)RoundedRect(num + 2, num2 + 2, c, 12));
			GUI.DrawTexture(r, (Texture)(object)RoundedRect(num, num2, ColDark, 12));
		}

		private void DrawToast()
		{
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0063: Unknown result type (might be due to invalid IL or missing references)
			//IL_006f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: 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_00e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0103: Unknown result type (might be due to invalid IL or missing references)
			//IL_010a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0133: Unknown result type (might be due to invalid IL or missing references)
			//IL_012c: Unknown result type (might be due to invalid IL or missing references)
			//IL_013d: Unknown result type (might be due to invalid IL or missing references)
			float num = Mathf.Min(340f, (float)Screen.width - 20f);
			float num2 = 44f;
			float num3 = 50f;
			Rect val = default(Rect);
			for (int i = 0; i < _activeToasts.Count; i++)
			{
				Toast toast = _activeToasts[i];
				((Rect)(ref val))..ctor(Mathf.Max(10f, ((float)Screen.width - num) * 0.5f), num3, num, num2);
				Color fill = (toast.error ? ToastBgErr : ToastBgOk);
				Color fill2 = (toast.error ? ToastBdErr : ToastBdOk);
				GUI.DrawTexture(new Rect(((Rect)(ref val)).x + 2f, ((Rect)(ref val)).y + 2f, num, num2), (Texture)(object)RoundedRect((int)num, (int)num2, ToastShadow, 12));
				GUI.DrawTexture(new Rect(((Rect)(ref val)).x - 2f, ((Rect)(ref val)).y - 2f, num + 4f, num2 + 4f), (Texture)(object)RoundedRect((int)num + 4, (int)num2 + 4, fill2, 12));
				GUI.DrawTexture(val, (Texture)(object)RoundedRect((int)num, (int)num2, fill, 12));
				_toastStyle.normal.textColor = (toast.error ? Color.red : Color.green);
				GUI.Label(val, toast.msg, _toastStyle);
				num3 += num2 + 6f;
			}
		}

		private void ShowToast(string msg, bool error)
		{
			if (_toastQueue.Count >= 8)
			{
				_toastQueue.Dequeue();
			}
			_toastQueue.Enqueue(new Toast
			{
				msg = msg,
				error = error,
				timer = (error ? 3.5f : 2.5f)
			});
		}

		private void UpdateToasts()
		{
			while (_activeToasts.Count < 3 && _toastQueue.Count > 0)
			{
				_activeToasts.Add(_toastQueue.Dequeue());
			}
			for (int num = _activeToasts.Count - 1; num >= 0; num--)
			{
				Toast value = _activeToasts[num];
				value.timer -= Time.unscaledDeltaTime;
				if (value.timer <= 0f)
				{
					_activeToasts.RemoveAt(num);
				}
				else
				{
					_activeToasts[num] = value;
				}
			}
		}

		private void Rep(string s)
		{
			string item = "[" + DateTime.Now.ToString("HH:mm:ss") + "] " + s;
			_repLog.Enqueue(item);
			while (_repLog.Count > 40)
			{
				_repLog.Dequeue();
			}
			((BaseUnityPlugin)this).Logger.LogInfo((object)("[MS-Rep] " + s));
		}

		private string BuildReportText(string title, string desc, string steps)
		{
			int num = 0;
			int num2 = 0;
			for (int i = 0; i < _spawned.Count; i++)
			{
				if ((Object)(object)_spawned[i].go != (Object)null)
				{
					if (_spawned[i].fromMod)
					{
						num++;
					}
					else
					{
						num2++;
					}
				}
			}
			string text = "offline";
			try
			{
				text = (PhotonNetwork.IsConnected ? ("online master=" + PhotonNetwork.IsMasterClient + " players=" + PhotonNetwork.CountOfPlayers) : "offline");
			}
			catch
			{
				text = "?";
			}
			string text2 = "?";
			try
			{
				text2 = SystemInfo.operatingSystem;
			}
			catch
			{
			}
			string text3 = "?";
			try
			{
				text3 = Application.unityVersion;
			}
			catch
			{
			}
			StringBuilder stringBuilder = new StringBuilder();
			stringBuilder.AppendLine("## Bug Report");
			stringBuilder.AppendLine("### Title");
			stringBuilder.AppendLine(string.IsNullOrEmpty(title) ? "(none)" : title);
			stringBuilder.AppendLine("### Description");
			stringBuilder.AppendLine(string.IsNullOrEmpty(desc) ? "(none)" : desc);
			stringBuilder.AppendLine("### Steps to Reproduce");
			stringBuilder.AppendLine(string.IsNullOrEmpty(steps) ? "(none)" : steps);
			stringBuilder.AppendLine("### System");
			stringBuilder.AppendLine("Mod: MonsterSpawnerMod v1.0.0 | OS: " + text2 + " | Unity: " + text3);
			stringBuilder.AppendLine("Scene objects: " + SceneGOs().Count + " | Tracked: " + _spawned.Count + " (mod=" + num + " vanilla=" + num2 + ") | Seen: " + _vanillaSeen.Count);
			stringBuilder.AppendLine("Photon: " + text + " | Amount: x" + spawnAmount + " | Filter: \"" + searchInput + "\"");
			stringBuilder.AppendLine("### Recent events");
			foreach (string item in _repLog)
			{
				stringBuilder.AppendLine(item);
			}
			stringBuilder.AppendLine("### Log tail (mod)");
			stringBuilder.Append(BugLogTail());
			return stringBuilder.ToString();
		}

		private string BugLogTail()
		{
			try
			{
				string path = Path.Combine(Paths.BepInExRootPath, "LogOutput.log");
				if (!File.Exists(path))
				{
					try
					{
						path = Path.Combine(Paths.GameRootPath, "BepInEx/LogOutput.log");
					}
					catch
					{
					}
				}
				List<string> list = new List<string>();
				using (FileStream stream = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
				{
					using StreamReader streamReader = new StreamReader(stream);
					string text;
					while ((text = streamReader.ReadLine()) != null)
					{
						if (text.Contains("[MS-") || text.Contains("Monster Spawn Menu"))
						{
							list.Add(text);
						}
					}
				}
				int num = Mathf.Max(0, list.Count - 60);
				StringBuilder stringBuilder = new StringBuilder();
				for (int i = num; i < list.Count; i++)
				{
					stringBuilder.AppendLine(list[i]);
				}
				if (list.Count == 0)
				{
					stringBuilder.AppendLine("(no mod log lines found)");
				}
				return stringBuilder.ToString();
			}
			catch (Exception ex)
			{
				return "(log unavailable: " + ex.Message + ")";
			}
		}

		private void SubmitBugReport()
		{
			if (string.IsNullOrEmpty(_bugTitle.Trim()) && string.IsNullOrEmpty(_bugDesc.Trim()))
			{
				_bugError = "ADD A TITLE OR DESCRIPTION";
				return;
			}
			_bugError = "";
			GUIUtility.systemCopyBuffer = BuildReportText(_bugTitle.Trim(), _bugDesc.Trim(), _bugSteps.Trim());
			ShowToast("COPIED TO CLIPBOARD", error: false);
			if (_bugOpenGithub && !string.IsNullOrEmpty("https://github.com/EliteXGHG/MonsterSpawner-Content-Warning/issues/new?title="))
			{
				try
				{
					Application.OpenURL("https://github.com/EliteXGHG/MonsterSpawner-Content-Warning/issues/new?title=" + Uri.EscapeDataString(_bugTitle.Trim()));
				}
				catch
				{
				}
			}
			_showBugPopup = false;
			try
			{
				DumpCensus();
			}
			catch
			{
			}
		}

		private void BugFieldHeights(out float hDesc, out float hSteps)
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Expected O, but got Unknown
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Expected O, but got Unknown
			hDesc = Mathf.Clamp(_bugArea.CalcHeight(new GUIContent(_bugDesc), 392f), 80f, 150f);
			hSteps = Mathf.Clamp(_bugArea.CalcHeight(new GUIContent(_bugSteps), 392f), 80f, 150f);
		}

		private Rect BugCardRect()
		{
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			BugFieldHeights(out var hDesc, out var hSteps);
			float num = 344f + hDesc + hSteps;
			return new Rect(((float)Screen.width - 440f) * 0.5f, Mathf.Max(10f, ((float)Screen.height - num) * 0.5f), 440f, num);
		}

		private void DrawBugReportPopup()
		{
			//IL_0027: 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)
			//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0115: Unknown result type (might be due to invalid IL or missing references)
			//IL_0183: Unknown result type (might be due to invalid IL or missing references)
			//IL_0189: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0223: Unknown result type (might be due to invalid IL or missing references)
			//IL_0229: Unknown result type (might be due to invalid IL or missing references)
			//IL_024e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0254: Unknown result type (might be due to invalid IL or missing references)
			//IL_0279: Unknown result type (might be due to invalid IL or missing references)
			//IL_027f: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0301: Unknown result type (might be due to invalid IL or missing references)
			//IL_0327: Unknown result type (might be due to invalid IL or missing references)
			//IL_032f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0358: Unknown result type (might be due to invalid IL or missing references)
			//IL_0360: Unknown result type (might be due to invalid IL or missing references)
			//IL_0388: Unknown result type (might be due to invalid IL or missing references)
			//IL_038e: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_03db: Unknown result type (might be due to invalid IL or missing references)
			//IL_0405: Unknown result type (might be due to invalid IL or missing references)
			//IL_043b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0441: Invalid comparison between Unknown and I4
			//IL_0a20: Unknown result type (might be due to invalid IL or missing references)
			//IL_047a: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_04d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_04df: Invalid comparison between Unknown and I4
			//IL_0443: Unknown result type (might be due to invalid IL or missing references)
			//IL_045f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0aad: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ab3: Invalid comparison between Unknown and I4
			//IL_0a57: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a6c: Unknown result type (might be due to invalid IL or missing references)
			//IL_087b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0775: Unknown result type (might be due to invalid IL or missing references)
			//IL_0518: Unknown result type (might be due to invalid IL or missing references)
			//IL_0547: Unknown result type (might be due to invalid IL or missing references)
			//IL_0579: Unknown result type (might be due to invalid IL or missing references)
			//IL_057f: Invalid comparison between Unknown and I4
			//IL_04e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_04fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0aeb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0abc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ac8: Unknown result type (might be due to invalid IL or missing references)
			//IL_05b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_05fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_060f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0581: Unknown result type (might be due to invalid IL or missing references)
			//IL_059d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b2e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b34: Invalid comparison between Unknown and I4
			//IL_0ada: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ad3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b6d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b3d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b49: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bc7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bf0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b5c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b55: Unknown result type (might be due to invalid IL or missing references)
			//IL_0649: Unknown result type (might be due to invalid IL or missing references)
			//IL_064f: Invalid comparison between Unknown and I4
			//IL_06c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_06ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_068f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0674: Unknown result type (might be due to invalid IL or missing references)
			//IL_06ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_06d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_06d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_070b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0710: Unknown result type (might be due to invalid IL or missing references)
			//IL_071d: Expected O, but got Unknown
			if (!_showBugPopup || !_menu)
			{
				return;
			}
			GUI.DrawTexture(new Rect(0f, 0f, (float)Screen.width, (float)Screen.height), (Texture)(object)RoundedRect(Screen.width, Screen.height, new Color(0f, 0f, 0f, 0.8f), 0));
			float num = 440f;
			BugFieldHeights(out var hDesc, out var hSteps);
			float num2 = 344f + hDesc + hSteps;
			float num3 = ((float)Screen.width - num) * 0.5f;
			float num4 = Mathf.Max(10f, ((float)Screen.height - num2) * 0.5f);
			Rect val = new Rect(num3, num4, num, num2);
			float num5 = 2f;
			GUI.DrawTexture(new Rect(num3 - num5, num4 - num5, num + num5 * 2f, num2 + num5 * 2f), (Texture)(object)RoundedRect((int)(num + num5 * 2f), (int)(num2 + num5 * 2f), Color.white, 14));
			GUI.DrawTexture(val, (Texture)(object)RoundedRect((int)num, (int)num2, new Color(0.16f, 0.16f, 0.17f, 1f), 12));
			float num6 = num3 + 24f;
			float num7 = num - 48f;
			float num8 = num4 + 24f;
			Color val2 = default(Color);
			((Color)(ref val2))..ctor(0.55f, 0.55f, 0.57f, 1f);
			float num9 = num6 + 2f;
			float num10 = num8 + 8f;
			GUI.DrawTexture(new Rect(num9, num10 + 4f, 6f, 2f), (Texture)(object)MkT(val2));
			GUI.DrawTexture(new Rect(num9, num10 + 9f, 6f, 2f), (Texture)(object)MkT(val2));
			GUI.DrawTexture(new Rect(num9, num10 + 14f, 6f, 2f), (Texture)(object)MkT(val2));
			GUI.DrawTexture(new Rect(num9 + 18f, num10 + 4f, 6f, 2f), (Texture)(object)MkT(val2));
			GUI.DrawTexture(new Rect(num9 + 18f, num10 + 9f, 6f, 2f), (Texture)(object)MkT(val2));
			GUI.DrawTexture(new Rect(num9 + 18f, num10 + 14f, 6f, 2f), (Texture)(object)MkT(val2));
			GUI.DrawTexture(new Rect(num9 + 9f