Decompiled source of AdminMenu v1.3.0

AdminMenu.dll

Decompiled 3 months ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using System.Text.RegularExpressions;
using AdminMenu;
using AdminMenu.Util;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using Fusion;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using TMPro;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.Events;
using UnityEngine.Localization;
using UnityEngine.UI;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("AdminMenu")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Azumatt")]
[assembly: AssemblyProduct("AdminMenu")]
[assembly: AssemblyCopyright("Copyright ©  2021")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("4358610B-F3F4-4843-B7AF-98B7BC60DCDE")]
[assembly: AssemblyFileVersion("1.3.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.6.2", FrameworkDisplayName = ".NET Framework 4.6.2")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.3.0.0")]
[module: UnverifiableCode]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

		public NullableAttribute(byte P_0)
		{
			NullableFlags = new byte[1] { P_0 };
		}

		public NullableAttribute(byte[] P_0)
		{
			NullableFlags = P_0;
		}
	}
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableContextAttribute : Attribute
	{
		public readonly byte Flag;

		public NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
}
public class SpawnerPlaceholder : MonoBehaviour
{
	public static SpawnerPlaceholder Instance;

	public ExtButton Btn;

	public RawImage Icon;

	public Image Bkg;

	public HorizontalLayoutGroup AdditionalInfoHlg;

	public Text DisplayName;

	public Text InternalName;

	public Text Cost;

	public Text Damage;

	public Text Armor;

	public Text Level;

	[Header("Spawner View Right")]
	public GameObject SpawnerViewRight;

	public TMP_InputField Search;

	public TMP_InputField Amount;

	public Text AmountText;

	public Text ShowFavoritesText;

	public Text ShowFavoritesDescription;

	public Toggle ShowFavorites;

	public Text PutInInventoryText;

	public Text PutInInventoryDescription;

	public Toggle PutInInventory;

	public void Awake()
	{
		Instance = this;
		((UnityEvent<bool>)(object)ShowFavorites.onValueChanged).AddListener((UnityAction<bool>)ShowFavoritesChanged);
		((UnityEvent<bool>)(object)PutInInventory.onValueChanged).AddListener((UnityAction<bool>)PutInInventoryChanged);
		Btn.OnRightClick += RightClickItem;
	}

	public void Update()
	{
		PutInInventory.isOn = true;
	}

	public void SpawnItem()
	{
		AdminMenuPlugin.AdminMenuLogger.LogInfo((object)("SpawnItem: " + DisplayName.text));
		if ((Object)(object)PutInInventory == (Object)null || !PutInInventory.isOn)
		{
			return;
		}
		if ((Object)(object)RM.code == (Object)null || RM.code.allItems == null)
		{
			AdminMenuPlugin.AdminMenuLogger.LogError((object)"RM or its properties are null!");
			return;
		}
		int num = 1;
		if ((Object)(object)Amount != (Object)null && int.TryParse(Amount.text, out var result))
		{
			num = result;
		}
		Item val = default(Item);
		foreach (Transform item in RM.code.allItems.items)
		{
			if (!((Object)(object)item != (Object)null) || !((Component)item).TryGetComponent<Item>(ref val) || !(val.DisplayName == Cost.text))
			{
				continue;
			}
			if ((Object)(object)Global.code.Player.playerStorage != (Object)null)
			{
				for (int i = 0; i < num; i++)
				{
					if (!Global.code.Player.playerStorage.AddItem(Utility.Instantiate<Item>(val), true, false))
					{
						Global.code.Player.quickSlotStorage.AddItem(Utility.Instantiate<Item>(val), true, false);
					}
				}
				break;
			}
			AdminMenuPlugin.AdminMenuLogger.LogError((object)"playerStorage is null!");
		}
	}

	public void RightClickItem()
	{
		if (string.IsNullOrWhiteSpace(Cost.text))
		{
			return;
		}
		Item val = default(Item);
		foreach (Transform item in RM.code.allItems.items)
		{
			if ((Object)(object)item != (Object)null && ((Component)item).TryGetComponent<Item>(ref val) && Object.op_Implicit((Object)(object)val) && !(val.DisplayName != Cost.text))
			{
				try
				{
					Utilities.CustomUseItem(val);
					break;
				}
				catch
				{
					AdminMenuPlugin.AdminMenuLogger.LogInfo((object)("Failed to use item: " + Cost.text));
					break;
				}
			}
		}
	}

	public void ShowFavoritesChanged(bool value)
	{
		//IL_0036: Unknown result type (might be due to invalid IL or missing references)
		//IL_002f: Unknown result type (might be due to invalid IL or missing references)
		ShowFavorites.isOn = value;
		ShowFavoritesDescription.text = (value ? "Active" : "Inactive");
		((Graphic)ShowFavoritesDescription).color = (value ? AdminUI.GreenTextColor : AdminUI.RedTextColor);
	}

	public void PutInInventoryChanged(bool value)
	{
		//IL_0036: Unknown result type (might be due to invalid IL or missing references)
		//IL_002f: Unknown result type (might be due to invalid IL or missing references)
		PutInInventory.isOn = value;
		PutInInventoryDescription.text = (value ? "Active" : "Inactive");
		((Graphic)PutInInventoryDescription).color = (value ? AdminUI.GreenTextColor : AdminUI.RedTextColor);
	}
}
[RequireComponent(typeof(Button))]
public class ExtButton : Button
{
	public delegate void RightClickAction();

	public event RightClickAction OnRightClick;

	public override void OnPointerClick(PointerEventData eventData)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: Invalid comparison between Unknown and I4
		if ((int)eventData.button == 1)
		{
			this.OnRightClick?.Invoke();
		}
		else
		{
			((Button)this).OnPointerClick(eventData);
		}
	}
}
namespace AdminMenu
{
	[HarmonyPatch(typeof(Global), "Update")]
	internal static class GlobalCSPatch
	{
		private static void Postfix(Global __instance)
		{
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0100: Unknown result type (might be due to invalid IL or missing references)
			//IL_0106: Unknown result type (might be due to invalid IL or missing references)
			//IL_010c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0111: Unknown result type (might be due to invalid IL or missing references)
			//IL_0117: Unknown result type (might be due to invalid IL or missing references)
			//IL_011e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0123: 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_012c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0151: Unknown result type (might be due to invalid IL or missing references)
			//IL_015b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0160: Unknown result type (might be due to invalid IL or missing references)
			if (UIGameMenuAwakePatch.Admin && Object.op_Implicit((Object)(object)Utilities.GInst))
			{
				KeyboardShortcut value = AdminMenuPlugin.OpenuiHotkey.Value;
				if (((KeyboardShortcut)(ref value)).IsDown())
				{
					AdminMenuPlugin.AdminUI.SetActive(!AdminMenuPlugin.AdminUI.activeSelf);
					Utilities.TurnOnUI();
				}
				if (Checks.AdminPanelActive() && !__instance.uiDialogue.IsActive)
				{
					Utilities.TurnOnUI();
					Cursor.visible = true;
					Cursor.SetCursor(RM.code.cursorNormal, Vector2.zero, (CursorMode)0);
					Cursor.lockState = (CursorLockMode)0;
				}
				Checks.CheckPlayer();
				Checks.CheckWeapon();
				if ((Object)(object)Utilities.FpspInst != (Object)null && AdminUI.noClip && Input.anyKey)
				{
					Transform transform = ((Component)Utilities.FpspInst).transform;
					Transform transform2 = ((Component)Utilities.CamInst).transform;
					float num = Utilities.GetKey((KeyCode)119) - Utilities.GetKey((KeyCode)115);
					float num2 = Utilities.GetKey((KeyCode)100) - Utilities.GetKey((KeyCode)97);
					Vector3 position = transform.position;
					Vector3 val = transform.up * (Utilities.GetKey((KeyCode)32) - Utilities.GetKey((KeyCode)306)) + transform2.forward * num + transform2.right * num2;
					transform.position = position + ((Vector3)(ref val)).normalized * (float)(10.0 + 15.0 * (double)Utilities.GetKey((KeyCode)304)) * Time.deltaTime;
				}
			}
		}
	}
	[HarmonyPatch(typeof(GlobalData), "Spawned")]
	internal static class PlayerDummySpawnedPatch
	{
		private static void Postfix(GlobalData __instance)
		{
			try
			{
				if (!((SimulationBehaviour)__instance).Runner.SessionInfo.Properties.TryGetValue("serverHostPlayerIdentifier", out var value) || !Guid.TryParse(SessionProperty.op_Implicit(value), out var result))
				{
					return;
				}
				PlayerDummy val = default(PlayerDummy);
				PlayerDummy val2 = default(PlayerDummy);
				foreach (Transform item in WorldScene.code.allPlayerDummies.items.ToList())
				{
					if (Object.op_Implicit((Object)(object)item) && ((Component)item).TryGetComponent<PlayerDummy>(ref val) && Object.op_Implicit((Object)(object)((SimulationBehaviour)val).Object) && ((SimulationBehaviour)val).Object.IsValid && !(val.CharacterGuid != result))
					{
						if (result == Utilities.GInst.Player.playerDummy.CharacterGuid)
						{
							AdminMenuPlugin.AdminMenuLogger.LogInfo((object)$"Setting Admin to true for {val.CharacterName} ({val.CharacterGuid})");
							UIGameMenuAwakePatch.Admin = true;
						}
					}
					else if (Object.op_Implicit((Object)(object)item) && ((Component)item).TryGetComponent<PlayerDummy>(ref val2) && Object.op_Implicit((Object)(object)((SimulationBehaviour)val2).Object) && ((SimulationBehaviour)val2).Object.IsValid && val2.CharacterGuid != result && result != Utilities.GInst.Player.playerDummy.CharacterGuid)
					{
						if (val2.CharacterGuid == Utilities.GInst.Player.playerDummy.CharacterGuid)
						{
							AdminMenuPlugin.AdminMenuLogger.LogInfo((object)$"Setting Admin to false for {val2.CharacterName} ({val2.CharacterGuid})");
						}
						UIGameMenuAwakePatch.Admin = false;
					}
				}
			}
			catch (Exception)
			{
			}
		}
	}
	[HarmonyPatch(typeof(UICombat), "Start")]
	internal static class UIGameMenuAwakePatch
	{
		public static bool Admin = true;

