Decompiled source of ChestESP v1.2.3

ESP.dll

Decompiled 2 weeks ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using HG;
using Microsoft.CodeAnalysis;
using RoR2;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("ESP")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+a4865819a6e05eac75d7a1c2e22d35b6c901ebaf")]
[assembly: AssemblyProduct("ESP")]
[assembly: AssemblyTitle("ESP")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace ESP
{
	public class config
	{
		public static ConfigFile configFile;

		public static ConfigEntry<KeyCode> ToggleEspKey;

		public static ConfigEntry<KeyCode> ToggleMenuKey;

		public static ConfigEntry<int> LabelSize;

		public static ConfigEntry<bool> AltTextToggle;

		public static ConfigEntry<string> AltText;

		public static ConfigEntry<bool> DrawTextShadow;

		public static ConfigEntry<float> TextShadowSize;

		public static ConfigEntry<bool> DrawChestsToggle;

		public static ConfigEntry<bool> ShowChestItemNames;

		public static ConfigEntry<bool> DrawTempChestsToggle;

		public static ConfigEntry<bool> ShowTempChestItemNames;

		public static ConfigEntry<bool> DrawShopsToggle;

		public static ConfigEntry<bool> ShowShopItemNames;

		public static ConfigEntry<bool> DrawScrappersToggle;

		public static ConfigEntry<bool> DrawPrintersToggle;

		public static ConfigEntry<bool> ShowPrinterItemNames;

		public static ConfigEntry<bool> DrawTeleportersToggle;

		public static ConfigEntry<bool> DrawDronesToggle;

		public static ConfigEntry<bool> DrawDroneCombinersToggle;

		public static ConfigEntry<bool> DrawPressurePlatesToggle;

		public static ConfigEntry<bool> DrawVultureEggsToggle;

		public static ConfigEntry<bool> DrawShrinesToggle;

		public static ConfigEntry<bool> DrawPortalsToggle;

		public static ConfigEntry<bool> DrawBarrelsToggle;

		public static ConfigEntry<bool> DrawAllPurchaseInteractionsToggle;

		public static ConfigEntry<Color> ShopColor;

		public static ConfigEntry<Color> TeleporterColor;

		public static ConfigEntry<Color> ScrapperColor;

		public static ConfigEntry<Color> PrinterColor;

		public static ConfigEntry<Color> DroneColor;

		public static ConfigEntry<Color> DroneCombinerColor;

		public static ConfigEntry<Color> PressurePlateColor;

		public static ConfigEntry<Color> VultureEggColor;

		public static ConfigEntry<Color> BarrelColor;

		public static ConfigEntry<Color> AllInteractionColor;

		public static ConfigEntry<Color> ColorTier_Common;

		public static ConfigEntry<Color> ColorTier_Uncommon;

		public static ConfigEntry<Color> ColorTier_Legendary;

		public static ConfigEntry<Color> ColorTier_Boss;

		public static ConfigEntry<Color> ColorTier_Lunar;

		public static ConfigEntry<Color> ColorTier_VoidCommon;

		public static ConfigEntry<Color> ColorTier_VoidUncommon;

		public static ConfigEntry<Color> ColorTier_VoidLegendary;

		public static ConfigEntry<Color> ColorTier_VoidBoss;

		public static ConfigEntry<Color> Color_Equipment;

		public static ConfigEntry<Color> Color_LunarEquipment;

		public static ConfigEntry<bool> DrawShrine_Blood;

		public static ConfigEntry<Color> ColorShrine_Blood;

		public static ConfigEntry<bool> DrawShrine_Chance;

		public static ConfigEntry<Color> ColorShrine_Chance;

		public static ConfigEntry<bool> DrawShrine_Combat;

		public static ConfigEntry<Color> ColorShrine_Combat;

		public static ConfigEntry<bool> DrawShrine_Gold;

		public static ConfigEntry<Color> ColorShrine_Gold;

		public static ConfigEntry<bool> DrawShrine_Mountain;

		public static ConfigEntry<Color> ColorShrine_Mountain;

		public static ConfigEntry<bool> DrawShrine_Healing;

		public static ConfigEntry<Color> ColorShrine_Healing;

		public static ConfigEntry<bool> DrawShrine_Cleanse;

		public static ConfigEntry<Color> ColorShrine_Cleanse;

		public static ConfigEntry<bool> DrawShrine_Halcyon;

		public static ConfigEntry<Color> ColorShrine_Halcyon;

		public static ConfigEntry<bool> DrawShrine_Revive;

		public static ConfigEntry<Color> ColorShrine_Revive;

		public static ConfigEntry<bool> DrawPortal_Newt;

		public static ConfigEntry<Color> ColorPortal_Newt;

		public static ConfigEntry<bool> DrawPortal_Gold;

		public static ConfigEntry<Color> ColorPortal_Gold;

		public static ConfigEntry<bool> DrawPortal_Node;

		public static ConfigEntry<Color> ColorPortal_Node;

		public static void Init(ConfigFile file)
		{
			//IL_027e: 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_02b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02cf: 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_0314: Unknown result type (might be due to invalid IL or missing references)
			//IL_033e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0368: Unknown result type (might be due to invalid IL or missing references)
			//IL_0392: Unknown result type (might be due to invalid IL or missing references)
			//IL_03bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0409: Unknown result type (might be due to invalid IL or missing references)
			//IL_043b: Unknown result type (might be due to invalid IL or missing references)
			//IL_047c: Unknown result type (might be due to invalid IL or missing references)
			//IL_04bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_04fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_053f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0571: Unknown result type (might be due to invalid IL or missing references)
			//IL_05b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_05f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0625: Unknown result type (might be due to invalid IL or missing references)
			//IL_0666: Unknown result type (might be due to invalid IL or missing references)
			//IL_06a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_06d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_06fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0716: Unknown result type (might be due to invalid IL or missing references)
			//IL_0731: Unknown result type (might be due to invalid IL or missing references)
			//IL_074c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0767: Unknown result type (might be due to invalid IL or missing references)
			//IL_0791: Unknown result type (might be due to invalid IL or missing references)
			//IL_07bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_07e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0800: Unknown result type (might be due to invalid IL or missing references)
			configFile = file;
			ToggleEspKey = file.Bind<KeyCode>("1. Keybinds", "Toggle ESP", (KeyCode)283, "Key to toggle the ESP on/off.");
			ToggleMenuKey = file.Bind<KeyCode>("1. Keybinds", "Toggle Menu", (KeyCode)284, "Key to toggle the settings menu on/off.");
			LabelSize = file.Bind<int>("2. General", "Label Size", 12, "Font size for the labels.");
			AltTextToggle = file.Bind<bool>("2. General", "Alternative Look", false, "Replaces all labels with a single character for a cleaner look.");
			AltText = file.Bind<string>("2. General", "Alternative Text", "+", "The character to use for the Alternative Look.");
			DrawTextShadow = file.Bind<bool>("2. General", "Text Shadow", true, "Draw a shadow behind text for better readability.");
			TextShadowSize = file.Bind<float>("2. General", "Text Shadow Size", 1.5f, "How thick the shadow is around the text.");
			DrawChestsToggle = file.Bind<bool>("3. Main Toggles", "Chests", true, (ConfigDescription)null);
			ShowChestItemNames = file.Bind<bool>("3. Main Toggles", "Show Chest Item Names", true, (ConfigDescription)null);
			DrawTempChestsToggle = file.Bind<bool>("3. Main Toggles", "Temp Chests", true, (ConfigDescription)null);
			ShowTempChestItemNames = file.Bind<bool>("3. Main Toggles", "Show Temp Chest Item Names", true, (ConfigDescription)null);
			DrawShopsToggle = file.Bind<bool>("3. Main Toggles", "Shops", true, (ConfigDescription)null);
			ShowShopItemNames = file.Bind<bool>("3. Main Toggles", "Show Shop Item Names", true, (ConfigDescription)null);
			DrawPrintersToggle = file.Bind<bool>("3. Main Toggles", "Printers", true, (ConfigDescription)null);
			ShowPrinterItemNames = file.Bind<bool>("3. Main Toggles", "Show Printer Item Names", true, (ConfigDescription)null);
			DrawScrappersToggle = file.Bind<bool>("3. Main Toggles", "Scrappers", true, (ConfigDescription)null);
			DrawTeleportersToggle = file.Bind<bool>("3. Main Toggles", "Teleporters", true, (ConfigDescription)null);
			DrawDronesToggle = file.Bind<bool>("3. Main Toggles", "Drones & Turrets", false, (ConfigDescription)null);
			DrawDroneCombinersToggle = file.Bind<bool>("3. Main Toggles", "Drone Combiners", true, (ConfigDescription)null);
			DrawPressurePlatesToggle = file.Bind<bool>("3. Main Toggles", "Pressure Plates", true, (ConfigDescription)null);
			DrawVultureEggsToggle = file.Bind<bool>("3. Main Toggles", "Vulture Eggs", true, (ConfigDescription)null);
			DrawShrinesToggle = file.Bind<bool>("3. Main Toggles", "Shrines", true, (ConfigDescription)null);
			DrawPortalsToggle = file.Bind<bool>("3. Main Toggles", "Altars", true, (ConfigDescription)null);
			DrawBarrelsToggle = file.Bind<bool>("3. Main Toggles", "Barrels", false, (ConfigDescription)null);
			DrawAllPurchaseInteractionsToggle = file.Bind<bool>("3. Main Toggles", "All Other Interactions", false, (ConfigDescription)null);
			ColorTier_Common = file.Bind<Color>("4. Item & Equipment Colors", "Common (White)", Color.white, (ConfigDescription)null);
			ColorTier_Uncommon = file.Bind<Color>("4. Item & Equipment Colors", "Uncommon (Green)", Color.green, (ConfigDescription)null);
			ColorTier_Legendary = file.Bind<Color>("4. Item & Equipment Colors", "Legendary (Red)", Color.red, (ConfigDescription)null);
			ColorTier_Boss = file.Bind<Color>("4. Item & Equipment Colors", "Boss (Yellow)", Color.yellow, (ConfigDescription)null);
			ColorTier_Lunar = file.Bind<Color>("4. Item & Equipment Colors", "Lunar (Blue)", Color.cyan, (ConfigDescription)null);
			ColorTier_VoidCommon = file.Bind<Color>("4. Item & Equipment Colors", "Void Common", new Color(0.988f, 0.725f, 0.925f), (ConfigDescription)null);
			ColorTier_VoidUncommon = file.Bind<Color>("4. Item & Equipment Colors", "Void Uncommon", new Color(0.776f, 0.47f, 0.705f), (ConfigDescription)null);
			ColorTier_VoidLegendary = file.Bind<Color>("4. Item & Equipment Colors", "Void Legendary", new Color(0.584f, 0.043f, 0.458f), (ConfigDescription)null);
			ColorTier_VoidBoss = file.Bind<Color>("4. Item & Equipment Colors", "Void Boss", new Color(0.584f, 0.043f, 0.458f), (ConfigDescription)null);
			Color_Equipment = file.Bind<Color>("4. Item & Equipment Colors", "Equipment (Orange)", new Color(1f, 0.5f, 0f), (ConfigDescription)null);
			Color_LunarEquipment = file.Bind<Color>("4. Item & Equipment Colors", "Lunar Equipment (Blue)", Color.cyan, (ConfigDescription)null);
			DrawShrine_Blood = file.Bind<bool>("5. Shrine Settings", "Show Shrine of Blood", true, (ConfigDescription)null);
			ColorShrine_Blood = file.Bind<Color>("5. Shrine Settings", "Color Shrine of Blood", Color.red, (ConfigDescription)null);
			DrawShrine_Chance = file.Bind<bool>("5. Shrine Settings", "Show Shrine of Chance", true, (ConfigDescription)null);
			ColorShrine_Chance = file.Bind<Color>("5. Shrine Settings", "Color Shrine of Chance", Color.yellow, (ConfigDescription)null);
			DrawShrine_Combat = file.Bind<bool>("5. Shrine Settings", "Show Shrine of Combat", true, (ConfigDescription)null);
			ColorShrine_Combat = file.Bind<Color>("5. Shrine Settings", "Color Shrine of Combat", new Color(1f, 0.5f, 0.2f), (ConfigDescription)null);
			DrawShrine_Gold = file.Bind<bool>("5. Shrine Settings", "Show Shrine of Gold", true, (ConfigDescription)null);
			ColorShrine_Gold = file.Bind<Color>("5. Shrine Settings", "Color Shrine of Gold", new Color(0.9f, 0.8f, 0.3f), (ConfigDescription)null);
			DrawShrine_Mountain = file.Bind<bool>("5. Shrine Settings", "Show Shrine of the Mountain", true, (ConfigDescription)null);
			ColorShrine_Mountain = file.Bind<Color>("5. Shrine Settings", "Color Shrine of the Mountain", new Color(0.7f, 0.7f, 0.7f), (ConfigDescription)null);
			DrawShrine_Healing = file.Bind<bool>("5. Shrine Settings", "Show Shrine of Healing", true, (ConfigDescription)null);
			ColorShrine_Healing = file.Bind<Color>("5. Shrine Settings", "Color Shrine of Healing", new Color(0.4f, 0.9f, 0.4f), (ConfigDescription)null);
			DrawShrine_Cleanse = file.Bind<bool>("5. Shrine Settings", "Show Cleansing Pool", true, (ConfigDescription)null);
			ColorShrine_Cleanse = file.Bind<Color>("5. Shrine Settings", "Color Cleansing Pool", Color.white, (ConfigDescription)null);
			DrawShrine_Halcyon = file.Bind<bool>("5. Shrine Settings", "Show Halcyon Shrine", true, (ConfigDescription)null);
			ColorShrine_Halcyon = file.Bind<Color>("5. Shrine Settings", "Color Halcyon Shrine", new Color(0.2f, 0.9f, 0.7f), (ConfigDescription)null);
			DrawShrine_Revive = file.Bind<bool>("5. Shrine Settings", "Show Revive Shrine", true, (ConfigDescription)null);
			ColorShrine_Revive = file.Bind<Color>("5. Shrine Settings", "Color Revive Shrine", new Color(0.2f, 0.9f, 0.7f), (ConfigDescription)null);
			DrawPortal_Newt = file.Bind<bool>("6. Altar Settings", "Show Newt Altar", true, (ConfigDescription)null);
			ColorPortal_Newt = file.Bind<Color>("6. Altar Settings", "Color Newt Altar", Color.cyan, (ConfigDescription)null);
			DrawPortal_Gold = file.Bind<bool>("6. Altar Settings", "Show Gold Altar", true, (ConfigDescription)null);
			ColorPortal_Gold = file.Bind<Color>("6. Altar Settings", "Color Gold Altar", new Color(0.9f, 0.8f, 0.3f), (ConfigDescription)null);
			DrawPortal_Node = file.Bind<bool>("6. Altar Settings", "Show Access Node", true, (ConfigDescription)null);
			ColorPortal_Node = file.Bind<Color>("6. Altar Settings", "Color Access Node", new Color(0.4f, 0.298f, 0.294f), (ConfigDescription)null);
			ShopColor = file.Bind<Color>("7. Generic Colors", "Shop", new Color(0f, 0.5f, 1f), (ConfigDescription)null);
			PrinterColor = file.Bind<Color>("7. Generic Colors", "Printer", new Color(0.8f, 0.8f, 0f), (ConfigDescription)null);
			ScrapperColor = file.Bind<Color>("7. Generic Colors", "Scrapper", Color.yellow, (ConfigDescription)null);
			TeleporterColor = file.Bind<Color>("7. Generic Colors", "Teleporter", Color.red, (ConfigDescription)null);
			DroneColor = file.Bind<Color>("7. Generic Colors", "Drones & Turrets", Color.gray, (ConfigDescription)null);
			DroneCombinerColor = file.Bind<Color>("7. Generic Colors", "Drone Combiners", Color.yellow, (ConfigDescription)null);
			PressurePlateColor = file.Bind<Color>("7. Generic Colors", "Pressure Plates", new Color(1f, 0.5882353f, 0.7490196f), (ConfigDescription)null);
			VultureEggColor = file.Bind<Color>("7. Generic Colors", "Vulture Eggs", new Color(0.086f, 0.502f, 0.541f), (ConfigDescription)null);
			BarrelColor = file.Bind<Color>("7. Generic Colors", "Barrels", new Color(0.4078431f, 46f / 85f, 0.5607843f), (ConfigDescription)null);
			AllInteractionColor = file.Bind<Color>("7. Generic Colors", "All Other Interactions", Color.gray, (ConfigDescription)null);
		}
	}
	public class ESP : MonoBehaviour
	{
		private List<PurchaseInteraction> purchaseInteractions;

		private List<MultiShopController> shops;

		private List<ScrapperController> scrappers;

		private List<TeleporterInteraction> teleporters;

		private List<DroneVendorMultiShopController> droneShops;

		private List<DroneVendorTerminalBehavior> allDroneTerminals;

		private List<PressurePlateController> pressurePlates;

		private List<DroneScrapperController> droneScrappers;

		private List<BarrelInteraction> barrels;

		private List<AccessCodesNodeController> accessNodes;

		private List<CharacterBody> vultureEggs;

		private List<DroneCombinerController> droneCombiners;

		private readonly HashSet<GameObject> processedTerminals = new HashSet<GameObject>();

		private FieldInfo barrelOpenedField;

		private FieldInfo optionChestPickupsField;

		private FieldInfo shopAvailableField;

		private FieldInfo droneShopAvailableField;

		public void getReflectionFields()
		{
			barrelOpenedField = typeof(BarrelInteraction).GetField("opened", BindingFlags.Instance | BindingFlags.NonPublic);
			optionChestPickupsField = typeof(OptionChestBehavior).GetField("generatedPickups", BindingFlags.Instance | BindingFlags.NonPublic);
			shopAvailableField = typeof(MultiShopController).GetField("available", BindingFlags.Instance | BindingFlags.NonPublic);
			droneShopAvailableField = typeof(DroneVendorMultiShopController).GetField("available", BindingFlags.Instance | BindingFlags.NonPublic);
		}

		public void Find()
		{
			((MonoBehaviour)this).Invoke("FindObjects", 1f);
		}

		public void FindObjects()
		{
			purchaseInteractions = Object.FindObjectsOfType<PurchaseInteraction>().ToList();
			shops = Object.FindObjectsOfType<MultiShopController>().ToList();
			scrappers = Object.FindObjectsOfType<ScrapperController>().ToList();
			teleporters = Object.FindObjectsOfType<TeleporterInteraction>().ToList();
			droneShops = Object.FindObjectsOfType<DroneVendorMultiShopController>().ToList();
			allDroneTerminals = Object.FindObjectsOfType<DroneVendorTerminalBehavior>().ToList();
			pressurePlates = Object.FindObjectsOfType<PressurePlateController>().ToList();
			droneScrappers = Object.FindObjectsOfType<DroneScrapperController>().ToList();
			barrels = Object.FindObjectsOfType<BarrelInteraction>().ToList();
			accessNodes = Object.FindObjectsOfType<AccessCodesNodeController>(true).ToList();
			vultureEggs = (from body in Object.FindObjectsOfType<CharacterBody>()
				where ((Object)body).name.Contains("VultureEggBody")
				select body).ToList();
			droneCombiners = Object.FindObjectsOfType<DroneCombinerController>().ToList();
		}

		public void drawESP()
		{
			processedTerminals.Clear();
			if (config.DrawShopsToggle.Value)
			{
				drawShops();
				drawDroneShops();
			}
			drawInteractables();
			drawScrappers();
			drawDroneScrappers();
			drawTeleporters();
			drawPressurePlates();
			drawBarrels();
			drawAccessNodes();
			drawVultureEggs();
			drawDroneCombiners();
		}

		private void drawShops()
		{
			//IL_005d: 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_0090: 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_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_0117: Unknown result type (might be due to invalid IL or missing references)
			//IL_011c: 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_0139: Unknown result type (might be due to invalid IL or missing references)
			if (shops == null)
			{
				return;
			}
			foreach (MultiShopController shop in shops)
			{
				if (!Object.op_Implicit((Object)(object)shop) || !(bool)shopAvailableField.GetValue(shop))
				{
					continue;
				}
				drawLabel(((Component)shop).transform.position, "Shop", config.ShopColor.Value);
				if (!config.ShowShopItemNames.Value)
				{
					continue;
				}
				int num = 0;
				Enumerator<GameObject> enumerator2 = shop.terminalGameObjectsList.GetEnumerator();
				try
				{
					while (enumerator2.MoveNext())
					{
						GameObject current2 = enumerator2.Current;
						if (!((Object)(object)current2 == (Object)null))
						{
							processedTerminals.Add(current2);
							PurchaseInteraction component = current2.GetComponent<PurchaseInteraction>();
							if (!((Object)(object)component == (Object)null) && component.available)
							{
								ShopTerminalBehavior component2 = current2.GetComponent<ShopTerminalBehavior>();
								int num2 = (config.LabelSize.Value + 2) * (num + 1);
								DrawPickupDef(PickupCatalog.GetPickupDef(component2.CurrentPickup().pickupIndex), ((Component)shop).transform.position, new Vector2(0f, (float)num2));
								num++;
							}
						}
					}
				}
				finally
				{
					((IDisposable)enumerator2).Dispose();
				}
			}
		}

		private void drawDroneShops()
		{
			//IL_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_015d: Unknown result type (might be due to invalid IL or missing references)
			//IL_016d: 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)
			if (droneShops == null || !config.DrawShopsToggle.Value)
			{
				return;
			}
			foreach (DroneVendorMultiShopController droneShop in droneShops)
			{
				if (!Object.op_Implicit((Object)(object)droneShop) || !(bool)droneShopAvailableField.GetValue(droneShop))
				{
					continue;
				}
				drawLabel(((Component)droneShop).transform.position, "Drone Shop", config.ShopColor.Value);
				if (!config.ShowShopItemNames.Value || droneShop.terminalPositions == null)
				{
					continue;
				}
				for (int i = 0; i < droneShop.terminalPositions.Length; i++)
				{
					Transform targetPos = droneShop.terminalPositions[i];
					if (!Object.op_Implicit((Object)(object)targetPos))
					{
						continue;
					}
					DroneVendorTerminalBehavior val = ((IEnumerable<DroneVendorTerminalBehavior>)allDroneTerminals).FirstOrDefault((Func<DroneVendorTerminalBehavior, bool>)((DroneVendorTerminalBehavior t) => (Object)(object)t != (Object)null && Vector3.Distance(((Component)t).transform.position, targetPos.position) < 0.5f));
					if (!((Object)(object)val == (Object)null))
					{
						processedTerminals.Add(((Component)val).gameObject);
						if (!Object.op_Implicit((Object)(object)val.purchaseInteraction) || val.purchaseInteraction.available)
						{
							int num = (config.LabelSize.Value + 2) * (i + 1);
							DrawPickupDef(PickupCatalog.GetPickupDef(val.CurrentPickupIndex), ((Component)droneShop).transform.position, new Vector2(0f, (float)num));
						}
					}
				}
			}
		}

		private void drawInteractables()
		{
			//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_0087: 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_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00de: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0128: 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_03b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b7: Invalid comparison between Unknown and I4
			//IL_03ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_016c: Unknown result type (might be due to invalid IL or missing references)
			//IL_017b: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_04bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_04d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0474: Unknown result type (might be due to invalid IL or missing references)
			//IL_0483: Unknown result type (might be due to invalid IL or missing references)
			//IL_0497: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_03fd: Invalid comparison between Unknown and I4
			//IL_0504: Unknown result type (might be due to invalid IL or missing references)
			//IL_0509: Unknown result type (might be due to invalid IL or missing references)
			//IL_050e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0410: Unknown result type (might be due to invalid IL or missing references)
			//IL_041f: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_051c: Unknown result type (might be due to invalid IL or missing references)
			//IL_051e: Unknown result type (might be due to invalid IL or missing references)
			//IL_05dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_05e3: Invalid comparison between Unknown and I4
			//IL_05fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0609: Unknown result type (might be due to invalid IL or missing references)
			//IL_054f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0554: Unknown result type (might be due to invalid IL or missing references)
			//IL_0533: Unknown result type (might be due to invalid IL or missing references)
			//IL_0540: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0203: Unknown result type (might be due to invalid IL or missing references)
			//IL_0636: Unknown result type (might be due to invalid IL or missing references)
			//IL_063b: Unknown result type (might be due to invalid IL or missing references)
			//IL_064c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0659: Unknown result type (might be due to invalid IL or missing references)
			//IL_0576: Unknown result type (might be due to invalid IL or missing references)
			//IL_057b: Unknown result type (might be due to invalid IL or missing references)
			//IL_05ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_05b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_059f: Unknown result type (might be due to invalid IL or missing references)
			//IL_05a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_068c: Unknown result type (might be due to invalid IL or missing references)
			//IL_069c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0238: Unknown result type (might be due to invalid IL or missing references)
			//IL_0247: Unknown result type (might be due to invalid IL or missing references)
			//IL_06c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_06d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_027c: Unknown result type (might be due to invalid IL or missing references)
			//IL_028b: Unknown result type (might be due to invalid IL or missing references)
			//IL_02cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_02dc: 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_032d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0362: Unknown result type (might be due to invalid IL or missing references)
			//IL_0371: Unknown result type (might be due to invalid IL or missing references)
			if (purchaseInteractions == null)
			{
				return;
			}
			PickupDistributorBehavior val = default(PickupDistributorBehavior);
			ShrineBloodBehavior val2 = default(ShrineBloodBehavior);
			ShrineChanceBehavior val3 = default(ShrineChanceBehavior);
			ShrineCombatBehavior val4 = default(ShrineCombatBehavior);
			ShrineBossBehavior val5 = default(ShrineBossBehavior);
			ShrineHealingBehavior val6 = default(ShrineHealingBehavior);
			ShrineCleanseBehavior val7 = default(ShrineCleanseBehavior);
			ShrineColossusAccessBehavior val8 = default(ShrineColossusAccessBehavior);
			PortalStatueBehavior val9 = default(PortalStatueBehavior);
			OptionChestBehavior optionChest = default(OptionChestBehavior);
			ChestBehavior val10 = default(ChestBehavior);
			ShopTerminalBehavior val11 = default(ShopTerminalBehavior);
			SummonMasterBehavior val12 = default(SummonMasterBehavior);
			foreach (PurchaseInteraction purchaseInteraction in purchaseInteractions)
			{
				if ((Object)(object)purchaseInteraction == (Object)null || !purchaseInteraction.available || processedTerminals.Contains(((Component)purchaseInteraction).gameObject))
				{
					continue;
				}
				if (config.DrawTempChestsToggle.Value && ((Component)purchaseInteraction).TryGetComponent<PickupDistributorBehavior>(ref val))
				{
					PickupIndex pickupIndex = val.GetPickup().pickupIndex;
					if (config.ShowTempChestItemNames.Value && pickupIndex != PickupIndex.none)
					{
						DrawPickupDef(PickupCatalog.GetPickupDef(pickupIndex), ((Component)purchaseInteraction).transform.position);
					}
					else
					{
						drawLabel(((Component)purchaseInteraction).transform.position, "Temp Chest", config.ColorTier_Common.Value);
					}
					continue;
				}
				if (config.DrawShrinesToggle.Value)
				{
					if (config.DrawShrine_Blood.Value && ((Component)purchaseInteraction).TryGetComponent<ShrineBloodBehavior>(ref val2))
					{
						drawLabel(((Component)purchaseInteraction).transform.position, "Shrine of Blood", config.ColorShrine_Blood.Value);
						continue;
					}
					if (config.DrawShrine_Chance.Value && ((Component)purchaseInteraction).TryGetComponent<ShrineChanceBehavior>(ref val3))
					{
						drawLabel(((Component)purchaseInteraction).transform.position, "Shrine of Chance", config.ColorShrine_Chance.Value);
						continue;
					}
					if (config.DrawShrine_Combat.Value && ((Component)purchaseInteraction).TryGetComponent<ShrineCombatBehavior>(ref val4))
					{
						drawLabel(((Component)purchaseInteraction).transform.position, "Shrine of Combat", config.ColorShrine_Combat.Value);
						continue;
					}
					if (config.DrawShrine_Mountain.Value && ((Component)purchaseInteraction).TryGetComponent<ShrineBossBehavior>(ref val5))
					{
						drawLabel(((Component)purchaseInteraction).transform.position, "Shrine of the mountain", config.ColorShrine_Mountain.Value);
						continue;
					}
					if (config.DrawShrine_Healing.Value && ((Component)purchaseInteraction).TryGetComponent<ShrineHealingBehavior>(ref val6))
					{
						drawLabel(((Component)purchaseInteraction).transform.position, "Shrine of Healing", config.ColorShrine_Healing.Value);
						continue;
					}
					if (config.DrawShrine_Cleanse.Value && ((Component)purchaseInteraction).TryGetComponent<ShrineCleanseBehavior>(ref val7))
					{
						drawLabel(((Component)purchaseInteraction).transform.position, "Cleansing Pool", config.ColorShrine_Cleanse.Value);
						continue;
					}
					if (config.DrawShrine_Halcyon.Value && purchaseInteraction.GetDisplayName().ToLower().Contains("halcyon shrine"))
					{
						drawLabel(((Component)purchaseInteraction).transform.position, "Halcyon Shrine", config.ColorShrine_Halcyon.Value);
						continue;
					}
					if (config.DrawShrine_Gold.Value && ((Object)purchaseInteraction).name.ToLower().Contains("shrinegold"))
					{
						drawLabel(((Component)purchaseInteraction).transform.position, "Shrine of Gold", config.ColorShrine_Gold.Value);
						continue;
					}
					if (config.DrawShrine_Revive.Value && ((Component)purchaseInteraction).TryGetComponent<ShrineColossusAccessBehavior>(ref val8))
					{
						drawLabel(((Component)purchaseInteraction).transform.position, "Revive Shrine", config.ColorShrine_Revive.Value);
						continue;
					}
				}
				if (config.DrawPortalsToggle.Value && ((Component)purchaseInteraction).TryGetComponent<PortalStatueBehavior>(ref val9))
				{
					if (config.DrawPortal_Newt.Value && (int)val9.portalType == 0)
					{
						drawLabel(((Component)purchaseInteraction).transform.position, "Newt Altar", config.ColorPortal_Newt.Value);
						continue;
					}
					if (config.DrawPortal_Gold.Value && (int)val9.portalType == 1)
					{
						drawLabel(((Component)purchaseInteraction).transform.position, "Gold Altar", config.ColorPortal_Gold.Value);
						continue;
					}
				}
				if (config.DrawChestsToggle.Value && ((Component)purchaseInteraction).TryGetComponent<OptionChestBehavior>(ref optionChest))
				{
					if (((Object)purchaseInteraction).name.ToLower().Contains("lockbox"))
					{
						drawLabel(((Component)purchaseInteraction).transform.position, "Encrusted Cache", config.ColorTier_Common.Value);
						DrawOptionChestItems(optionChest, ((Component)purchaseInteraction).transform.position);
					}
					else
					{
						drawLabel(((Component)purchaseInteraction).transform.position, "Void Potential", config.ColorTier_Common.Value);
						DrawOptionChestItems(optionChest, ((Component)purchaseInteraction).transform.position);
					}
				}
				else if (config.DrawChestsToggle.Value && ((Component)purchaseInteraction).TryGetComponent<ChestBehavior>(ref val10))
				{
					PickupIndex pickupIndex2 = val10.currentPickup.pickupIndex;
					if (config.ShowChestItemNames.Value && pickupIndex2 != PickupIndex.none)
					{
						DrawPickupDef(PickupCatalog.GetPickupDef(pickupIndex2), ((Component)purchaseInteraction).transform.position);
						continue;
					}
					Color labelColor = Color.white;
					if (((Object)purchaseInteraction).name.ToLower().Contains("lunar"))
					{
						labelColor = config.ColorTier_Lunar.Value;
					}
					else if (((Object)purchaseInteraction).name.ToLower().Contains("void"))
					{
						labelColor = config.ColorTier_VoidCommon.Value;
					}
					drawLabel(((Component)purchaseInteraction).transform.position, purchaseInteraction.GetDisplayName(), labelColor);
				}
				else if (config.DrawPrintersToggle.Value && ((Component)purchaseInteraction).TryGetComponent<ShopTerminalBehavior>(ref val11) && (int)purchaseInteraction.costType != 1)
				{
					drawLabel(((Component)val11).transform.position, "Printer", config.PrinterColor.Value);
					if (config.ShowPrinterItemNames.Value)
					{
						int num = config.LabelSize.Value + 2;
						DrawPickupDef(PickupCatalog.GetPickupDef(val11.CurrentPickup().pickupIndex), ((Component)val11).transform.position, new Vector2(0f, (float)num));
					}
				}
				else if (config.DrawDronesToggle.Value && ((Component)purchaseInteraction).TryGetComponent<SummonMasterBehavior>(ref val12))
				{
					drawLabel(((Component)purchaseInteraction).transform.position, purchaseInteraction.GetDisplayName(), config.DroneColor.Value);
				}
				else if (config.DrawAllPurchaseInteractionsToggle.Value)
				{
					drawLabel(((Component)purchaseInteraction).transform.position, purchaseInteraction.GetDisplayName(), config.AllInteractionColor.Value);
				}
			}
		}

		private void drawDroneScrappers()
		{
			//IL_005d: 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)
			if (droneScrappers == null || !config.DrawScrappersToggle.Value)
			{
				return;
			}
			foreach (DroneScrapperController droneScrapper in droneScrappers)
			{
				if (Object.op_Implicit((Object)(object)droneScrapper) && ((Behaviour)droneScrapper).isActiveAndEnabled)
				{
					drawLabel(((Component)droneScrapper).transform.position, "Drone Scrapper", config.ScrapperColor.Value);
				}
			}
		}

		private void drawScrappers()
		{
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			if (scrappers == null || !config.DrawScrappersToggle.Value)
			{
				return;
			}
			foreach (ScrapperController scrapper in scrappers)
			{
				if ((Object)(object)scrapper != (Object)null)
				{
					drawLabel(((Component)scrapper).transform.position, "Scrapper", config.ScrapperColor.Value);
				}
			}
		}

		private void drawTeleporters()
		{
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			if (teleporters == null || !config.DrawTeleportersToggle.Value)
			{
				return;
			}
			foreach (TeleporterInteraction teleporter in teleporters)
			{
				if ((Object)(object)teleporter != (Object)null)
				{
					drawLabel(((Component)teleporter).transform.position, "Teleporter", config.TeleporterColor.Value);
				}
			}
		}

		private void drawPressurePlates()
		{
			//IL_005d: 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)
			if (pressurePlates == null || !config.DrawPressurePlatesToggle.Value)
			{
				return;
			}
			foreach (PressurePlateController pressurePlate in pressurePlates)
			{
				if (Object.op_Implicit((Object)(object)pressurePlate) && ((Behaviour)pressurePlate).isActiveAndEnabled)
				{
					drawLabel(((Component)pressurePlate).transform.position, "Pressure Plate", config.PressurePlateColor.Value);
				}
			}
		}

		private void drawBarrels()
		{
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_009b: Unknown result type (might be due to invalid IL or missing references)
			if (barrels == null || !config.DrawBarrelsToggle.Value)
			{
				return;
			}
			foreach (BarrelInteraction barrel in barrels)
			{
				if (Object.op_Implicit((Object)(object)barrel) && ((Behaviour)barrel).isActiveAndEnabled && (!(barrelOpenedField != null) || !(bool)barrelOpenedField.GetValue(barrel)))
				{
					drawLabel(((Component)barrel).transform.position, "Barrel", config.BarrelColor.Value);
				}
			}
		}

		private void drawAccessNodes()
		{
			//IL_007b: 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)
			if (accessNodes == null || !config.DrawPortal_Node.Value)
			{
				return;
			}
			foreach (AccessCodesNodeController accessNode in accessNodes)
			{
				if (Object.op_Implicit((Object)(object)accessNode))
				{
					EntityStateMachine component = ((Component)accessNode).GetComponent<EntityStateMachine>();
					if (!(((object)component.state).GetType().Name == "NodeActive"))
					{
						drawLabel(((Component)accessNode).transform.position, "Access Node", config.ColorPortal_Node.Value);
					}
				}
			}
		}

		private void drawVultureEggs()
		{
			//IL_0076: Unknown result type (might be due to invalid IL or missing references)
			//IL_0085: Unknown result type (might be due to invalid IL or missing references)
			if (vultureEggs == null || !config.DrawVultureEggsToggle.Value)
			{
				return;
			}
			foreach (CharacterBody vultureEgg in vultureEggs)
			{
				if (Object.op_Implicit((Object)(object)vultureEgg) && (!Object.op_Implicit((Object)(object)vultureEgg.healthComponent) || vultureEgg.healthComponent.alive))
				{
					drawLabel(((Component)vultureEgg).transform.position, "Vulture Egg", config.VultureEggColor.Value);
				}
			}
		}

		private void drawDroneCombiners()
		{
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			if (droneCombiners == null || !config.DrawDroneCombinersToggle.Value)
			{
				return;
			}
			foreach (DroneCombinerController droneCombiner in droneCombiners)
			{
				if ((Object)(object)droneCombiner != (Object)null)
				{
					drawLabel(((Component)droneCombiner).transform.position, "Drone Combiner", config.DroneCombinerColor.Value);
				}
			}
		}

		private void DrawPickupDef(PickupDef def, Vector3 position, Vector2 screenOffset)
		{
			//IL_001b: 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_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Invalid comparison between Unknown and I4
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: Invalid comparison between Unknown and I4
			//IL_0033: 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_00b7: Invalid comparison between Unknown and I4
			//IL_0074: 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_0054: 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_00c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f4: 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_00f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_009b: 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_0110: 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_0107: 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_00ac: Unknown result type (might be due to invalid IL or missing references)
			if (def == null)
			{
				return;
			}
			string @string = Language.GetString(def.nameToken);
			Color val = def.baseColor;
			if ((int)def.itemIndex != -1)
			{
				ItemDef itemDef = ItemCatalog.GetItemDef(def.itemIndex);
				if (Object.op_Implicit((Object)(object)itemDef))
				{
					val = GetColorForItemTier(itemDef.tier);
				}
			}
			else if ((int)def.equipmentIndex != -1)
			{
				EquipmentDef equipmentDef = EquipmentCatalog.GetEquipmentDef(def.equipmentIndex);
				if (Object.op_Implicit((Object)(object)equipmentDef))
				{
					val = (equipmentDef.isLunar ? config.Color_LunarEquipment.Value : config.Color_Equipment.Value);
				}
			}
			else if ((int)def.droneIndex != -1)
			{
				val = config.DroneColor.Value;
			}
			else if (def.internalName.Contains("Drone"))
			{
				val = config.DroneColor.Value;
			}
			if (val.a == 0f)
			{
				val = Color.white;
			}
			drawLabel(position, @string, val, screenOffset);
		}

		private void DrawOptionChestItems(OptionChestBehavior optionChest, Vector3 position)
		{
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: 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_008c: Unknown result type (might be due to invalid IL or missing references)
			if (config.ShowChestItemNames.Value && !(optionChestPickupsField == null) && optionChestPickupsField.GetValue(optionChest) is List<UniquePickup> list && list.Count != 0)
			{
				for (int i = 0; i < list.Count; i++)
				{
					PickupIndex pickupIndex = list[i].pickupIndex;
					int num = (config.LabelSize.Value + 2) * (i + 1);
					DrawPickupDef(PickupCatalog.GetPickupDef(pickupIndex), position, new Vector2(0f, (float)num));
				}
			}
		}

		private void drawLabel(Vector3 objectPosition, string labelText, Color labelColor, Vector2 screenOffset)
		{
			//IL_0036: 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_003c: 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_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0094: Expected O, but got Unknown
			//IL_0094: 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_00aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: Expected O, but got Unknown
			//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ba: 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_00c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e6: 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_01ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f4: 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_0113: 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_0126: Expected O, but got Unknown
			//IL_0151: Unknown result type (might be due to invalid IL or missing references)
			//IL_017e: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d8: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)Camera.main == (Object)null)
			{
				return;
			}
			string text = (config.AltTextToggle.Value ? config.AltText.Value : labelText);
			Vector3 val = Camera.main.WorldToScreenPoint(objectPosition);
			if (!(val.z < 0f))
			{
				val.y = (float)Screen.height - val.y;
				val.x += screenOffset.x;
				val.y += screenOffset.y;
				GUIContent val2 = new GUIContent(text);
				GUIStyle val3 = new GUIStyle
				{
					fontSize = config.LabelSize.Value,
					alignment = (TextAnchor)4
				};
				Vector2 val4 = val3.CalcSize(val2);
				Rect val5 = default(Rect);
				((Rect)(ref val5))..ctor(val.x - val4.x / 2f, val.y - val4.y / 2f, val4.x, val4.y);
				if (config.DrawTextShadow.Value)
				{
					GUIStyle val6 = new GUIStyle(val3);
					val6.normal.textColor = Color.black;
					GUIStyle val7 = val6;
					float value = config.TextShadowSize.Value;
					GUI.Label(new Rect(((Rect)(ref val5)).x - value, ((Rect)(ref val5)).y, ((Rect)(ref val5)).width, ((Rect)(ref val5)).height), val2, val7);
					GUI.Label(new Rect(((Rect)(ref val5)).x + value, ((Rect)(ref val5)).y, ((Rect)(ref val5)).width, ((Rect)(ref val5)).height), val2, val7);
					GUI.Label(new Rect(((Rect)(ref val5)).x, ((Rect)(ref val5)).y - value, ((Rect)(ref val5)).width, ((Rect)(ref val5)).height), val2, val7);
					GUI.Label(new Rect(((Rect)(ref val5)).x, ((Rect)(ref val5)).y + value, ((Rect)(ref val5)).width, ((Rect)(ref val5)).height), val2, val7);
				}
				val3.normal.textColor = labelColor;
				GUI.Label(val5, val2, val3);
			}
		}

		private Color GetColorForItemTier(ItemTier tier)
		{
			//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_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_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Expected I4, but got Unknown
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_0054: 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_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_0061: 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_00aa: 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_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: 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_008d: 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_009a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
			return (Color)((int)tier switch
			{
				0 => config.ColorTier_Common.Value, 
				1 => config.ColorTier_Uncommon.Value, 
				2 => config.ColorTier_Legendary.Value, 
				4 => config.ColorTier_Boss.Value, 
				3 => config.ColorTier_Lunar.Value, 
				6 => config.ColorTier_VoidCommon.Value, 
				7 => config.ColorTier_VoidUncommon.Value, 
				8 => config.ColorTier_VoidLegendary.Value, 
				9 => config.ColorTier_VoidBoss.Value, 
				_ => Color.grey, 
			});
		}

		private void DrawPickupDef(PickupDef def, Vector3 position)
		{
			//IL_0002: 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)
			DrawPickupDef(def, position, Vector2.zero);
		}

		private void drawLabel(Vector3 objectPosition, string labelText, Color labelColor)
		{
			//IL_0001: 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)
			drawLabel(objectPosition, labelText, labelColor, Vector2.zero);
		}
	}
	[BepInPlugin("Rabusu.ESP", "ESP", "1.2.3")]
	public class Main : BaseUnityPlugin
	{
		public const string PluginGUID = "Rabusu.ESP";

		public const string PluginAuthor = "Rabusu";

		public const string PluginName = "ESP";

		public const string PluginVersion = "1.2.3";

		private ESP esp;

		private Menu menu;

		private bool espEnabled = false;

		private void Awake()
		{
			config.Init(((BaseUnityPlugin)this).Config);
			menu = ((Component)this).gameObject.AddComponent<Menu>();
			esp = ((Component)this).gameObject.AddComponent<ESP>();
			esp.getReflectionFields();
			Stage.onStageStartGlobal += OnStageStart;
		}

		private void Update()
		{
			//IL_0006: 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)
			if (Input.GetKeyDown(config.ToggleEspKey.Value))
			{
				esp.FindObjects();
				espEnabled = !espEnabled;
			}
			if (Input.GetKeyDown(config.ToggleMenuKey.Value))
			{
				menu.showMenu = !menu.showMenu;
				config.configFile.Save();
			}
		}

		private void OnGUI()
		{
			menu.OnGUI();
			if (espEnabled)
			{
				esp.drawESP();
			}
		}

		public void OnStageStart(Stage stage)
		{
			esp.Find();
		}

		private void OnDestroy()
		{
			Stage.onStageStartGlobal -= OnStageStart;
		}
	}
	public class Menu : MonoBehaviour
	{
		public bool showMenu;

		private Rect _mainRect = new Rect(40f, 40f, 360f, 720f);

		private Rect _colorPickerRect = new Rect(410f, 40f, 250f, 180f);

		private ConfigEntry<Color> _colorToEdit;

		private string _colorPickerTitle;

		private Vector2 _scrollPosition;

		public void OnGUI()
		{
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Expected O, but got Unknown
			//IL_0031: 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_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			//IL_0063: 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)
			if (!showMenu)
			{
				_colorToEdit = null;
				return;
			}
			_mainRect = GUI.Window(0, _mainRect, new WindowFunction(MenuWindow), "ESP Settings");
			if (_colorToEdit != null)
			{
				_colorPickerRect = GUI.Window(1, _colorPickerRect, new WindowFunction(ColorPickerWindow), _colorPickerTitle);
			}
		}

		private void MenuWindow(int windowID)
		{
			//IL_0015: 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_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			GUI.DragWindow(new Rect(0f, 0f, 10000f, 20f));
			_scrollPosition = GUILayout.BeginScrollView(_scrollPosition, Array.Empty<GUILayoutOption>());
			GUILayout.BeginVertical(GUIStyle.op_Implicit("box"), Array.Empty<GUILayoutOption>());
			GUILayout.Label("General Settings", Array.Empty<GUILayoutOption>());
			GUILayout.Label($"Label Size: {config.LabelSize.Value}", Array.Empty<GUILayoutOption>());
			config.LabelSize.Value = (int)GUILayout.HorizontalSlider((float)config.LabelSize.Value, 8f, 80f, Array.Empty<GUILayoutOption>());
			config.AltTextToggle.Value = GUILayout.Toggle(config.AltTextToggle.Value, " Alternative Look", Array.Empty<GUILayoutOption>());
			if (config.AltTextToggle.Value)
			{
				GUILayout.Label("Alt Text:", Array.Empty<GUILayoutOption>());
				config.AltText.Value = GUILayout.TextField(config.AltText.Value, 1, Array.Empty<GUILayoutOption>());
			}
			config.DrawTextShadow.Value = GUILayout.Toggle(config.DrawTextShadow.Value, " Text Shadow", Array.Empty<GUILayoutOption>());
			GUILayout.EndVertical();
			GUILayout.BeginVertical(GUIStyle.op_Implicit("box"), Array.Empty<GUILayoutOption>());
			GUILayout.Label("Main Toggles", Array.Empty<GUILayoutOption>());
			config.DrawChestsToggle.Value = GUILayout.Toggle(config.DrawChestsToggle.Value, " Chests", Array.Empty<GUILayoutOption>());
			if (config.DrawChestsToggle.Value)
			{
				IndentedToggle(config.ShowChestItemNames, "Show Item Names");
			}
			config.DrawTempChestsToggle.Value = GUILayout.Toggle(config.DrawTempChestsToggle.Value, " Temp Chests", Array.Empty<GUILayoutOption>());
			if (config.DrawTempChestsToggle.Value)
			{
				IndentedToggle(config.ShowTempChestItemNames, "Show Item Names");
			}
			DrawColorOption("Shops", config.DrawShopsToggle, config.ShopColor);
			if (config.DrawShopsToggle.Value)
			{
				IndentedToggle(config.ShowShopItemNames, "Show Item Names");
			}
			GUILayout.BeginVertical(Array.Empty<GUILayoutOption>());
			DrawColorOption("Printers", config.DrawPrintersToggle, config.PrinterColor);
			if (config.DrawPrintersToggle.Value)
			{
				IndentedToggle(config.ShowPrinterItemNames, "Show Item Names");
			}
			GUILayout.EndVertical();
			DrawColorOption("Scrappers", config.DrawScrappersToggle, config.ScrapperColor);
			DrawColorOption("Teleporters", config.DrawTeleportersToggle, config.TeleporterColor);
			DrawColorOption("Drones & Turrets", config.DrawDronesToggle, config.DroneColor);
			DrawColorOption("Drone Combiners", config.DrawDroneCombinersToggle, config.DroneCombinerColor);
			config.DrawShrinesToggle.Value = GUILayout.Toggle(config.DrawShrinesToggle.Value, " Shrines", Array.Empty<GUILayoutOption>());
			config.DrawPortalsToggle.Value = GUILayout.Toggle(config.DrawPortalsToggle.Value, " Altars", Array.Empty<GUILayoutOption>());
			DrawColorOption("Pressure Plates", config.DrawPressurePlatesToggle, config.PressurePlateColor);
			DrawColorOption("Vulture Eggs", config.DrawVultureEggsToggle, config.VultureEggColor);
			DrawColorOption("Barrels", config.DrawBarrelsToggle, config.BarrelColor);
			DrawColorOption("All Other Interactions", config.DrawAllPurchaseInteractionsToggle, config.AllInteractionColor);
			GUILayout.EndVertical();
			if (config.ShowChestItemNames.Value || config.ShowPrinterItemNames.Value || config.ShowShopItemNames.Value)
			{
				GUILayout.BeginVertical(GUIStyle.op_Implicit("box"), Array.Empty<GUILayoutOption>());
				GUILayout.Label("Item & Equipment Colors", Array.Empty<GUILayoutOption>());
				DrawColorOption("Common", config.ColorTier_Common);
				DrawColorOption("Uncommon", config.ColorTier_Uncommon);
				DrawColorOption("Legendary", config.ColorTier_Legendary);
				DrawColorOption("Boss", config.ColorTier_Boss);
				DrawColorOption("Lunar", config.ColorTier_Lunar);
				DrawColorOption("Void Common", config.ColorTier_VoidCommon);
				DrawColorOption("Void Uncommon", config.ColorTier_VoidUncommon);
				DrawColorOption("Void Legendary", config.ColorTier_VoidLegendary);
				DrawColorOption("Void Boss", config.ColorTier_VoidBoss);
				DrawColorOption("Equipment", config.Color_Equipment);
				DrawColorOption("Lunar Equipment", config.Color_LunarEquipment);
				GUILayout.EndVertical();
			}
			if (config.DrawShrinesToggle.Value)
			{
				GUILayout.BeginVertical(GUIStyle.op_Implicit("box"), Array.Empty<GUILayoutOption>());
				GUILayout.Label("Shrine Settings", Array.Empty<GUILayoutOption>());
				DrawSubColorOption("Shrine of Blood", config.DrawShrine_Blood, config.ColorShrine_Blood);
				DrawSubColorOption("Shrine of Chance", config.DrawShrine_Chance, config.ColorShrine_Chance);
				DrawSubColorOption("Shrine of Combat", config.DrawShrine_Combat, config.ColorShrine_Combat);
				DrawSubColorOption("Shrine of Gold", config.DrawShrine_Gold, config.ColorShrine_Gold);
				DrawSubColorOption("Shrine of the Mountain", config.DrawShrine_Mountain, config.ColorShrine_Mountain);
				DrawSubColorOption("Shrine of Healing", config.DrawShrine_Healing, config.ColorShrine_Healing);
				DrawSubColorOption("Cleansing Pool", config.DrawShrine_Cleanse, config.ColorShrine_Cleanse);
				DrawSubColorOption("Halcyon Shrine", config.DrawShrine_Halcyon, config.ColorShrine_Halcyon);
				DrawSubColorOption("Revive Shrine", config.DrawShrine_Revive, config.ColorShrine_Revive);
				GUILayout.EndVertical();
			}
			if (config.DrawPortalsToggle.Value)
			{
				GUILayout.BeginVertical(GUIStyle.op_Implicit("box"), Array.Empty<GUILayoutOption>());
				GUILayout.Label("Altar Settings", Array.Empty<GUILayoutOption>());
				DrawSubColorOption("Newt Altar", config.DrawPortal_Newt, config.ColorPortal_Newt);
				DrawSubColorOption("Gold Altar", config.DrawPortal_Gold, config.ColorPortal_Gold);
				DrawSubColorOption("Access Node", config.DrawPortal_Node, config.ColorPortal_Node);
				GUILayout.EndVertical();
			}
			GUILayout.EndScrollView();
		}

		private void IndentedToggle(ConfigEntry<bool> config, string text)
		{
			GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
			GUILayout.Space(20f);
			config.Value = GUILayout.Toggle(config.Value, text, Array.Empty<GUILayoutOption>());
			GUILayout.EndHorizontal();
		}

		private void ColorPickerWindow(int windowID)
		{
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: 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_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Unknown result type (might be due to invalid IL or missing references)
			//IL_009a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b7: 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_00e6: 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_0122: Unknown result type (might be due to invalid IL or missing references)
			//IL_0133: Unknown result type (might be due to invalid IL or missing references)
			GUI.DragWindow(new Rect(0f, 0f, 10000f, 20f));
			if (_colorToEdit != null)
			{
				Color value = _colorToEdit.Value;
				GUI.color = Color.red;
				GUILayout.Label($"R: {value.r:F2}", Array.Empty<GUILayoutOption>());
				value.r = GUILayout.HorizontalSlider(value.r, 0f, 1f, Array.Empty<GUILayoutOption>());
				GUI.color = Color.green;
				GUILayout.Label($"G: {value.g:F2}", Array.Empty<GUILayoutOption>());
				value.g = GUILayout.HorizontalSlider(value.g, 0f, 1f, Array.Empty<GUILayoutOption>());
				GUI.color = Color.blue;
				GUILayout.Label($"B: {value.b:F2}", Array.Empty<GUILayoutOption>());
				value.b = GUILayout.HorizontalSlider(value.b, 0f, 1f, Array.Empty<GUILayoutOption>());
				GUI.color = Color.white;
				_colorToEdit.Value = value;
				if (GUILayout.Button("Close", Array.Empty<GUILayoutOption>()))
				{
					_colorToEdit = null;
				}
			}
		}

		private void DrawColorOption(string title, ConfigEntry<bool> toggle, ConfigEntry<Color> color)
		{
			GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
			toggle.Value = GUILayout.Toggle(toggle.Value, " " + title, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) });
			if (toggle.Value)
			{
				ColorButton(color, title);
			}
			GUILayout.EndHorizontal();
		}

		private void DrawColorOption(string title, ConfigEntry<Color> color)
		{
			GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
			GUILayout.Label(" " + title, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) });
			ColorButton(color, title);
			GUILayout.EndHorizontal();
		}

		private void DrawSubColorOption(string title, ConfigEntry<bool> toggle, ConfigEntry<Color> color)
		{
			GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
			GUILayout.Space(20f);
			toggle.Value = GUILayout.Toggle(toggle.Value, " " + title, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) });
			if (toggle.Value)
			{
				ColorButton(color, title);
			}
			GUILayout.EndHorizontal();
		}

		private void ColorButton(ConfigEntry<Color> color, string title)
		{
			//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_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0075: Unknown result type (might be due to invalid IL or missing references)
			Color backgroundColor = GUI.backgroundColor;
			GUI.backgroundColor = color.Value;
			if (GUILayout.Button("", (GUILayoutOption[])(object)new GUILayoutOption[2]
			{
				GUILayout.Width(40f),
				GUILayout.Height(18f)
			}))
			{
				if (_colorToEdit == color)
				{
					_colorToEdit = null;
				}
				else
				{
					_colorToEdit = color;
					_colorPickerTitle = title + " Color";
				}
			}
			GUI.backgroundColor = backgroundColor;
		}
	}
}