		private static void Postfix(UICombat __instance)
		{
			if (Admin && !((Object)(object)AdminMenuPlugin.AdminUI != (Object)null))
			{
				if ((Object)(object)AdminMenuPlugin.AdminUITemp == (Object)null)
				{
					AdminMenuPlugin.AdminMenuLogger.LogInfo((object)"AdminUITemp is null, loading assets");
					AdminMenuPlugin.LoadAssets();
				}
				AdminMenuPlugin.AdminUI = Object.Instantiate<GameObject>(AdminMenuPlugin.AdminUITemp, ((Component)Utilities.GInst.uiCombat).transform, false);
				AdminMenuPlugin.AdminUI.SetActive(false);
			}
		}
	}
	[HarmonyPatch(typeof(PlayerDummy), "NoticePlayerJoined_RPC")]
	internal static class PlayerDummyNoticePlayerJoinedRPCPatch
	{
		private static void Postfix(PlayerDummy __instance, ref string characterName)
		{
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_00af: Unknown result type (might be due to invalid IL or missing references)
			PlayerDummy val = default(PlayerDummy);
			foreach (Transform item in WorldScene.code.allPlayerDummies.items.ToList())
			{
				if (Object.op_Implicit((Object)(object)item) && ((Component)item).gameObject.activeSelf && ((Component)item).TryGetComponent<PlayerDummy>(ref val) && Object.op_Implicit((Object)(object)((SimulationBehaviour)val).Object) && !((Object)(object)val == (Object)(object)Global.code.Player.playerDummy) && !AdminUI.allowPlayers)
				{
					Mainframe.code.GlobalData.DisconnectPlayerAsync(val.PlayerRef, (ShutdownReason)0, (RunnerShutdownExtraReason)0);
					Utilities.GInst.uiCombat.AddHint("Player " + characterName + " kicked from the game.", Color.yellow, -99f, (AudioClip)null);
					AdminMenuPlugin.AdminMenuLogger.LogInfo((object)$"Player {characterName} ({val.CharacterGuid}) kicked from the game.");
				}
			}
		}
	}
	[HarmonyPatch(typeof(Global), "HandleKeys")]
	internal static class GlobalHandleKeysPatch
	{
		private static bool Prefix(Global __instance)
		{
			if (__instance.Player.IsBusy || __instance.player.IsDead || !GlobalDataHelper.IsGlobalDataValid)
			{
				return true;
			}
			if (!Checks.AdminPanelActive() || __instance.uiDialogue.IsActive)
			{
				return true;
			}
			if (InputManager.Instance.EscapePressed)
			{
				__instance.ButtonEscape();
			}
			return false;
		}
	}
	[HarmonyPatch(typeof(PlayerCharacter), "UpdateKeys")]
	internal static class PlayerCharacterUpdateKeysPatch
	{
		private static bool Prefix(PlayerCharacter __instance)
		{
			if (!Checks.AdminPanelActive())
			{
				return true;
			}
			return false;
		}
	}
	[HarmonyPatch(typeof(PlayerCharacter), "AddHealth")]
	internal static class PlayerAddHealthPatch
	{
		private static bool Prefix(PlayerCharacter __instance, float point, int HitPart, Vector3 damageSource, bool canBleed, bool showBiteFx, bool IsMeleeWeapon)
		{
			if (point < 0f && HitPart != 3)
			{
				return !AdminUI.unlimitedHealth;
			}
			return true;
		}
	}
	[BepInPlugin("Azumatt.AdminMenu", "AdminMenu", "1.3.0")]
	public class AdminMenuPlugin : BaseUnityPlugin
	{
		public enum Toggle
		{
			On = 1,
			Off = 0
		}

		internal const string ModName = "AdminMenu";

		internal const string ModVersion = "1.3.0";

		internal const string Author = "Azumatt";

		private const string ModGUID = "Azumatt.AdminMenu";

		private static string ConfigFileName = "Azumatt.AdminMenu.cfg";

		private static string ConfigFileFullPath;

		private readonly Harmony _harmony = new Harmony("Azumatt.AdminMenu");

		public static readonly ManualLogSource AdminMenuLogger;

		public static AssetBundle? AssetBundle;

		public static GameObject AdminUITemp;

		public static GameObject AdminUI;

		public static ConfigEntry<KeyboardShortcut> OpenuiHotkey;

		public static ConfigEntry<KeyboardShortcut> RemoveDropsHotkey;

		public static ConfigEntry<float> RemoveDropsRadius;

		public static ConfigEntry<Toggle> HideEmptyChests;

		public static ConfigEntry<Toggle> HideBrokenScavengeables;

		public static ConfigEntry<Toggle> HideCollectibles;

		public void Awake()
		{
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			OpenuiHotkey = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("1 - General", "OpenUIHotkey", new KeyboardShortcut((KeyCode)284, Array.Empty<KeyCode>()), "The hotkey to open the admin UI");
			HideEmptyChests = ((BaseUnityPlugin)this).Config.Bind<Toggle>("1 - General", "Hide Empty Chests", Toggle.On, "Hide chests that have no items in them");
			HideBrokenScavengeables = ((BaseUnityPlugin)this).Config.Bind<Toggle>("1 - General", "Hide Broken Scavengeables", Toggle.On, "Hide scavengeables that have nothing left to give.");
			HideCollectibles = ((BaseUnityPlugin)this).Config.Bind<Toggle>("1 - General", "Hide Collectibles", Toggle.On, "Hide collectibles that have nothing left to give.");
			Assembly executingAssembly = Assembly.GetExecutingAssembly();
			_harmony.PatchAll(executingAssembly);
			LoadAssets();
			SetupWatcher();
		}

		private void OnDestroy()
		{
			((BaseUnityPlugin)this).Config.Save();
		}

		private void SetupWatcher()
		{
			FileSystemWatcher fileSystemWatcher = new FileSystemWatcher(Paths.ConfigPath, ConfigFileName);
			fileSystemWatcher.Changed += ReadConfigValues;
			fileSystemWatcher.Created += ReadConfigValues;
			fileSystemWatcher.Renamed += ReadConfigValues;
			fileSystemWatcher.IncludeSubdirectories = true;
			fileSystemWatcher.SynchronizingObject = ThreadingHelper.SynchronizingObject;
			fileSystemWatcher.EnableRaisingEvents = true;
		}

		private void ReadConfigValues(object sender, FileSystemEventArgs e)
		{
			if (!File.Exists(ConfigFileFullPath))
			{
				return;
			}
			try
			{
				AdminMenuLogger.LogDebug((object)"ReadConfigValues called");
				((BaseUnityPlugin)this).Config.Reload();
			}
			catch
			{
				AdminMenuLogger.LogError((object)("There was an issue loading your " + ConfigFileName));
				AdminMenuLogger.LogError((object)"Please check your config entries for spelling and format!");
			}
		}

		private void OnGUI()
		{
			//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)
			if (!UIGameMenuAwakePatch.Admin)
			{
				return;
			}
			KeyboardShortcut value = OpenuiHotkey.Value;
			if (((KeyboardShortcut)(ref value)).IsDown())
			{
				AdminUI.SetActive(!AdminUI.activeSelf);
				Utilities.TurnOnUI();
			}
			if (Checks.AdminPanelActive() && Input.GetKeyDown((KeyCode)27))
			{
				AdminUI.SetActive(false);
			}
			if (Object.op_Implicit((Object)(object)Utilities.GInst))
			{
				if (Checks.AdminPanelActive() && !Utilities.GInst.uiDialogue.IsActive)
				{
					Utilities.TurnOnUI();
				}
				Checks.CheckESP();
			}
		}

		internal static AssetBundle GetAssetBundleFromResources(string filename)
		{
			string filename2 = filename;
			Assembly executingAssembly = Assembly.GetExecutingAssembly();
			string name = executingAssembly.GetManifestResourceNames().Single((string str) => str.EndsWith(filename2));
			using Stream stream = executingAssembly.GetManifestResourceStream(name);
			return AssetBundle.LoadFromStream(stream);
		}

		public static void LoadAssets()
		{
			AssetBundle = GetAssetBundleFromResources("sunkenadminui");
			AdminUITemp = AssetBundle.LoadAsset<GameObject>("AdminUI");
			Object.DontDestroyOnLoad((Object)(object)AdminUITemp);
			AssetBundle.Unload(false);
		}

		static AdminMenuPlugin()
		{
			string configPath = Paths.ConfigPath;
			char directorySeparatorChar = Path.DirectorySeparatorChar;
			ConfigFileFullPath = configPath + directorySeparatorChar + ConfigFileName;
			AdminMenuLogger = Logger.CreateLogSource("AdminMenu");
			AdminUITemp = null;
			AdminUI = null;
			OpenuiHotkey = null;
			RemoveDropsHotkey = null;
			RemoveDropsRadius = null;
			HideEmptyChests = null;
			HideBrokenScavengeables = null;
			HideCollectibles = null;
		}
	}
	public class AdminUI : MonoBehaviour
	{
		public static AdminUI Instance;

		public RectTransform Canvas;

		public GameObject AdminMenu;

		public ScrollRect ScrollViewLeft;

		public RectTransform LeftButtonList;

		public RectTransform LeftSpawnerList;

		public RectTransform DefaultRightView;

		public RectTransform SpawnerView;

		public Transform spawnerPlaceholder;

		public SpawnerPlaceholder spawnerPlaceholderComp;

		public static Color GreenTextColor;

		public List<GameObject> buttons = new List<GameObject>();

		public const string Act = "Active";

		public const string Inact = "Inactive";

		public static bool allowPlayers;

		public static bool unlimitedHealth;

		public static bool unlimitedStamina;

		public static bool unlimitedEnergy;

		public static bool unlimitedAir;

		public static bool unlimitedAmmo;

		public static bool noHunger;

		public static bool noThirst;

		public static bool playerESP;

		public static bool enemyESP;

		public static bool fishESP;

		public static bool birdESP;

		public static bool lootESP;

		public static bool weaponNoRecoil;

		public static bool weaponNoSpread;

		public static bool transform;

		public static bool noClip;

		public static float timeOfDay;

		public static bool instantKill;

		[Header("Main Buttons")]
		public Button playerCheats;

		public Button visualCheats;

		public Button weaponCheats;

		public Button miscCheats;

		public Button spawnerCheats;

		[Header("Left - Buttons")]
		public Button UnlimitedHealth;

		public Button UnlimitedStamina;

		public Button UnlimitedEnergy;

		public Button UnlimitedOxygen;

		public Button UnlimitedAmmo;

		public Button FreeBuild;

		public Button FreeResearch;

		public Button NoHunger;

		public Button NoThirst;

		public Button PlayerESP;

		public Button EnemyESP;

		public Button FishESP;

		public Button BirdESP;

		public Button LootESP;

		public Button WeaponNoRecoil;

		public Button WeaponNoSpread;

		public Button Transform;

		public Button NoClip;

		public Slider TimeOfDay;

		[Header("Right - Buttons")]
		public Button AllowPlayers;

		public Button InstantKill;

		public Button SavePlayer;

		public Button LoadPlayer;

		public Button SaveWorld;

		public Button LoadWorld;

		public Button TriggerAutoSave;

		public Button LoadAutoSave;

		public TMP_InputField Search;

		public TMP_InputField Amount;

		[Header("Button Descriptions")]
		public Text unlimitedHealthDescription;

		public Text unlimitedStaminaDescription;

		public Text unlimitedEnergyDescription;

		public Text unlimitedOxygenDescription;

		public Text unlimitedAmmoDescription;

		public Text freeBuildDescription;

		public Text freeResearchDescription;

		public Text noHungerDescription;

		public Text noThirstDescription;

		public Text playerEspDescription;

		public Text enemyEspDescription;

		public Text fishEspDescription;

		public Text birdEspDescription;

		public Text lootEspDescription;

		public Text weaponNoRecoilDescription;

		public Text weaponNoSpreadDescription;

		public Text transformDescription;

		public Text noClipDescription;

		public Text instantKillDescription;

		public Text allowPlayersDescription;

		public static Color RedTextColor { get; private set; }

		public void Awake()
		{
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			Color val = default(Color);
			GreenTextColor = (ColorUtility.TryParseHtmlString("#25C835", ref val) ? val : Color.green);
			RedTextColor = ((Graphic)unlimitedHealthDescription).color;
			CreateEventListeners();
			PopulateList(RM.code.allItems.items);
		}

		public void CreateEventListeners()
		{
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Expected O, but got Unknown
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Expected O, but got Unknown
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Expected O, but got Unknown
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_0070: Expected O, but got Unknown
			//IL_0082: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Expected O, but got Unknown
			//IL_009e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a8: Expected O, but got Unknown
			//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c4: Expected O, but got Unknown
			//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e0: Expected O, but got Unknown
			//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: Expected O, but got Unknown
			//IL_010e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0118: Expected O, but got Unknown
			//IL_012a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0134: Expected O, but got Unknown
			//IL_0146: Unknown result type (might be due to invalid IL or missing references)
			//IL_0150: Expected O, but got Unknown
			//IL_0162: Unknown result type (might be due to invalid IL or missing references)
			//IL_016c: Expected O, but got Unknown
			//IL_017e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0188: Expected O, but got Unknown
			//IL_019a: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a4: Expected O, but got Unknown
			//IL_01b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c0: Expected O, but got Unknown
			//IL_01d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01dc: Expected O, but got Unknown
			//IL_01ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f8: Expected O, but got Unknown
			//IL_0226: Unknown result type (might be due to invalid IL or missing references)
			//IL_0230: Expected O, but got Unknown
			//IL_0242: Unknown result type (might be due to invalid IL or missing references)
			//IL_024c: Expected O, but got Unknown
			//IL_025e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0268: Expected O, but got Unknown
			//IL_027a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0284: Expected O, but got Unknown
			//IL_0296: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a0: Expected O, but got Unknown
			//IL_02b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_02bc: Expected O, but got Unknown
			//IL_02ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d8: Expected O, but got Unknown
			//IL_02ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f4: Expected O, but got Unknown
			//IL_0306: Unknown result type (might be due to invalid IL or missing references)
			//IL_0310: Expected O, but got Unknown
			//IL_0322: Unknown result type (might be due to invalid IL or missing references)
			//IL_032c: Expected O, but got Unknown
			//IL_033e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0348: Expected O, but got Unknown
			//IL_035a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0364: Expected O, but got Unknown
			//IL_0376: Unknown result type (might be due to invalid IL or missing references)
			//IL_0380: Expected O, but got Unknown
			((UnityEvent)UnlimitedHealth.onClick).AddListener(new UnityAction(UnlimitedHealth_OnClick));
			((UnityEvent)UnlimitedStamina.onClick).AddListener(new UnityAction(UnlimitedStamina_OnClick));
			((UnityEvent)UnlimitedEnergy.onClick).AddListener(new UnityAction(UnlimitedEnergy_OnClick));
			((UnityEvent)UnlimitedOxygen.onClick).AddListener(new UnityAction(UnlimitedOxygen_OnClick));
			((UnityEvent)UnlimitedAmmo.onClick).AddListener(new UnityAction(UnlimitedAmmo_OnClick));
			((UnityEvent)FreeBuild.onClick).AddListener(new UnityAction(FreeBuild_OnClick));
			((UnityEvent)FreeResearch.onClick).AddListener(new UnityAction(FreeResearch_OnClick));
			((UnityEvent)NoHunger.onClick).AddListener(new UnityAction(NoHunger_OnClick));
			((UnityEvent)NoThirst.onClick).AddListener(new UnityAction(NoThirst_OnClick));
			((UnityEvent)PlayerESP.onClick).AddListener(new UnityAction(PlayerESP_OnClick));
			((UnityEvent)EnemyESP.onClick).AddListener(new UnityAction(EnemyESP_OnClick));
			((UnityEvent)FishESP.onClick).AddListener(new UnityAction(FishESP_OnClick));
			((UnityEvent)BirdESP.onClick).AddListener(new UnityAction(BirdESP_OnClick));
			((UnityEvent)LootESP.onClick).AddListener(new UnityAction(LootESP_OnClick));
			((UnityEvent)WeaponNoRecoil.onClick).AddListener(new UnityAction(WeaponNoRecoil_OnClick));
			((UnityEvent)WeaponNoSpread.onClick).AddListener(new UnityAction(WeaponNoSpread_OnClick));
			((UnityEvent)Transform.onClick).AddListener(new UnityAction(Transform_OnClick));
			((UnityEvent)NoClip.onClick).AddListener(new UnityAction(NoClip_OnClick));
			((UnityEvent<float>)(object)TimeOfDay.onValueChanged).AddListener((UnityAction<float>)TimeOfDay_OnValueChanged);
			((UnityEvent)AllowPlayers.onClick).AddListener(new UnityAction(AllowPlayers_OnClick));
			((UnityEvent)InstantKill.onClick).AddListener(new UnityAction(InstantKill_OnClick));
			((UnityEvent)SavePlayer.onClick).AddListener(new UnityAction(SavePlayer_OnClick));
			((UnityEvent)LoadPlayer.onClick).AddListener(new UnityAction(LoadPlayer_OnClick));
			((UnityEvent)SaveWorld.onClick).AddListener(new UnityAction(SaveWorld_OnClick));
			((UnityEvent)LoadWorld.onClick).AddListener(new UnityAction(LoadWorld_OnClick));
			((UnityEvent)TriggerAutoSave.onClick).AddListener(new UnityAction(TriggerAutoSave_OnClick));
			((UnityEvent)LoadAutoSave.onClick).AddListener(new UnityAction(LoadAutoSave_OnClick));
			((UnityEvent)playerCheats.onClick).AddListener((UnityAction)delegate
			{
				ToggleSubButtons(playerCheats);
			});
			((UnityEvent)visualCheats.onClick).AddListener((UnityAction)delegate
			{
				ToggleSubButtons(visualCheats);
			});
			((UnityEvent)weaponCheats.onClick).AddListener((UnityAction)delegate
			{
				ToggleSubButtons(weaponCheats);
			});
			((UnityEvent)miscCheats.onClick).AddListener((UnityAction)delegate
			{
				ToggleSubButtons(miscCheats);
			});
			((UnityEvent)spawnerCheats.onClick).AddListener(new UnityAction(ToggleSpawnerList));
		}

		public void ToggleSubButtons(Button buttonClicked)
		{
			if (!((Component)LeftButtonList).gameObject.activeSelf)
			{
				((Component)LeftButtonList).gameObject.SetActive(true);
				if (((Component)LeftSpawnerList).gameObject.activeSelf)
				{
					((Component)LeftSpawnerList).gameObject.SetActive(false);
				}
				if (((Component)SpawnerView).gameObject.activeSelf)
				{
					((Component)SpawnerView).gameObject.SetActive(false);
				}
				if (!((Component)DefaultRightView).gameObject.activeSelf)
				{
					((Component)DefaultRightView).gameObject.SetActive(true);
				}
				ScrollViewLeft.content = LeftButtonList;
			}
			string value = DetermineButtonCategory(buttonClicked);
			foreach (GameObject button in buttons)
			{
				button.SetActive(((Object)button).name.Contains(value));
			}
		}

		public void ToggleSpawnerList()
		{
			if (!((Component)LeftSpawnerList).gameObject.activeSelf)
			{
				((Component)LeftSpawnerList).gameObject.SetActive(true);
				if (((Component)LeftButtonList).gameObject.activeSelf)
				{
					((Component)LeftButtonList).gameObject.SetActive(false);
				}
				ScrollViewLeft.content = LeftSpawnerList;
			}
			if (!((Component)SpawnerView).gameObject.activeSelf)
			{
				((Component)SpawnerView).gameObject.SetActive(true);
				if (((Component)DefaultRightView).gameObject.activeSelf)
				{
					((Component)DefaultRightView).gameObject.SetActive(false);
				}
			}
		}

		private string DetermineButtonCategory(Button button)
		{
			string[] array = new string[4] { "Player", "Visual", "Weapon", "Misc" };
			foreach (string text in array)
			{
				if (((Object)button).name.Contains(text))
				{
					return text;
				}
			}
			return string.Empty;
		}

		public void PopulateList(List<Transform> items)
		{
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			foreach (Transform item in items)
			{
				if (!Object.op_Implicit((Object)(object)item))
				{
					continue;
				}
				Item component = ((Component)item).GetComponent<Item>();
				if (!(component == (Item)null))
				{
					Transform obj = Object.Instantiate<Transform>(spawnerPlaceholder, (Transform)(object)LeftSpawnerList, true);
					((Component)obj).gameObject.SetActive(true);
					obj.localScale = Vector3.one;
					SpawnerPlaceholder component2 = ((Component)obj).GetComponent<SpawnerPlaceholder>();
					if (Object.op_Implicit((Object)(object)component.icon))
					{
						component2.Icon.texture = (Texture)(object)component.icon;
					}
					component2.DisplayName.text = $"{component.DisplayName} ({component.ItemID})";
					component2.InternalName.text = component.GetDisplayDescription();
					component2.Cost.text = component.DisplayName;
					if (Object.op_Implicit((Object)(object)((Component)component).GetComponent<Equipment>()))
					{
						component2.Armor.text = ((Component)component).GetComponent<Equipment>().armor.ToString();
					}
					if (Object.op_Implicit((Object)(object)((Component)component).GetComponent<WeaponRaycast>()))
					{
						component2.Damage.text = ((Component)component).GetComponent<WeaponRaycast>().damage.ToString(CultureInfo.InvariantCulture);
					}
				}
			}
		}

		public void FilterItems(string searchTerm)
		{
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Expected O, but got Unknown
			foreach (Transform item in ((Component)LeftSpawnerList).transform)
			{
				Transform val = item;
				if ((Object)(object)val == (Object)null || (Object)(object)val == (Object)(object)spawnerPlaceholder)
				{
					continue;
				}
				SpawnerPlaceholder component = ((Component)val).GetComponent<SpawnerPlaceholder>();
				if (!((Object)(object)component == (Object)null))
				{
					if (string.IsNullOrWhiteSpace(searchTerm) || component.DisplayName.text.ToLower().Contains(searchTerm.ToLower()))
					{
						((Component)val).gameObject.SetActive(true);
					}
					else
					{
						((Component)val).gameObject.SetActive(false);
					}
				}
			}
		}

		public void SearchChanged(string str)
		{
			FilterItems(str);
			AdminMenuPlugin.AdminMenuLogger.LogInfo((object)("SearchChanged: " + str));
		}

		public void AmountSearchChanged(string str)
		{
			AdminMenuPlugin.AdminMenuLogger.LogInfo((object)("AmountSearchChanged: " + str));
		}

		public void UnlimitedHealth_OnClick()
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			unlimitedHealth = !unlimitedHealth;
			((Graphic)unlimitedHealthDescription).color = (unlimitedHealth ? GreenTextColor : RedTextColor);
			unlimitedHealthDescription.text = (unlimitedHealth ? "Active" : "Inactive");
		}

		public void UnlimitedStamina_OnClick()
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			unlimitedStamina = !unlimitedStamina;
			((Graphic)unlimitedStaminaDescription).color = (unlimitedStamina ? GreenTextColor : RedTextColor);
			unlimitedStaminaDescription.text = (unlimitedStamina ? "Active" : "Inactive");
		}

		public void UnlimitedEnergy_OnClick()
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			unlimitedEnergy = !unlimitedEnergy;
			((Graphic)unlimitedEnergyDescription).color = (unlimitedEnergy ? GreenTextColor : RedTextColor);
			unlimitedEnergyDescription.text = (unlimitedEnergy ? "Active" : "Inactive");
		}

		public void UnlimitedOxygen_OnClick()
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			unlimitedAir = !unlimitedAir;
			((Graphic)unlimitedOxygenDescription).color = (unlimitedAir ? GreenTextColor : RedTextColor);
			unlimitedOxygenDescription.text = (unlimitedAir ? "Active" : "Inactive");
		}

		public void UnlimitedAmmo_OnClick()
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			unlimitedAmmo = !unlimitedAmmo;
			((Graphic)unlimitedAmmoDescription).color = (unlimitedAmmo ? GreenTextColor : RedTextColor);
			unlimitedAmmoDescription.text = (unlimitedAmmo ? "Active" : "Inactive");
		}

		public void FreeBuild_OnClick()
		{
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			Utilities.GInst.FreeBuild = !Utilities.GInst.FreeBuild;
			((Graphic)freeBuildDescription).color = (Utilities.GInst.FreeBuild ? GreenTextColor : RedTextColor);
			freeBuildDescription.text = (Utilities.GInst.FreeBuild ? "Active" : "Inactive");
		}

		public void FreeResearch_OnClick()
		{
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			Utilities.GInst.UnLockAllResearch = !Utilities.GInst.UnLockAllResearch;
			((Graphic)freeResearchDescription).color = (Utilities.GInst.UnLockAllResearch ? GreenTextColor : RedTextColor);
			freeResearchDescription.text = (Utilities.GInst.UnLockAllResearch ? "Active" : "Inactive");
		}

		public void NoHunger_OnClick()
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			noHunger = !noHunger;
			((Graphic)noHungerDescription).color = (noHunger ? GreenTextColor : RedTextColor);
			noHungerDescription.text = (noHunger ? "Active" : "Inactive");
		}

		public void NoThirst_OnClick()
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			noThirst = !noThirst;
			((Graphic)noThirstDescription).color = (noThirst ? GreenTextColor : RedTextColor);
			noThirstDescription.text = (noThirst ? "Active" : "Inactive");
		}

		public void PlayerESP_OnClick()
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			playerESP = !playerESP;
			((Graphic)playerEspDescription).color = (playerESP ? GreenTextColor : RedTextColor);
			playerEspDescription.text = (playerESP ? "Active" : "Inactive");
		}

		public void EnemyESP_OnClick()
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			enemyESP = !enemyESP;
			((Graphic)enemyEspDescription).color = (enemyESP ? GreenTextColor : RedTextColor);
			enemyEspDescription.text = (enemyESP ? "Active" : "Inactive");
		}

		public void FishESP_OnClick()
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			fishESP = !fishESP;
			((Graphic)fishEspDescription).color = (fishESP ? GreenTextColor : RedTextColor);
			fishEspDescription.text = (fishESP ? "Active" : "Inactive");
		}

		public void BirdESP_OnClick()
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			birdESP = !birdESP;
			((Graphic)birdEspDescription).color = (birdESP ? GreenTextColor : RedTextColor);
			birdEspDescription.text = (birdESP ? "Active" : "Inactive");
		}

		public void LootESP_OnClick()
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			lootESP = !lootESP;
			((Graphic)lootEspDescription).color = (lootESP ? GreenTextColor : RedTextColor);
			lootEspDescription.text = (lootESP ? "Active" : "Inactive");
		}

		public void WeaponNoRecoil_OnClick()
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			weaponNoRecoil = !weaponNoRecoil;
			((Graphic)weaponNoRecoilDescription).color = (weaponNoRecoil ? GreenTextColor : RedTextColor);
			weaponNoRecoilDescription.text = (weaponNoRecoil ? "Active" : "Inactive");
		}

		public void WeaponNoSpread_OnClick()
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			weaponNoSpread = !weaponNoSpread;
			((Graphic)weaponNoSpreadDescription).color = (weaponNoSpread ? GreenTextColor : RedTextColor);
			weaponNoSpreadDescription.text = (weaponNoSpread ? "Active" : "Inactive");
		}

		public void Transform_OnClick()
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			transform = !transform;
			((Graphic)transformDescription).color = (transform ? GreenTextColor : RedTextColor);
			transformDescription.text = (transform ? "Active" : "Inactive");
		}

		public void NoClip_OnClick()
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			noClip = !noClip;
			((Graphic)noClipDescription).color = (noClip ? GreenTextColor : RedTextColor);
			noClipDescription.text = (noClip ? "Active" : "Inactive");
		}

		public void TimeOfDay_OnValueChanged(float value)
		{
			EnviroSkyMgr.instance.SetTimeOfDay(value);
		}

		public void AllowPlayers_OnClick()
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			allowPlayers = !allowPlayers;
			((Graphic)allowPlayersDescription).color = (allowPlayers ? GreenTextColor : RedTextColor);
			allowPlayersDescription.text = (allowPlayers ? "Allowing player entry" : "Denying player entry");
		}

		public void InstantKill_OnClick()
		{
			//IL_0052: 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)
			if (!((Object)(object)Utilities.GInst.Player.weaponInHand == (Object)null))
			{
				Utilities.GInst.Player.weaponInHand.damage = 1000000f;
				instantKill = !instantKill;
				((Graphic)instantKillDescription).color = (instantKill ? GreenTextColor : RedTextColor);
				instantKillDescription.text = (instantKill ? "Active" : "Inactive");
			}
		}

		public void SavePlayer_OnClick()
		{
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			Utilities.GInst.uiCombat.AddHint("SavePlayer", Color.red, -99f, (AudioClip)null);
			Mainframe.code.SaveManager.SavePlayer(false);
		}

		public void LoadPlayer_OnClick()
		{
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			Utilities.GInst.uiCombat.AddHint("LoadPlayer", Color.red, -99f, (AudioClip)null);
			Mainframe.code.saveManager.LoadLocalPlayer(false);
		}

		public void SaveWorld_OnClick()
		{
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			Utilities.GInst.uiCombat.AddHint("SaveWorld", Color.red, -99f, (AudioClip)null);
			Mainframe.code.SaveManager.SaveWorld();
		}

		public void LoadWorld_OnClick()
		{
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			Utilities.GInst.uiCombat.AddHint("Load World", Color.red, -99f, (AudioClip)null);
			Mainframe.code.SaveManager.LoadWorldAsync(false);
		}

		public void TriggerAutoSave_OnClick()
		{
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			Utilities.GInst.uiCombat.AddHint("Autosaving", Color.red, -99f, (AudioClip)null);
			Mainframe.code.SaveManager.SaveGameAsync(true);
		}

		public void LoadAutoSave_OnClick()
		{
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			Utilities.GInst.uiCombat.AddHint("Loading Autosave", Color.red, -99f, (AudioClip)null);
			Mainframe.code.SaveManager.LoadGame(true);
		}

		public static bool ShouldEsp()
		{
			if (!enemyESP && !playerESP && !fishESP && !birdESP)
			{
				return lootESP;
			}
			return true;
		}
	}
}
namespace AdminMenu.Util
{
	public class Checks
	{
		public static bool AdminPanelActive()
		{
			if ((Object)(object)AdminMenuPlugin.AdminUI != (Object)null)
			{
				return AdminMenuPlugin.AdminUI.activeSelf;
			}
			return false;
		}

		public static void CheckPlayer()
		{
			//IL_0186: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a9: 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_01d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d6: Unknown result type (might be due to invalid IL or missing references)
			if (Utilities.GInst.player.IsDead)
			{
				return;
			}
			if (AdminUI.unlimitedHealth)
			{
				Utilities.GInst.player._health = Utilities.GInst.player.MaxHealth;
				Utilities.GInst.player._targetHealth = Utilities.GInst.player.MaxHealth;
				Utilities.GInst.player.BodyTemperature = 100f;
				if (!((double)Utilities.GInst.player.Bleeding <= 0.0))
				{
					Utilities.GInst.player.Bleeding = 0f;
				}
			}
			else
			{
				Global.code.Player.Health = 160f;
				Global.code.Player.MaxHealth = 160f;
			}
			if (AdminUI.unlimitedAir)
			{
				Utilities.GInst.player.Air = Utilities.GInst.player.MaxAir;
			}
			if (AdminUI.unlimitedEnergy)
			{
				Utilities.GInst.player._energy = Utilities.GInst.player.MaxEnergy;
			}
			if (AdminUI.unlimitedStamina)
			{
				Utilities.GInst.player._stamina = 130f;
			}
			if (AdminUI.noHunger)
			{
				Utilities.GInst.player._hunger = 100f;
			}
			if (AdminUI.noThirst)
			{
				Utilities.GInst.player._thirst = 100f;
			}
			if (AdminUI.transform && Input.GetKeyDown((KeyCode)306))
			{
				Transform transform = ((Component)Utilities.GInst.player).transform;
				transform.position += 0.25f * ((Component)Utilities.GInst.player._mainCamera).transform.forward;
				ManualLogSource adminMenuLogger = AdminMenuPlugin.AdminMenuLogger;
				Vector3 position = ((Component)Utilities.GInst.player).transform.position;
				adminMenuLogger.LogInfo((object)("Teleported player forward, current position: " + ((object)(Vector3)(ref position)).ToString()));
			}
		}

		public static void CheckWeapon()
		{
			if (!((Object)(object)Utilities.GInst.player.weaponInHand == (Object)null))
			{
				if (AdminUI.unlimitedAmmo)
				{
					PlayerWeapons.code.CurrentWeaponBehaviorComponent.bulletsLeft = PlayerWeapons.code.CurrentWeaponBehaviorComponent.bulletsPerClip;
				}
				if (AdminUI.weaponNoRecoil)
				{
					Utilities.GInst.player.weaponInHand.recoil = 0f;
					Utilities.GInst.player.weaponInHand.horizontalKick = 0f;
					Utilities.GInst.player.weaponInHand.verticalKick = 0f;
					Utilities.GInst.player.weaponInHand.viewClimbSide = 0f;
					Utilities.GInst.player.weaponInHand.viewClimbUp = 0f;
				}
				if (AdminUI.weaponNoSpread)
				{
					Utilities.GInst.player.weaponInHand.spread = 0f;
				}
			}
		}

		public static void CheckESP()
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Invalid comparison between Unknown and I4
			if ((int)Event.current.type == 7 && AdminUI.ShouldEsp())
			{
				if (AdminUI.enemyESP)
				{
					DisplayInfoForEntities(Utilities.WsInst.allCharacters.items, ProcessCharacter);
				}
				if (AdminUI.playerESP)
				{
					DisplayInfoForEntities(Utilities.WsInst.allPlayerDummies.items, ProcessCharacterPlayer);
				}
				if (AdminUI.fishESP)
				{
					DisplayInfoForEntities(Utilities.WsInst.fishes.items, ProcessFish);
				}
				if (AdminUI.birdESP)
				{
					DisplayInfoForEntities(Utilities.WsInst.birds.items, ProcessBird);
				}
				if (AdminUI.lootESP)
				{
					DisplayInfoForEntities(Utilities.WsInst.worldScavengables, ProcessWorldScavengable);
					DisplayInfoForEntities(Utilities.WsInst.worldCollectableContinuingInteractions, ProcessWorldCollectableContinuingInteraction);
					DisplayInfoForEntities(Utilities.WsInst.worldChests, ProcessWorldChest);
				}
			}
		}

		private static void DisplayInfoForEntities<T>(IEnumerable<T> entities, Action<T> processEntity)
		{
			foreach (T entity in entities)
			{
				object obj = entity;
				if (Object.op_Implicit((Object)((obj is Object) ? obj : null)))
				{
					processEntity(entity);
				}
			}
		}

		private static void ProcessCharacter(Object obj)
		{
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: 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_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: 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_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: 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_009f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a6: 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_00c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0147: Unknown result type (might be due to invalid IL or missing references)
			//IL_0153: Unknown result type (might be due to invalid IL or missing references)
			//IL_015a: Unknown result type (might be due to invalid IL or missing references)
			//IL_016a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0179: Unknown result type (might be due to invalid IL or missing references)
			//IL_0185: Unknown result type (might be due to invalid IL or missing references)
			//IL_0198: 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_01c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e1: 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_0207: Unknown result type (might be due to invalid IL or missing references)
			//IL_020b: 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_0223: Unknown result type (might be due to invalid IL or missing references)
			//IL_0236: Unknown result type (might be due to invalid IL or missing references)
			//IL_0257: Unknown result type (might be due to invalid IL or missing references)
			//IL_025c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0260: Unknown result type (might be due to invalid IL or missing references)
			//IL_0101: Unknown result type (might be due to invalid IL or missing references)
			//IL_010e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0122: Unknown result type (might be due to invalid IL or missing references)
			//IL_013c: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_0309: Unknown result type (might be due to invalid IL or missing references)
			//IL_0318: Unknown result type (might be due to invalid IL or missing references)
			//IL_0324: Unknown result type (might be due to invalid IL or missing references)
			//IL_0337: Unknown result type (might be due to invalid IL or missing references)
			//IL_0352: Unknown result type (might be due to invalid IL or missing references)
			//IL_0361: Unknown result type (might be due to invalid IL or missing references)
			//IL_036d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0380: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_03aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c2: 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_03f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_03fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0282: Unknown result type (might be due to invalid IL or missing references)
			//IL_028f: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02cc: Unknown result type (might be due to invalid IL or missing references)
			Transform val = (Transform)(object)((obj is Transform) ? obj : null);
			if ((Object)(object)val == (Object)null)
			{
				return;
			}
			Character component = ((Component)val).GetComponent<Character>();
			if (!((Object)(object)component != (Object)null))
			{
				return;
			}
			Vector3 position = ((Component)val).transform.position;
			Vector3 val2 = Utilities.CamInst.WorldToScreenPoint(position);
			Vector3 position2 = ((Component)component.eye).transform.position;
			Vector3 val3 = Utilities.CamInst.WorldToScreenPoint(position2);
			Vector3 val4 = Utilities.CamInst.WorldToScreenPoint(((Component)component).transform.position);
			float num = Vector3.Distance(((Component)Utilities.PCInst).transform.position, position);
			float health = component.health;
			string pText = ((object)component.weapon).ToString();
			float num2 = Mathf.Abs(val3.y - val4.y);
			bool flag = !Utilities.IsEnemyVisible(((Component)Utilities.CamInst).transform.position, position2);
			if (!Utilities.IsOnScreen(val2) || !((double)num < 250.0))
			{
				return;
			}
			if (flag)
			{
				if ((double)num < 150.0)
				{
					Utilities.CornerBox(new Vector2(val3.x, (float)((double)Screen.height - (double)val3.y - 20.0)), num2 / 2f, num2 + 20f, 2f, Color.red, outline: true);
				}
				Utilities.DrawString(new Vector2(val2.x, (float)Screen.height - val2.y), Utilities.NameReplacer(((Object)val).name), Color.red, center: true, 12, (FontStyle)0);
				Utilities.DrawString(new Vector2(val2.x, (float)((double)Screen.height - (double)val2.y + 12.0)), Utilities.WeaponReplacer(pText), Color.HSVToRGB(0.1055556f, 0.29f, 1f), center: true, 12, (FontStyle)0);
				Vector2 pos = new Vector2(val2.x, (float)((double)Screen.height - (double)val2.y + 24.0));
				string text = Mathf.Round(health) + " HP";
				Color white = Color.white;
				Utilities.DrawString(pos, text, white, center: true, 12, (FontStyle)0);
				Vector2 pos2 = new Vector2(val2.x, (float)((double)Screen.height - (double)val2.y + 36.0));
				string text2 = Mathf.Round(num) + "m";
				Color yellow = Color.yellow;
				Utilities.DrawString(pos2, text2, yellow, center: true, 12, (FontStyle)0);
			}
			else if (!flag)
			{
				if ((double)num < 150.0)
				{
					Utilities.CornerBox(new Vector2(val3.x, (float)((double)Screen.height - (double)val3.y - 20.0)), num2 / 2f, num2 + 20f, 2f, Color.HSVToRGB(0.1083333f, 1f, 1f), outline: true);
				}
				Utilities.DrawString(new Vector2(val2.x, (float)Screen.height - val2.y), Utilities.NameReplacer(((Object)val).name), Color.HSVToRGB(0.1083333f, 1f, 1f), center: true, 12, (FontStyle)0);
				Utilities.DrawString(new Vector2(val2.x, (float)((double)Screen.height - (double)val2.y + 12.0)), Utilities.WeaponReplacer(pText), Color.HSVToRGB(0.1055556f, 0.29f, 1f), center: true, 12, (FontStyle)0);
				Vector2 pos3 = new Vector2(val2.x, (float)((double)Screen.height - (double)val2.y + 24.0));
				string text3 = Mathf.Round(health) + " HP";
				Color white2 = Color.white;
				Utilities.DrawString(pos3, text3, white2, center: true, 12, (FontStyle)0);
				Vector2 pos4 = new Vector2(val2.x, (float)((double)Screen.height - (double)val2.y + 36.0));
				string text4 = Mathf.Round(num) + "m";
				Color yellow2 = Color.yellow;
				Utilities.DrawString(pos4, text4, yellow2, center: true, 12, (FontStyle)0);
			}
		}

		private static void ProcessCharacterPlayer(Object obj)
		{
			//IL_006e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_0079: 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_007f: Unknown result type (might be due to invalid IL or missing references)
			//IL_008b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_009e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ee: 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_00ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0176: Unknown result type (might be due to invalid IL or missing references)
			//IL_0182: 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_0199: 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_01b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c7: 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_01df: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0213: Unknown result type (might be due to invalid IL or missing references)
			//IL_0218: Unknown result type (might be due to invalid IL or missing references)
			//IL_021c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0130: 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_0151: Unknown result type (might be due to invalid IL or missing references)
			//IL_016b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0293: Unknown result type (might be due to invalid IL or missing references)
			//IL_029f: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f3: 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_02ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_030b: Unknown result type (might be due to invalid IL or missing references)
			//IL_031e: Unknown result type (might be due to invalid IL or missing references)
			//IL_033f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0344: Unknown result type (might be due to invalid IL or missing references)
			//IL_0348: Unknown result type (might be due to invalid IL or missing references)
			//IL_023e: Unknown result type (might be due to invalid IL or missing references)
			//IL_024b: Unknown result type (might be due to invalid IL or missing references)
			//IL_025f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0288: Unknown result type (might be due to invalid IL or missing references)
			Transform val = (Transform)(object)((obj is Transform) ? obj : null);
			if ((Object)(object)val == (Object)null)
			{
				return;
			}
			PlayerDummy component = ((Component)val).GetComponent<PlayerDummy>();
			if (!((Object)(object)component != (Object)null) || !Object.op_Implicit((Object)(object)((SimulationBehaviour)component).Object) || !((SimulationBehaviour)component).Object.IsValid || !(component.CharacterGuid != Utilities.GInst.Player.playerDummy.CharacterGuid))
			{
				return;
			}
			Vector3 position = ((Component)val).transform.position;
			Vector3 val2 = Utilities.CamInst.WorldToScreenPoint(position);
			Vector3 position2 = ((Component)component.eye).transform.position;
			Vector3 val3 = Utilities.CamInst.WorldToScreenPoint(position2);
			Vector3 val4 = Utilities.CamInst.WorldToScreenPoint(((Component)component).transform.position);
			float num = Vector3.Distance(((Component)Utilities.PCInst).transform.position, position);
			float num2 = Mathf.Abs(val3.y - val4.y);
			bool flag = !Utilities.IsEnemyVisible(((Component)Utilities.CamInst).transform.position, position2);
			if (!Utilities.IsOnScreen(val2) || !((double)num < 250.0))
			{
				return;
			}
			if (flag)
			{
				if ((double)num < 150.0)
				{
					Utilities.CornerBox(new Vector2(val3.x, (float)((double)Screen.height - (double)val3.y - 20.0)), num2 / 2f, num2 + 20f, 2f, Color.green, outline: true);
				}
				Utilities.DrawString(new Vector2(val2.x, (float)Screen.height - val2.y), Utilities.NameReplacer(component.CharacterName), Color.green, center: true, 12, (FontStyle)0);
				new Vector2(val2.x, (float)((double)Screen.height - (double)val2.y + 24.0));
				_ = Color.white;
				Vector2 pos = new Vector2(val2.x, (float)((double)Screen.height - (double)val2.y + 36.0));
				string text = Mathf.Round(num) + "m";
				Color yellow = Color.yellow;
				Utilities.DrawString(pos, text, yellow, center: true, 12, (FontStyle)0);
			}
			else if (!flag)
			{
				if ((double)num < 150.0)
				{
					Utilities.CornerBox(new Vector2(val3.x, (float)((double)Screen.height - (double)val3.y - 20.0)), num2 / 2f, num2 + 20f, 2f, Color.HSVToRGB(0.1083333f, 1f, 1f), outline: true);
				}
				Utilities.DrawString(new Vector2(val2.x, (float)Screen.height - val2.y), Utilities.NameReplacer(component.CharacterName), Color.HSVToRGB(0.1083333f, 1f, 1f), center: true, 12, (FontStyle)0);
				new Vector2(val2.x, (float)((double)Screen.height - (double)val2.y + 24.0));
				_ = Color.white;
				Vector2 pos2 = new Vector2(val2.x, (float)((double)Screen.height - (double)val2.y + 36.0));
				string text2 = Mathf.Round(num) + "m";
				Color yellow2 = Color.yellow;
				Utilities.DrawString(pos2, text2, yellow2, center: true, 12, (FontStyle)0);
			}
		}

		private static void ProcessFish(Object obj)
		{
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: 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_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f8: 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_0101: Unknown result type (might be due to invalid IL or missing references)
			//IL_010d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0119: 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_014d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0152: Unknown result type (might be due to invalid IL or missing references)
			//IL_0156: Unknown result type (might be due to invalid IL or missing references)
			Transform val = (Transform)(object)((obj is Transform) ? obj : null);
			if ((Object)(object)val == (Object)null)
			{
				return;
			}
			FishAI component = ((Component)val).GetComponent<FishAI>();
			if ((Object)(object)component != (Object)null)
			{
				Vector3 position = ((Component)val).transform.position;
				Vector3 val2 = Utilities.CamInst.WorldToScreenPoint(position);
				float num = Vector3.Distance(((Component)Utilities.PCInst).transform.position, position);
				float health = component.Health;
				if (Utilities.IsOnScreen(val2) && (double)num < 100.0)
				{
					Utilities.DrawString(new Vector2(val2.x, (float)Screen.height - val2.y), Utilities.NameReplacer(((Object)val).name), Color.HSVToRGB(0.5f, 1f, 1f), center: true, 12, (FontStyle)0);
					Vector2 pos = new Vector2(val2.x, (float)((double)Screen.height - (double)val2.y + 12.0));
					string text = Mathf.Round(health) + " HP";
					Color white = Color.white;
					Utilities.DrawString(pos, text, white, center: true, 12, (FontStyle)0);
					Vector2 pos2 = new Vector2(val2.x, (float)((double)Screen.height - (double)val2.y + 24.0));
					string text2 = Mathf.Round(num) + "m";
					Color yellow = Color.yellow;
					Utilities.DrawString(pos2, text2, yellow, center: true, 12, (FontStyle)0);
				}
			}
		}

		private static void ProcessBird(Object obj)
		{
			//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_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: Unknown result type (might be due to invalid IL or missing references)
			//IL_00af: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fe: 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_0107: Unknown result type (might be due to invalid IL or missing references)
			//IL_0113: Unknown result type (might be due to invalid IL or missing references)
			//IL_011f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0132: Unknown result type (might be due to invalid IL or missing references)
			//IL_0152: Unknown result type (might be due to invalid IL or missing references)
			//IL_0157: Unknown result type (might be due to invalid IL or missing references)
			//IL_015b: Unknown result type (might be due to invalid IL or missing references)
			Transform val = (Transform)(object)((obj is Transform) ? obj : null);
			if ((Object)(object)val == (Object)null)
			{
				return;
			}
			Bird component = ((Component)val).GetComponent<Bird>();
			if ((Object)(object)component != (Object)null)
			{
				Vector3 val2 = Utilities.CamInst.WorldToScreenPoint(((Component)val).transform.position);
				float num = Vector3.Distance(((Component)Utilities.PCInst).transform.position, ((Component)val).transform.position);
				float health = component.health;
				if (Utilities.IsOnScreen(val2) && (double)num < 100.0)
				{
					Utilities.DrawString(new Vector2(val2.x, (float)Screen.height - val2.y), Utilities.NameReplacer(((Object)val).name), Color.HSVToRGB(7f / 90f, 0.275f, 1f), center: true, 12, (FontStyle)0);
					Vector2 pos = new Vector2(val2.x, (float)((double)Screen.height - (double)val2.y + 12.0));
					string text = Mathf.Round(health) + " HP";
					Color white = Color.white;
					Utilities.DrawString(pos, text, white, center: true, 12, (FontStyle)0);
					Vector2 pos2 = new Vector2(val2.x, (float)((double)Screen.height - (double)val2.y + 24.0));
					string text2 = Mathf.Round(num) + "m";
					Color yellow = Color.yellow;
					Utilities.DrawString(pos2, text2, yellow, center: true, 12, (FontStyle)0);
				}
			}
		}

		private static void ProcessWorldScavengable(Scavengeable scavengable)
		{
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: 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_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0107: Unknown result type (might be due to invalid IL or missing references)
			if (AdminMenuPlugin.HideBrokenScavengeables.Value != AdminMenuPlugin.Toggle.On || scavengable.ChopAmount > 0)
			{
				Vector3 position = ((Component)scavengable).transform.position;
				Vector3 val = Utilities.CamInst.WorldToScreenPoint(position);
				float num = Vector3.Distance(((Component)Utilities.PCInst).transform.position, position);
				if (Utilities.IsOnScreen(val) && (double)num < 100.0)
				{
					Utilities.DrawString(new Vector2(val.x, (float)Screen.height - val.y), Utilities.LootReplacer(((Object)scavengable).name[0].ToString().ToUpper()) + Utilities.LootReplacer(((Object)scavengable).name).Substring(1), Color.HSVToRGB(0.1055556f, 0.29f, 1f), center: true, 12, (FontStyle)0);
					Utilities.DrawString(new Vector2(val.x, (float)((double)Screen.height - (double)val.y + 12.0)), Mathf.Round(num) + "m", Color.yellow, center: true, 12, (FontStyle)0);
				}
			}
		}

		private static void ProcessWorldChest(Chest chest)
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: 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_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_0070: 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_00bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_00da: 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_010b: Unknown result type (might be due to invalid IL or missing references)
			if (AdminMenuPlugin.HideEmptyChests.Value != AdminMenuPlugin.Toggle.On || !chest._storage.IsEmpty())
			{
				Vector3 position = ((Component)chest).transform.position;
				Vector3 val = Utilities.CamInst.WorldToScreenPoint(position);
				float num = Vector3.Distance(((Component)Utilities.PCInst).transform.position, position);
				if (Utilities.IsOnScreen(val) && (double)num < 100.0)
				{
					Utilities.DrawString(new Vector2(val.x, (float)Screen.height - val.y), Utilities.LootReplacer(((Object)chest).name[0].ToString().ToUpper()) + Utilities.LootReplacer(((Object)chest).name).Substring(1), Color.HSVToRGB(0.05277778f, 0.719f, 0.627f), center: true, 12, (FontStyle)0);
					Utilities.DrawString(new Vector2(val.x, (float)((double)Screen.height - (double)val.y + 12.0)), Mathf.Round(num) + "m", Color.yellow, center: true, 12, (FontStyle)0);
				}
			}
		}

		private static void ProcessWorldCollectableContinuingInteraction(CollectableContinuingInteraction interaction)
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: 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_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_0070: 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_0096: 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_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
			if (AdminMenuPlugin.HideCollectibles.Value != AdminMenuPlugin.Toggle.On || ((Component)interaction).gameObject.activeSelf)
			{
				Vector3 position = ((Component)interaction).transform.position;
				Vector3 val = Utilities.CamInst.WorldToScreenPoint(position);
				float num = Vector3.Distance(((Component)Utilities.PCInst).transform.position, position);
				if (Utilities.IsOnScreen(val) && (double)num < 100.0)
				{
					Utilities.DrawString(new Vector2(val.x, (float)Screen.height - val.y), Utilities.LootReplacer(((Object)interaction).name), Color.HSVToRGB(0.1666667f, 0.102f, 0.961f), center: true, 12, (FontStyle)0);
					Utilities.DrawString(new Vector2(val.x, (float)((double)Screen.height - (double)val.y + 12.0)), Mathf.Round(num) + "m", Color.yellow, center: true, 12, (FontStyle)0);
				}
			}
		}
	}
	public static class Utilities
	{
		private class RingArray
		{
			public Vector2[] Positions { get; private set; }

			public RingArray(int numSegments)
			{
				//IL_003d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0042: Unknown result type (might be due to invalid IL or missing references)
				Positions = (Vector2[])(object)new Vector2[numSegments];
				float num = 360f / (float)numSegments;
				for (int i = 0; i < numSegments; i++)
				{
					float num2 = (float)Math.PI / 180f * num * (float)i;
					Positions[i] = new Vector2(Mathf.Sin(num2), Mathf.Cos(num2));
				}
			}
		}

		private static Dictionary<int, RingArray> ringDict = new Dictionary<int, RingArray>();

		private static GUIStyle __style = new GUIStyle();

		private static GUIStyle __outlineStyle = new GUIStyle();

		private static Texture2D drawingTex;

		private static Color lastTexColour;

		public static Camera CamInst => GInst.player._mainCamera;

		public static PlayerCharacter PCInst => GInst.player;

		public static Storage StorInst => GInst.player.playerStorage;

		public static WeaponBehavior WbInst => PlayerWeapons.code.CurrentWeaponBehaviorComponent;

		public static Global GInst => Global.code;

		public static WorldScene WsInst => WorldScene.code;

		public static FPSPlayer FpspInst => FPSPlayer.code;

		public static RM RmInst => RM.code;

		public static GUIStyle StringStyle { get; set; } = new GUIStyle(GUI.skin.label);


		public static Color Color
		{
			get
			{
				//IL_0000: Unknown result type (might be due to invalid IL or missing references)
				return GUI.color;
			}
			set
			{
				//IL_0000: Unknown result type (might be due to invalid IL or missing references)
				GUI.color = value;
			}
		}

		public static void TurnOnUI()
		{
			GInst.OnGUI = true;
			((Behaviour)RPGCamera.code.blur).enabled = Checks.AdminPanelActive() && !GInst.uiDialogue.IsActive;
		}

		public static void RemoveDrops()
		{
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			DiscardedItem[] array = Object.FindObjectsOfType<DiscardedItem>();
			foreach (DiscardedItem val in array)
			{
				if (!(Vector3.Distance(((Component)val).transform.position, ((Component)PCInst).transform.position) <= AdminMenuPlugin.RemoveDropsRadius.Value))
				{
					continue;
				}
				if (((SimulationBehaviour)val).Runner.IsServer || (((SimulationBehaviour)val).Object.HasStateAuthority && ((SimulationBehaviour)val).Object.HasInputAuthority) || ((SimulationBehaviour)val).Runner.IsHostPlayer(Global.code.Player.playerDummy.PlayerRef))
				{
					((SimulationBehaviour)val).Runner.Despawn(((SimulationBehaviour)val).Object, false);
					continue;
				}
				try
				{
					((SimulationBehaviour)val).Runner.Despawn(((SimulationBehaviour)val).Object, false);
				}
				catch
				{
				}
			}
		}

		public static bool IsOnScreen(Vector3 position)
		{
			//IL_0000: 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_002b: Unknown result type (might be due to invalid IL or missing references)
			if ((double)position.y > 0.00999999977648258 && (double)position.y < (double)Screen.height - 5.0)
			{
				return (double)position.z > 0.00999999977648258;
			}
			return false;
		}

		public static void DrawLine(Vector2 from, Vector2 to, float thickness, Color color)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			Color = color;
			DrawLine(from, to, thickness);
		}

		public static void DrawLine(Vector2 from, Vector2 to, float thickness)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: 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_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: 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_0035: 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_003b: 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_0041: 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_0057: Unknown result type (might be due to invalid IL or missing references)
			Vector2 val = to - from;
			Vector2 normalized = ((Vector2)(ref val)).normalized;
			double num = (double)Mathf.Atan2(normalized.y, normalized.x) * 57.2957801818848;
			GUIUtility.RotateAroundPivot((float)num, from);
			Vector2 right = Vector2.right;
			val = from - to;
			DrawBox(from, right * ((Vector2)(ref val)).magnitude, thickness, centered: false);
			GUIUtility.RotateAroundPivot((float)(0.0 - num), from);
		}

		public static void CornerBox(Vector2 Head, float Width, float Height, float thickness, Color color, bool outline)
		{
			//IL_0237: Unknown result type (might be due to invalid IL or missing references)
			//IL_0245: Unknown result type (might be due to invalid IL or missing references)
			//IL_0252: Unknown result type (might be due to invalid IL or missing references)
			//IL_0259: Unknown result type (might be due to invalid IL or missing references)
			//IL_0267: Unknown result type (might be due to invalid IL or missing references)
			//IL_0274: Unknown result type (might be due to invalid IL or missing references)
			//IL_027b: Unknown result type (might be due to invalid IL or missing references)
			//IL_028c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0299: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_02bb: 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_02d0: 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_02f3: 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_0320: 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_0338: 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_035b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0369: Unknown result type (might be due to invalid IL or missing references)
			//IL_038a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: 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_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_0074: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_0093: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d4: 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_0108: Unknown result type (might be due to invalid IL or missing references)
			//IL_0112: Unknown result type (might be due to invalid IL or missing references)
			//IL_0131: Unknown result type (might be due to invalid IL or missing references)
			//IL_014f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0159: Unknown result type (might be due to invalid IL or missing references)
			//IL_0178: Unknown result type (might be due to invalid IL or missing references)
			//IL_0199: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e3: 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_020c: Unknown result type (might be due to invalid IL or missing references)
			//IL_022d: Unknown result type (might be due to invalid IL or missing references)
			int num = (int)((double)Width / 4.0);
			int num2 = num;
			if (outline)
			{
				RectFilled((float)((double)Head.x - (double)Width / 2.0 - 1.0), Head.y - 1f, num + 2, 3f, Color.black);
				RectFilled((float)((double)Head.x - (double)Width / 2.0 - 1.0), Head.y - 1f, 3f, num2 + 2, Color.black);
				RectFilled((float)((double)Head.x + (double)Width / 2.0 - (double)num - 1.0), Head.y - 1f, num + 2, 3f, Color.black);
				RectFilled((float)((double)Head.x + (double)Width / 2.0 - 1.0), Head.y - 1f, 3f, num2 + 2, Color.black);
				RectFilled((float)((double)Head.x - (double)Width / 2.0 - 1.0), (float)((double)Head.y + (double)Height - 4.0), num + 2, 3f, Color.black);
				RectFilled((float)((double)Head.x - (double)Width / 2.0 - 1.0), (float)((double)Head.y + (double)Height - (double)num2 - 4.0), 3f, num2 + 2, Color.black);
				RectFilled((float)((double)Head.x + (double)Width / 2.0 - (double)num - 1.0), (float)((double)Head.y + (double)Height - 4.0), num + 2, 3f, Color.black);
				RectFilled((float)((double)Head.x + (double)Width / 2.0 - 1.0), (float)((double)Head.y + (double)Height - (double)num2 - 4.0), 3f, num2 + 3, Color.black);
			}
			RectFilled(Head.x - Width / 2f, Head.y, num, 1f, color);
			RectFilled(Head.x - Width / 2f, Head.y, 1f, num2, color);
			RectFilled(Head.x + Width / 2f - (float)num, Head.y, num, 1f, color);
			RectFilled(Head.x + Width / 2f, Head.y, 1f, num2, color);
			RectFilled(Head.x - Width / 2f, (float)((double)Head.y + (double)Height - 3.0), num, 1f, color);
			RectFilled(Head.x - Width / 2f, (float)((double)Head.y + (double)Height - (double)num2 - 3.0), 1f, num2, color);
			RectFilled(Head.x + Width / 2f - (float)num, (float)((double)Head.y + (double)Height - 3.0), num, 1f, color);
			RectFilled(Head.x + Width / 2f, (float)((double)Head.y + (double)Height - (double)num2 - 3.0), 1f, num2 + 1, color);
		}

		internal static void RectFilled(float x, float y, float width, float height, Color color)
		{
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Expected O, but got Unknown
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			if (!Object.op_Implicit((Object)(object)drawingTex))
			{
				drawingTex = new Texture2D(1, 1);
			}
			if (color != lastTexColour)
			{
				drawingTex.SetPixel(0, 0, color);
				drawingTex.Apply();
				lastTexColour = color;
			}
			GUI.DrawTexture(new Rect(x, y, width, height), (Texture)(object)drawingTex);
		}

		public static void DrawBox(Vector2 position, Vector2 size, float thickness, Color color, bool centered = true)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			Color = color;
			DrawBox(position, size, thickness, centered);
		}

		public static void DrawBox(Vector2 position, Vector2 size, float thickness, bool centered = true)
		{
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: 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_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: 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_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: 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_0088: 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_0095: Unknown result type (might be due to invalid IL or missing references)
			//IL_009e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0004: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			if (centered)
			{
				_ = position - size / 2f;
			}
			GUI.DrawTexture(new Rect(position.x, position.y, size.x, thickness), (Texture)(object)Texture2D.whiteTexture);
			GUI.DrawTexture(new Rect(position.x, position.y, thickness, size.y), (Texture)(object)Texture2D.whiteTexture);
			GUI.DrawTexture(new Rect(position.x + size.x, position.y, thickness, size.y), (Texture)(object)Texture2D.whiteTexture);
			GUI.DrawTexture(new Rect(position.x, position.y + size.y, size.x + thickness, thickness), (Texture)(object)Texture2D.whiteTexture);
		}

		public static void DrawCross(Vector2 position, Vector2 size, float thickness, Color color)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			Color = color;
			DrawCross(position, size, thickness);
		}

		public static void DrawCross(Vector2 position, Vector2 size, float thickness)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			GUI.DrawTexture(new Rect(position.x - size.x / 2f, position.y, size.x, thickness), (Texture)(object)Texture2D.whiteTexture);
			GUI.DrawTexture(new Rect(position.x, position.y - size.y / 2f, thickness, size.y), (Texture)(object)Texture2D.whiteTexture);
		}

		public static void DrawDot(Vector2 position, Color color)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			Color = color;
			DrawDot(position);
		}

		public static void DrawDot(Vector2 position)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//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)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			DrawBox(position - Vector2.one, Vector2.one * 2f, 1f);
		}

		public static void DrawString(Vector2 pos, string text, Color color, bool center = true, int size = 12, FontStyle fontStyle = 1, int depth = 1)
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: 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_007f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0085: Expected O, but got Unknown
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Expected O, but got Unknown
			//IL_009e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_00de: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0111: Unknown result type (might be due to invalid IL or missing references)
			//IL_0121: Unknown result type (might be due to invalid IL or missing references)
			//IL_0127: 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_0148: Unknown result type (might be due to invalid IL or missing references)
			//IL_0154: Unknown result type (might be due to invalid IL or missing references)
			//IL_016a: Unknown result type (might be due to invalid IL or missing references)
			//IL_017a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0186: Unknown result type (might be due to invalid IL or missing references)
			//IL_019c: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c2: 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_01df: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0205: Unknown result type (might be due to invalid IL or missing references)
			//IL_0211: 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_0237: Unknown result type (might be due to invalid IL or missing references)
			//IL_023d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0253: 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_0269: 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_028f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0295: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a5: Unknown result type (might be due to invalid IL or missing references)
			__style.fontSize = size;
			__style.richText = true;
			__style.normal.textColor = color;
			__style.fontStyle = fontStyle;
			__outlineStyle.fontSize = size;
			__outlineStyle.richText = true;
			__outlineStyle.normal.textColor = new Color(0f, 0f, 0f, 1f);
			__outlineStyle.fontStyle = fontStyle;
			GUIContent val = new GUIContent(text);
			GUIContent val2 = new GUIContent(text);
			if (center)
			{
				pos.x -= __style.CalcSize(val).x / 2f;
			}
			switch (depth)
			{
			case 0:
				GUI.Label(new Rect(pos.x, pos.y, 3