Decompiled source of ManualExtract v1.2.0

ManualExtract.dll

Decompiled 4 hours ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.Linq;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using System.Text;
using System.Text.RegularExpressions;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using ExitGames.Client.Photon;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using Photon.Pun;
using Photon.Realtime;
using TMPro;
using UnityEngine;
using UnityEngine.UI;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: IgnoresAccessChecksTo("Assembly-CSharp")]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
	[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
	internal sealed class IgnoresAccessChecksToAttribute : Attribute
	{
		public IgnoresAccessChecksToAttribute(string assemblyName)
		{
		}
	}
}
namespace ManualExtract
{
	[Flags]
	public enum HostFlags
	{
		None = 0,
		FreeShop = 1,
		FullShop = 2,
		NoBreak = 4,
		NoEnemies = 8,
		AllowClients = 0x10,
		ButtonGate = 0x20,
		TeamHeal = 0x40,
		AutoRevive = 0x80,
		OneHitEnemies = 0x100
	}
	public enum HostAction
	{
		SetCash = 1,
		AddCash,
		MoneyBag,
		SpawnItem,
		SpawnValuable,
		SpawnEnemy,
		AllItems,
		DespawnEnemies,
		DestroyEnemies,
		FreezeEnemies,
		RevivePlayer,
		ReviveAll,
		HealPlayer,
		KillPlayer,
		BringPlayer,
		Upgrade,
		NoAggro,
		SetFlag,
		ForceExtract,
		GoalZero,
		ActivateNearest,
		NextLevel,
		ToShop,
		RestartLevel,
		SetLevel,
		SpawnCrate,
		SetMap,
		KnockOver,
		Launch,
		Hurt,
		BringLoot,
		SetGoal,
		RemoveObject,
		ClearSpawned
	}
	public static class Admin
	{
		private const int MaxCash = 2147482;

		private const int MaxSpawnValue = 100000000;

		private static HostFlags localFlags = HostFlags.None;

		private static readonly HashSet<EnemyParent> RemovedEnemies = new HashSet<EnemyParent>();

		private static readonly Dictionary<string, Item> ItemByName = new Dictionary<string, Item>();

		public const string CrateTag = "MXv1crate";

		public static readonly Rarity[] CrateRarities;

		private static readonly Dictionary<PlayerAvatar, float> DeadSince;

		private static float lootSummaryAt;

		private static string lootSummary;

		public const string ArenaKey = "arena";

		public const string LobbyKey = "lobby";

		private static List<(string name, string label)> mapNames;

		private static readonly List<GameObject> Spawned;

		public static float NoBreakUntil;

		public static bool ClientsAllowed => (localFlags & HostFlags.AllowClients) != 0;

		public static HostFlags ActiveFlags
		{
			get
			{
				if (!IsHost)
				{
					return Net.RemoteFlags;
				}
				return CurrentHostFlags();
			}
		}

		public static bool IsHost
		{
			get
			{
				if ((Object)(object)GameManager.instance != (Object)null)
				{
					return SemiFunc.IsMasterClientOrSingleplayer();
				}
				return false;
			}
		}

		public static bool CanUseHostActions
		{
			get
			{
				if (!IsHost)
				{
					if (Net.HostHasMod)
					{
						return (Net.RemoteFlags & HostFlags.AllowClients) != 0;
					}
					return false;
				}
				return true;
			}
		}

		public static bool InGame
		{
			get
			{
				//IL_002c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0032: Invalid comparison between Unknown and I4
				if ((Object)(object)GameManager.instance != (Object)null && (Object)(object)RunManager.instance != (Object)null && (Object)(object)GameDirector.instance != (Object)null && (int)GameDirector.instance.currentState == 2 && Object.op_Implicit((Object)(object)LevelGenerator.Instance) && LevelGenerator.Instance.Generated && Object.op_Implicit((Object)(object)PlayerAvatar.instance) && Object.op_Implicit((Object)(object)PlayerController.instance))
				{
					return !SemiFunc.MenuLevel();
				}
				return false;
			}
		}

		public static bool CanSpawnCrates
		{
			get
			{
				if (SemiFunc.RunIsLevel() && Object.op_Implicit((Object)(object)ValuableDirector.instance))
				{
					return Object.op_Implicit((Object)(object)RoundDirector.instance);
				}
				return false;
			}
		}

		public static int SpawnedCount => Spawned.Count((GameObject x) => Object.op_Implicit((Object)(object)x));

		public static bool NoBreakNow
		{
			get
			{
				if (!HostHas(HostFlags.NoBreak))
				{
					return Time.time < NoBreakUntil;
				}
				return true;
			}
		}

		public static void ResetForNewGame()
		{
			localFlags = HostFlags.None;
			RemovedEnemies.Clear();
			DeadSince.Clear();
		}

		public static HostFlags CurrentHostFlags()
		{
			HostFlags hostFlags = localFlags;
			if (ExtractionGate.EnabledLocally)
			{
				hostFlags |= HostFlags.ButtonGate;
			}
			return hostFlags;
		}

		public static bool HasFlag(HostFlags flag)
		{
			return (ActiveFlags & flag) != 0;
		}

		public static bool HostHas(HostFlags flag)
		{
			return (localFlags & flag) != 0;
		}

		public static void Request(HostAction action, params object[] args)
		{
			if (IsHost && !Net.ForceRemote)
			{
				Execute(action, PlayerAvatar.instance, args);
			}
			else
			{
				Net.SendAction(action, args);
			}
		}

		public static void Execute(HostAction action, PlayerAvatar sender, object[] args)
		{
			if (!IsHost)
			{
				return;
			}
			try
			{
				Run(action, sender, args);
			}
			catch (Exception arg)
			{
				Plugin.Log.LogError((object)$"{action} failed: {arg}");
			}
		}

		private static void Run(HostAction action, PlayerAvatar sender, object[] a)
		{
			//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0109: 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_0231: Unknown result type (might be due to invalid IL or missing references)
			//IL_0317: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a5: 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_0394: Unknown result type (might be due to invalid IL or missing references)
			switch (action)
			{
			case HostAction.SetCash:
				SetCash((int)a[0]);
				break;
			case HostAction.AddCash:
				SetCash((int)Math.Min((long)SemiFunc.StatGetRunCurrency() + (long)(int)a[0], 2147482L));
				break;
			case HostAction.MoneyBag:
				SpawnMoneyBag((int)a[0], (Vector3)a[1]);
				break;
			case HostAction.SpawnItem:
				SpawnItem((string)a[0], (Vector3)a[1], (a.Length > 2) ? ((int)a[2]) : 0);
				break;
			case HostAction.SpawnValuable:
				SpawnValuable((string)a[0], (Vector3)a[1], (a.Length > 2) ? ((int)a[2]) : 0);
				break;
			case HostAction.SpawnEnemy:
				SpawnEnemy((string)a[0], (Vector3)a[1]);
				break;
			case HostAction.AllItems:
				if (Object.op_Implicit((Object)(object)DebugCommandHandler.instance))
				{
					DebugCommandHandler.instance.ItemFloorSpawn(Object.op_Implicit((Object)(object)sender) ? sender : PlayerAvatar.instance);
				}
				break;
			case HostAction.DespawnEnemies:
				DespawnEnemies();
				break;
			case HostAction.DestroyEnemies:
				DestroyEnemies();
				break;
			case HostAction.FreezeEnemies:
				FreezeEnemies((float)a[0]);
				break;
			case HostAction.RevivePlayer:
				Revive(FindPlayer((string)a[0]));
				break;
			case HostAction.ReviveAll:
			{
				foreach (PlayerAvatar item in SemiFunc.PlayerGetList())
				{
					Revive(item);
				}
				break;
			}
			case HostAction.HealPlayer:
				Heal(FindPlayer((string)a[0]), (int)a[1]);
				break;
			case HostAction.KillPlayer:
			{
				PlayerAvatar val3 = FindPlayer((string)a[0]);
				if (Object.op_Implicit((Object)(object)val3) && !val3.deadSet)
				{
					val3.playerHealth.HurtOther(100000, Vector3.zero, false, -1, false);
				}
				break;
			}
			case HostAction.BringPlayer:
				BringPlayer(FindPlayer((string)a[0]), (Vector3)a[1]);
				break;
			case HostAction.Upgrade:
				Upgrade((string)a[0], (string)a[1], (int)a[2]);
				break;
			case HostAction.NoAggro:
				NoAggro((string)a[0], (bool)a[1]);
				break;
			case HostAction.SetFlag:
				SetFlag((HostFlags)(int)a[0], (bool)a[1]);
				break;
			case HostAction.ForceExtract:
				ForceExtract();
				break;
			case HostAction.GoalZero:
			{
				ExtractionPoint extractionPointCurrent = RoundDirector.instance.extractionPointCurrent;
				if (Object.op_Implicit((Object)(object)extractionPointCurrent) && extractionPointCurrent.StateIs((State)2))
				{
					extractionPointCurrent.HaulGoalSet(0);
				}
				break;
			}
			case HostAction.ActivateNearest:
				ActivateNearest(sender);
				break;
			case HostAction.NextLevel:
				RunManager.instance.ChangeLevel(true, false, (ChangeLevelType)0);
				break;
			case HostAction.ToShop:
				RunManager.instance.ChangeLevel(false, false, (ChangeLevelType)5);
				break;
			case HostAction.RestartLevel:
				RunManager.instance.RestartScene();
				if (!SemiFunc.RunIsTutorial())
				{
					SemiFunc.OnSceneSwitch(RunManager.instance.gameOver, false);
				}
				break;
			case HostAction.SetLevel:
				SetLevel((int)a[0]);
				break;
			case HostAction.SpawnCrate:
				SpawnCrate((int)a[0], (Vector3)a[1]);
				break;
			case HostAction.SetMap:
				SetMap((string)a[0]);
				break;
			case HostAction.KnockOver:
				KnockOver(FindPlayer((string)a[0]), 0f);
				break;
			case HostAction.Launch:
				KnockOver(FindPlayer((string)a[0]), 12f);
				break;
			case HostAction.Hurt:
			{
				PlayerAvatar val2 = FindPlayer((string)a[0]);
				if (Object.op_Implicit((Object)(object)val2) && !val2.deadSet)
				{
					val2.playerHealth.HurtOther(Mathf.Clamp((int)a[1], 1, 100), Vector3.zero, false, -1, false);
				}
				break;
			}
			case HostAction.BringLoot:
				BringLoot((Vector3)a[0], (bool)a[1]);
				break;
			case HostAction.SetGoal:
			{
				ExtractionPoint val = ActiveExtractionPoint();
				if (Object.op_Implicit((Object)(object)val))
				{
					val.HaulGoalSet(Mathf.Clamp((int)a[0], 0, 100000000));
				}
				break;
			}
			case HostAction.RemoveObject:
				RemoveObject((int)a[0]);
				break;
			case HostAction.ClearSpawned:
				ClearSpawned();
				break;
			}
		}

		private static void SetCash(int thousands)
		{
			int num = Mathf.Clamp(thousands, 0, 2147482);
			SemiFunc.StatSetRunCurrency(num);
			if (Object.op_Implicit((Object)(object)ShopManager.instance) && SemiFunc.RunIsShop())
			{
				ShopManager.instance.totalCurrency = num;
			}
			if (Object.op_Implicit((Object)(object)CurrencyUI.instance))
			{
				CurrencyUI.instance.FetchCurrency();
			}
			ExtractionPoint val = (Object.op_Implicit((Object)(object)RoundDirector.instance) ? RoundDirector.instance.extractionPointCurrent : null);
			if (Object.op_Implicit((Object)(object)val))
			{
				val.UpdateHaulTextShop();
			}
		}

		private static void SpawnMoneyBag(int dollars, Vector3 position)
		{
			//IL_0052: 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_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)
			AssetManager instance = AssetManager.instance;
			GameObject val = instance.surplusValuableSmall;
			if (dollars > 10000)
			{
				val = instance.surplusValuableBig;
			}
			else if (dollars > 5000)
			{
				val = instance.surplusValuableMedium;
			}
			GameObject val2 = (SemiFunc.IsMultiplayer() ? PhotonNetwork.InstantiateRoomObject("Valuables/" + ((Object)val).name, position, Quaternion.identity, (byte)0, (object[])null) : Object.Instantiate<GameObject>(val, position, Quaternion.identity));
			val2.GetComponent<ValuableObject>().dollarValueOverride = Mathf.Clamp(dollars, 1, 100000000);
			Spawned.Add(val2);
		}

		public static List<Item> AllItems()
		{
			if (!Object.op_Implicit((Object)(object)StatsManager.instance))
			{
				return new List<Item>();
			}
			return (from x in StatsManager.instance.itemDictionary.Values
				where Object.op_Implicit((Object)(object)x) && !x.disabled
				orderby ((Object)x).name
				select x).ToList();
		}

		public static string ItemLabel(string assetName)
		{
			return Regex.Replace(assetName, "^Item ", "");
		}

		public static Item FindItemByName(string name)
		{
			if (ItemByName.TryGetValue(name, out var value) && Object.op_Implicit((Object)(object)value))
			{
				return value;
			}
			List<Item> source = AllItems();
			Item val = ((IEnumerable<Item>)source).FirstOrDefault((Func<Item, bool>)((Item x) => string.Equals(x.itemName, name, StringComparison.OrdinalIgnoreCase))) ?? ((IEnumerable<Item>)source).FirstOrDefault((Func<Item, bool>)((Item x) => x.itemName != null && x.itemName.StartsWith(name, StringComparison.OrdinalIgnoreCase)));
			if (Object.op_Implicit((Object)(object)val))
			{
				ItemByName[name] = val;
			}
			return val;
		}

		public static void SpawnItemByName(string name, Vector3 position)
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			Item val = FindItemByName(name);
			if (Object.op_Implicit((Object)(object)val))
			{
				Request(HostAction.SpawnItem, ((Object)val).name, position, 0);
			}
		}

		private static void SpawnItem(string assetName, Vector3 position, int shopPrice)
		{
			//IL_0061: 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_0049: 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)
			Item val = ((IEnumerable<Item>)StatsManager.instance.itemDictionary.Values).FirstOrDefault((Func<Item, bool>)((Item x) => Object.op_Implicit((Object)(object)x) && ((Object)x).name == assetName));
			if (Object.op_Implicit((Object)(object)val))
			{
				GameObject val2 = (SemiFunc.IsMultiplayer() ? PhotonNetwork.InstantiateRoomObject(((PrefabRef<GameObject>)(object)val.prefab).ResourcePath, position, Quaternion.identity, (byte)0, (object[])null) : Object.Instantiate<GameObject>(((PrefabRef<GameObject>)(object)val.prefab).Prefab, position, Quaternion.identity));
				if (Object.op_Implicit((Object)(object)val2) && shopPrice > 0)
				{
					ShopPatches.SetCustomPrice(val2.GetComponent<ItemAttributes>(), shopPrice);
				}
				if (Object.op_Implicit((Object)(object)val2))
				{
					Spawned.Add(val2);
				}
			}
		}

		public static List<PrefabRef> AllValuables()
		{
			if (!Object.op_Implicit((Object)(object)RunManager.instance))
			{
				return new List<PrefabRef>();
			}
			return (from x in (from p in RunManager.instance.levels.Where((Level l) => Object.op_Implicit((Object)(object)l) && l.ValuablePresets != null).SelectMany((Level l) => l.ValuablePresets)
					where Object.op_Implicit((Object)(object)p)
					select p).SelectMany((LevelValuables p) => p.tiny.Concat(p.small).Concat(p.medium).Concat(p.big)
					.Concat(p.wide)
					.Concat(p.tall)
					.Concat(p.veryTall))
				where ((PrefabRef<GameObject>)(object)x)?.IsValid() ?? false
				group x by ((PrefabRef<GameObject>)(object)x).PrefabName into g
				select g.First() into x
				orderby ((PrefabRef<GameObject>)(object)x).PrefabName
				select x).ToList();
		}

		public static string ValuableLabel(string prefabName)
		{
			return Regex.Replace(prefabName, "^Valuable ", "");
		}

		private static void SpawnValuable(string prefabName, Vector3 position, int dollars)
		{
			//IL_0048: 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_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)
			PrefabRef val = ((IEnumerable<PrefabRef>)AllValuables()).FirstOrDefault((Func<PrefabRef, bool>)((PrefabRef x) => ((PrefabRef<GameObject>)(object)x).PrefabName == prefabName));
			if (val != null)
			{
				GameObject val2 = (SemiFunc.IsMultiplayer() ? PhotonNetwork.InstantiateRoomObject(((PrefabRef<GameObject>)(object)val).ResourcePath, position, Quaternion.identity, (byte)0, (object[])null) : Object.Instantiate<GameObject>(((PrefabRef<GameObject>)(object)val).Prefab, position, Quaternion.identity));
				ValuableObject component = val2.GetComponent<ValuableObject>();
				if (dollars > 0)
				{
					component.dollarValueOverride = Mathf.Min(dollars, 100000000);
				}
				component.DollarValueSetLogic();
				Spawned.Add(val2);
			}
		}

		public unsafe static string RarityName(Rarity rarity)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Expected I4, but got Unknown
			return (int)rarity switch
			{
				0 => "Common", 
				1 => "Uncommon", 
				2 => "Rare", 
				3 => "Ultra rare", 
				_ => ((object)(*(Rarity*)(&rarity))/*cast due to .constrained prefix*/).ToString(), 
			};
		}

		public static string CrateLabel(Rarity rarity)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			return RarityName(rarity) + " crate";
		}

		public static void GiveToken(Rarity rarity)
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			if (Object.op_Implicit((Object)(object)MetaManager.instance))
			{
				MetaManager.instance.CosmeticTokenAdd(rarity);
			}
		}

		public static void UnlockAllCosmetics()
		{
			if (Object.op_Implicit((Object)(object)MetaManager.instance))
			{
				MetaManager.instance.CosmeticUnlockAll();
				MetaManager.instance.Save();
			}
		}

		public static void RevealMap()
		{
			RoomVolume[] array = Object.FindObjectsByType<RoomVolume>((FindObjectsSortMode)0);
			foreach (RoomVolume val in array)
			{
				if (Object.op_Implicit((Object)(object)val))
				{
					val.SetExplored();
				}
			}
			if (!Object.op_Implicit((Object)(object)Map.Instance))
			{
				return;
			}
			ValuableObject[] array2 = Object.FindObjectsByType<ValuableObject>((FindObjectsSortMode)0);
			foreach (ValuableObject val2 in array2)
			{
				if (Object.op_Implicit((Object)(object)val2) && !val2.discovered)
				{
					val2.discovered = true;
					Map.Instance.AddValuable(val2);
				}
			}
		}

		public static void HealAll()
		{
			foreach (PlayerAvatar item in SemiFunc.PlayerGetList())
			{
				if (Object.op_Implicit((Object)(object)item) && !item.deadSet)
				{
					Request(HostAction.HealPlayer, item.steamID, 100000);
				}
			}
		}

		public static void BringAll()
		{
			//IL_0041: 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_004e: 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_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
			PlayerAvatar instance = PlayerAvatar.instance;
			int num = 0;
			foreach (PlayerAvatar item in SemiFunc.PlayerGetList())
			{
				if (Object.op_Implicit((Object)(object)item) && !((Object)(object)item == (Object)(object)instance) && !item.deadSet)
				{
					Vector3 val = Cheats.FrontOfCamera(1.5f) + (Object.op_Implicit((Object)(object)instance) ? ((Component)instance).transform.right : Vector3.right) * (((num % 2 == 0) ? 1f : (-1f)) * (0.8f + (float)(num / 2) * 0.8f));
					Request(HostAction.BringPlayer, item.steamID, val);
					num++;
				}
			}
		}

		public static void SendAllToTruck()
		{
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: 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_0089: 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_00a3: Unknown result type (might be due to invalid IL or missing references)
			if (!Object.op_Implicit((Object)(object)TruckSafetySpawnPoint.instance))
			{
				return;
			}
			Transform transform = ((Component)TruckSafetySpawnPoint.instance).transform;
			int num = 0;
			foreach (PlayerAvatar item in SemiFunc.PlayerGetList())
			{
				if (Object.op_Implicit((Object)(object)item) && !item.deadSet)
				{
					Vector3 val = transform.position + Vector3.up * 0.5f + transform.right * (((num % 2 == 0) ? 1f : (-1f)) * (float)(num + 1) / 2f * 0.8f);
					Request(HostAction.BringPlayer, item.steamID, val);
					num++;
				}
			}
		}

		public static void HostTick()
		{
			bool flag = HostHas(HostFlags.TeamHeal);
			bool flag2 = HostHas(HostFlags.AutoRevive);
			if (!flag2)
			{
				DeadSince.Clear();
			}
			if (!flag && !flag2)
			{
				return;
			}
			foreach (PlayerAvatar item in SemiFunc.PlayerGetList())
			{
				if (!Object.op_Implicit((Object)(object)item))
				{
					continue;
				}
				if (item.deadSet)
				{
					if (flag2)
					{
						if (!DeadSince.TryGetValue(item, out var value))
						{
							DeadSince[item] = Time.time;
						}
						else if (Time.time - value >= 5f)
						{
							DeadSince.Remove(item);
							Revive(item);
						}
					}
				}
				else
				{
					DeadSince.Remove(item);
					if (flag && Object.op_Implicit((Object)(object)item.playerHealth) && item.playerHealth.health < item.playerHealth.maxHealth)
					{
						Heal(item, 100000);
					}
				}
			}
		}

		public static string LootSummary()
		{
			if (Time.unscaledTime - lootSummaryAt < 1f)
			{
				return lootSummary;
			}
			lootSummaryAt = Time.unscaledTime;
			if (!InGame || !SemiFunc.RunIsLevel())
			{
				lootSummary = "Loot left: only in a level.";
				return lootSummary;
			}
			long num = 0L;
			int num2 = 0;
			ValuableObject[] array = Object.FindObjectsByType<ValuableObject>((FindObjectsSortMode)0);
			foreach (ValuableObject val in array)
			{
				if (Object.op_Implicit((Object)(object)val) && (!Object.op_Implicit((Object)(object)val.roomVolumeCheck) || !val.roomVolumeCheck.inExtractionPoint))
				{
					num += (long)val.dollarValueCurrent;
					num2++;
				}
			}
			lootSummary = ((num2 == 0) ? "No loot left outside the extraction points." : string.Format("Loot left outside the extraction points: ${0} in {1} valuable{2}.", num.ToString("N0", CultureInfo.InvariantCulture), num2, (num2 == 1) ? "" : "s"));
			return lootSummary;
		}

		public static void SetMaxPlayers(int count)
		{
			if (Object.op_Implicit((Object)(object)GameManager.instance) && IsHost)
			{
				GameManager.instance.SetMaxPlayers(Mathf.Clamp(count, 2, GameManager.instance.maxPlayersPhoton));
			}
		}

		public static List<(string name, string label)> MapNames()
		{
			if (mapNames != null && mapNames.Count > 0)
			{
				return mapNames;
			}
			if (!Object.op_Implicit((Object)(object)RunManager.instance))
			{
				return new List<(string, string)>();
			}
			mapNames = (from l in RunManager.instance.levels
				where Object.op_Implicit((Object)(object)l)
				select (name: ((Object)l).name, Regex.Replace(((Object)l).name, "^Level - ", "")) into x
				orderby x.Item2
				select x).ToList();
			return mapNames;
		}

		private static void SetMap(string levelName)
		{
			RunManager instance = RunManager.instance;
			Level val = (Level)((levelName == "arena") ? ((instance.levelArena != null && instance.levelArena.Count > 0) ? instance.levelArena[Random.Range(0, instance.levelArena.Count)] : null) : ((!(levelName == "lobby")) ? ((object)((IEnumerable<Level>)instance.levels).FirstOrDefault((Func<Level, bool>)((Level l) => Object.op_Implicit((Object)(object)l) && ((Object)l).name == levelName))) : ((object)instance.levelLobby)));
			if (!Object.op_Implicit((Object)(object)val))
			{
				return;
			}
			RunManager.instance.debugLevel = val;
			try
			{
				RunManager.instance.ChangeLevel(false, false, (ChangeLevelType)0);
			}
			finally
			{
				RunManager.instance.debugLevel = null;
			}
		}

		private static void SpawnCrate(int rarity, Vector3 position)
		{
			//IL_007e: 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_0066: 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)
			if (!CanSpawnCrates)
			{
				return;
			}
			CosmeticWorldObjectSetup val = ValuableDirector.instance.cosmeticWorldObjectSetups?.FirstOrDefault((Func<CosmeticWorldObjectSetup, bool>)((CosmeticWorldObjectSetup s) => s != null && (int)s.rarity == rarity));
			if (val?.prefab != null && ((PrefabRef<GameObject>)(object)val.prefab).IsValid())
			{
				GameObject val2 = (SemiFunc.IsMultiplayer() ? PhotonNetwork.InstantiateRoomObject(((PrefabRef<GameObject>)(object)val.prefab).ResourcePath, position, Quaternion.identity, (byte)0, new object[1] { "MXv1crate" }) : Object.Instantiate<GameObject>(((PrefabRef<GameObject>)(object)val.prefab).Prefab, position, Quaternion.identity));
				if (Object.op_Implicit((Object)(object)val2))
				{
					val2.AddComponent<MenuCrate>();
					Spawned.Add(val2);
				}
			}
		}

		public static bool IsMenuCrate(CosmeticWorldObject crate)
		{
			if (!Object.op_Implicit((Object)(object)crate))
			{
				return false;
			}
			if (Object.op_Implicit((Object)(object)((Component)crate).GetComponent<MenuCrate>()))
			{
				return true;
			}
			PhotonView component = ((Component)crate).GetComponent<PhotonView>();
			object[] array = (Object.op_Implicit((Object)(object)component) ? component.InstantiationData : null);
			if (array != null && array.Length != 0 && array[0] is string text)
			{
				return text == "MXv1crate";
			}
			return false;
		}

		public static List<EnemySetup> AllEnemies()
		{
			EnemyDirector instance = EnemyDirector.instance;
			if (!Object.op_Implicit((Object)(object)instance))
			{
				return new List<EnemySetup>();
			}
			return (from x in instance.enemiesDifficulty1.Concat(instance.enemiesDifficulty2).Concat(instance.enemiesDifficulty3)
				where Object.op_Implicit((Object)(object)x)
				group x by ((Object)x).name into g
				select g.First() into x
				orderby ((Object)x).name
				select x).ToList();
		}

		public static string EnemyLabel(string assetName)
		{
			return Regex.Replace(assetName, "^Enemy (- )?", "");
		}

		private static void SpawnEnemy(string assetName, Vector3 position)
		{
			//IL_002d: 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_0093: 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_0075: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
			EnemySetup val = ((IEnumerable<EnemySetup>)AllEnemies()).FirstOrDefault((Func<EnemySetup, bool>)((EnemySetup x) => ((Object)x).name == assetName));
			if (!Object.op_Implicit((Object)(object)val))
			{
				return;
			}
			LevelPoint val2 = ClosestLevelPoint(position);
			if (!Object.op_Implicit((Object)(object)val2))
			{
				return;
			}
			foreach (PrefabRef spawnObject in val.spawnObjects)
			{
				GameObject val3 = ((GameManager.instance.gameMode != 0) ? PhotonNetwork.InstantiateRoomObject(((PrefabRef<GameObject>)(object)spawnObject).ResourcePath, ((Component)val2).transform.position, Quaternion.identity, (byte)0, EnemyFloaterHalloweenState.SpawnData(spawnObject)) : Object.Instantiate<GameObject>(((PrefabRef<GameObject>)(object)spawnObject).Prefab, ((Component)val2).transform.position, Quaternion.identity));
				EnemyParent component = val3.GetComponent<EnemyParent>();
				if (Object.op_Implicit((Object)(object)component))
				{
					Spawned.Add(val3);
					component.SetupDone = true;
					Enemy componentInChildren = val3.GetComponentInChildren<Enemy>();
					if (Object.op_Implicit((Object)(object)componentInChildren))
					{
						componentInChildren.EnemyTeleported(((Component)val2).transform.position);
					}
					component.firstSpawnPointUsed = true;
				}
			}
		}

		private static LevelPoint ClosestLevelPoint(Vector3 position)
		{
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			LevelPoint result = null;
			float num = float.MaxValue;
			foreach (LevelPoint item in SemiFunc.LevelPointsGetAll())
			{
				if (Object.op_Implicit((Object)(object)item))
				{
					Vector3 val = ((Component)item).transform.position - position;
					float sqrMagnitude = ((Vector3)(ref val)).sqrMagnitude;
					if (sqrMagnitude < num)
					{
						num = sqrMagnitude;
						result = item;
					}
				}
			}
			return result;
		}

		public static void DespawnEnemies()
		{
			if (!Object.op_Implicit((Object)(object)EnemyDirector.instance))
			{
				return;
			}
			foreach (EnemyParent item in EnemyDirector.instance.enemiesSpawned.ToList())
			{
				if (Object.op_Implicit((Object)(object)item) && item.Spawned)
				{
					item.SpawnedTimerSet(0f);
					item.DespawnedTimerSet(30f, false);
				}
			}
		}

		public static void KeepEnemiesAway()
		{
			if (!Object.op_Implicit((Object)(object)EnemyDirector.instance))
			{
				return;
			}
			bool flag = HostHas(HostFlags.NoEnemies);
			RemovedEnemies.RemoveWhere((EnemyParent x) => !Object.op_Implicit((Object)(object)x));
			foreach (EnemyParent item in EnemyDirector.instance.enemiesSpawned.ToList())
			{
				if (Object.op_Implicit((Object)(object)item) && Object.op_Implicit((Object)(object)item.Enemy) && (flag || RemovedEnemies.Contains(item)))
				{
					if (item.Spawned)
					{
						item.Despawn();
					}
					item.DespawnedTimerSet(25f, false);
				}
			}
		}

		private static void DestroyEnemies()
		{
			if (!Object.op_Implicit((Object)(object)EnemyDirector.instance))
			{
				return;
			}
			foreach (EnemyParent item in EnemyDirector.instance.enemiesSpawned)
			{
				if (Object.op_Implicit((Object)(object)item))
				{
					RemovedEnemies.Add(item);
				}
			}
			KeepEnemiesAway();
		}

		private static void FreezeEnemies(float seconds)
		{
			if (!Object.op_Implicit((Object)(object)EnemyDirector.instance))
			{
				return;
			}
			foreach (EnemyParent item in EnemyDirector.instance.enemiesSpawned.ToList())
			{
				if (Object.op_Implicit((Object)(object)item) && item.Spawned && Object.op_Implicit((Object)(object)item.Enemy))
				{
					item.Enemy.Freeze(seconds);
				}
			}
		}

		private static void NoAggro(string steamId, bool on)
		{
			DebugCommandHandler instance = DebugCommandHandler.instance;
			EnemyDirector instance2 = EnemyDirector.instance;
			if (on)
			{
				if (Object.op_Implicit((Object)(object)instance) && !instance.enemyNoVision.Contains(steamId))
				{
					instance.enemyNoVision.Add(steamId);
				}
				if (Object.op_Implicit((Object)(object)instance2) && !instance2.debugNoVision.Contains(steamId))
				{
					instance2.debugNoVision.Add(steamId);
				}
			}
			else
			{
				if (Object.op_Implicit((Object)(object)instance))
				{
					instance.enemyNoVision.Remove(steamId);
				}
				if (Object.op_Implicit((Object)(object)instance2))
				{
					instance2.debugNoVision.Remove(steamId);
				}
			}
		}

		public static PlayerAvatar FindPlayer(string steamId)
		{
			if (Object.op_Implicit((Object)(object)GameDirector.instance))
			{
				foreach (PlayerAvatar player in GameDirector.instance.PlayerList)
				{
					if (Object.op_Implicit((Object)(object)player) && player.steamID == steamId)
					{
						return player;
					}
				}
			}
			if (!Object.op_Implicit((Object)(object)PlayerAvatar.instance) || (!string.IsNullOrEmpty(steamId) && !(PlayerAvatar.instance.steamID == steamId)))
			{
				return null;
			}
			return PlayerAvatar.instance;
		}

		private static void Revive(PlayerAvatar player)
		{
			if (Object.op_Implicit((Object)(object)player) && player.deadSet)
			{
				player.playerDeathHead.inExtractionPoint = true;
				player.playerDeathHead.Revive();
			}
		}

		private static void Heal(PlayerAvatar player, int amount)
		{
			if (Object.op_Implicit((Object)(object)player) && !player.deadSet)
			{
				if ((Object)(object)player == (Object)(object)PlayerAvatar.instance)
				{
					player.playerHealth.Heal(amount, true);
				}
				else
				{
					player.playerHealth.HealOther(amount, true);
				}
			}
		}

		public static List<string> UpgradeNames()
		{
			if (!Object.op_Implicit((Object)(object)StatsManager.instance))
			{
				return new List<string>();
			}
			return (from k in StatsManager.instance.dictionaryOfDictionaries.Keys
				where k.StartsWith("playerUpgrade")
				select k.Replace("playerUpgrade", "") into k
				orderby UpgradeLabel(k)
				select k).ToList();
		}

		public static string UpgradeLabel(string raw)
		{
			return raw switch
			{
				"Health" => "Health", 
				"Stamina" => "Stamina", 
				"ExtraJump" => "Extra jump", 
				"Launch" => "Tumble launch", 
				"MapPlayerCount" => "Map player count", 
				"Speed" => "Sprint speed", 
				"Strength" => "Strength", 
				"Range" => "Grab range", 
				"Throw" => "Throw strength", 
				"CrouchRest" => "Crouch rest", 
				"TumbleWings" => "Tumble wings", 
				"TumbleClimb" => "Tumble climb", 
				"DeathHeadBattery" => "Death head battery", 
				_ => SentenceCase(Regex.Replace(raw ?? "", "(?<=[a-z])(?=[A-Z])", " ")), 
			};
		}

		private static string SentenceCase(string s)
		{
			if (s.Length != 0)
			{
				return char.ToUpperInvariant(s[0]) + s.Substring(1).ToLowerInvariant();
			}
			return s;
		}

		public static int UpgradeValue(string steamId, string name)
		{
			if (!StatsManager.instance.dictionaryOfDictionaries.TryGetValue("playerUpgrade" + name, out var value))
			{
				return 0;
			}
			return value.GetValueOrDefault(steamId, 0);
		}

		private static void BringPlayer(PlayerAvatar target, Vector3 position)
		{
			//IL_0061: 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_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_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_0056: Unknown result type (might be due to invalid IL or missing references)
			if (Object.op_Implicit((Object)(object)target))
			{
				if (target.isTumbling && Object.op_Implicit((Object)(object)target.tumble) && Object.op_Implicit((Object)(object)target.tumble.physGrabObject))
				{
					target.tumble.physGrabObject.Teleport(position + Vector3.up * 0.3f, ((Component)target).transform.rotation);
				}
				target.Spawn(position, ((Component)target).transform.rotation, false);
			}
		}

		private static void RemoveObject(int viewId)
		{
			PhotonView val = PhotonView.Find(viewId);
			if (Object.op_Implicit((Object)(object)val))
			{
				RemoveThing(((Component)val).gameObject);
			}
		}

		private static void RemoveThing(GameObject go)
		{
			if (!Object.op_Implicit((Object)(object)go))
			{
				return;
			}
			EnemyParent componentInParent = go.GetComponentInParent<EnemyParent>();
			if (Object.op_Implicit((Object)(object)componentInParent))
			{
				RemovedEnemies.Add(componentInParent);
				KeepEnemiesAway();
				return;
			}
			PhysGrabObject componentInParent2 = go.GetComponentInParent<PhysGrabObject>();
			if (Object.op_Implicit((Object)(object)componentInParent2) && !Object.op_Implicit((Object)(object)go.GetComponentInParent<PlayerAvatar>()) && (Object.op_Implicit((Object)(object)((Component)componentInParent2).GetComponent<ValuableObject>()) || Object.op_Implicit((Object)(object)((Component)componentInParent2).GetComponent<ItemAttributes>()) || Object.op_Implicit((Object)(object)((Component)componentInParent2).GetComponent<CosmeticWorldObject>())))
			{
				componentInParent2.DestroyPhysGrabObject();
			}
		}

		private static void ClearSpawned()
		{
			foreach (GameObject item in Spawned.ToList())
			{
				RemoveThing(item);
			}
			Spawned.Clear();
		}

		public static int LookedAtViewId()
		{
			//IL_002a: 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_0076: 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)
			Camera val = (Object.op_Implicit((Object)(object)GameDirector.instance) ? GameDirector.instance.MainCamera : null);
			if (!Object.op_Implicit((Object)(object)val))
			{
				return 0;
			}
			foreach (RaycastHit item in from h in Physics.RaycastAll(((Component)val).transform.position, ((Component)val).transform.forward, 25f, -1, (QueryTriggerInteraction)1)
				orderby ((RaycastHit)(ref h)).distance
				select h)
			{
				RaycastHit current = item;
				if (!((Object)(object)((Component)((RaycastHit)(ref current)).collider).GetComponentInParent<PlayerAvatar>() == (Object)(object)PlayerAvatar.instance) || !Object.op_Implicit((Object)(object)PlayerAvatar.instance))
				{
					EnemyParent componentInParent = ((Component)((RaycastHit)(ref current)).collider).GetComponentInParent<EnemyParent>();
					if (Object.op_Implicit((Object)(object)componentInParent) && Object.op_Implicit((Object)(object)((MonoBehaviourPun)componentInParent).photonView))
					{
						return ((MonoBehaviourPun)componentInParent).photonView.ViewID;
					}
					PhysGrabObject componentInParent2 = ((Component)((RaycastHit)(ref current)).collider).GetComponentInParent<PhysGrabObject>();
					if (Object.op_Implicit((Object)(object)componentInParent2) && Object.op_Implicit((Object)(object)componentInParent2.photonView) && (Object.op_Implicit((Object)(object)((Component)componentInParent2).GetComponent<ValuableObject>()) || Object.op_Implicit((Object)(object)((Component)componentInParent2).GetComponent<ItemAttributes>()) || Object.op_Implicit((Object)(object)((Component)componentInParent2).GetComponent<CosmeticWorldObject>())))
					{
						return componentInParent2.photonView.ViewID;
					}
					if (!Object.op_Implicit((Object)(object)((RaycastHit)(ref current)).collider.attachedRigidbody))
					{
						return 0;
					}
				}
			}
			return 0;
		}

		private static void KnockOver(PlayerAvatar player, float launch)
		{
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: 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_0053: 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)
			if (Object.op_Implicit((Object)(object)player) && !player.deadSet && Object.op_Implicit((Object)(object)player.tumble))
			{
				player.tumble.TumbleSet(true, false, false);
				if (launch > 0f)
				{
					Vector3 val = Vector3.up * launch + Random.insideUnitSphere * 2f;
					player.tumble.TumbleForce(val);
				}
			}
		}

		public static ExtractionPoint ActiveExtractionPoint()
		{
			ExtractionPoint val = (Object.op_Implicit((Object)(object)RoundDirector.instance) ? RoundDirector.instance.extractionPointCurrent : null);
			if (!Object.op_Implicit((Object)(object)val) || !val.StateIs((State)2) || val.isShop)
			{
				return null;
			}
			return val;
		}

		public static void BringLootToExtraction()
		{
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			ExtractionPoint val = ActiveExtractionPoint();
			if (Object.op_Implicit((Object)(object)val))
			{
				Request(HostAction.BringLoot, val.platform.position, true);
			}
		}

		private static void BringLoot(Vector3 center, bool onPlatform)
		{
			//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dc: 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)
			//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bc: 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_00cb: 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_0123: Unknown result type (might be due to invalid IL or missing references)
			//IL_0124: Unknown result type (might be due to invalid IL or missing references)
			//IL_012d: 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_0137: Unknown result type (might be due to invalid IL or missing references)
			//IL_0140: Unknown result type (might be due to invalid IL or missing references)
			//IL_0145: 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_010e: 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_014a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0192: Unknown result type (might be due to invalid IL or missing references)
			//IL_0197: 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_019e: Unknown result type (might be due to invalid IL or missing references)
			//IL_031c: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_0307: Unknown result type (might be due to invalid IL or missing references)
			//IL_030c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0311: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ad: 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_0214: Unknown result type (might be due to invalid IL or missing references)
			//IL_0216: Unknown result type (might be due to invalid IL or missing references)
			//IL_0219: Unknown result type (might be due to invalid IL or missing references)
			//IL_0227: Unknown result type (might be due to invalid IL or missing references)
			//IL_022c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0231: Unknown result type (might be due to invalid IL or missing references)
			//IL_0234: Unknown result type (might be due to invalid IL or missing references)
			//IL_0242: 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_024c: 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_0261: Unknown result type (might be due to invalid IL or missing references)
			//IL_0266: Unknown result type (might be due to invalid IL or missing references)
			//IL_026b: Unknown result type (might be due to invalid IL or missing references)
			//IL_026d: 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_0279: 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_027d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0284: Unknown result type (might be due to invalid IL or missing references)
			//IL_0289: Unknown result type (might be due to invalid IL or missing references)
			//IL_028a: 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_02a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c6: Unknown result type (might be due to invalid IL or missing references)
			List<(ValuableObject, Vector3)> list = (from v in Object.FindObjectsByType<ValuableObject>((FindObjectsSortMode)0)
				where Object.op_Implicit((Object)(object)v) && Object.op_Implicit((Object)(object)v.physGrabObject) && v.physGrabObject.playerGrabbing.Count == 0 && (!Object.op_Implicit((Object)(object)v.roomVolumeCheck) || !v.roomVolumeCheck.inExtractionPoint)
				select (v: v, size: Footprint(v.physGrabObject)) into x
				orderby x.size.x * x.size.z descending
				select x).ToList();
			if (list.Count == 0)
			{
				return;
			}
			NoBreakUntil = Time.time + 8f;
			Camera val = (Object.op_Implicit((Object)(object)GameDirector.instance) ? GameDirector.instance.MainCamera : null);
			Vector3 val3;
			if (!onPlatform && Object.op_Implicit((Object)(object)val))
			{
				Vector3 val2 = Vector3.ProjectOnPlane(((Component)val).transform.forward, Vector3.up);
				val3 = ((Vector3)(ref val2)).normalized;
			}
			else
			{
				val3 = Vector3.forward;
			}
			Vector3 val4 = val3;
			Vector3 val5 = Vector3.Cross(Vector3.up, val4);
			float num = (onPlatform ? 3.4f : 4.5f);
			float num2 = (onPlatform ? 3.4f : 6f);
			Vector3 val6 = (onPlatform ? (center - val5 * (num / 2f) - val4 * (num2 / 2f)) : (center - val5 * (num / 2f)));
			List<(PhysGrabObject, Vector3)> list2 = new List<(PhysGrabObject, Vector3)>();
			float num3 = 0f;
			float num4 = 0f;
			float num5 = 0f;
			float num6 = 0.4f;
			float num7 = 0f;
			foreach (var item3 in list)
			{
				ValuableObject item = item3.Item1;
				Vector3 item2 = item3.Item2;
				Vector3 val7 = Vector3.zero;
				bool flag = false;
				for (int num8 = 0; num8 < 40; num8++)
				{
					if (flag)
					{
						break;
					}
					if (num3 + item2.x > num && num3 > 0f)
					{
						num3 = 0f;
						num4 += num5 + 0.15f;
						num5 = 0f;
					}
					if (num4 + item2.z > num2)
					{
						num3 = 0f;
						num4 = 0f;
						num5 = 0f;
						num6 += num7 + 0.2f;
						num7 = 0f;
					}
					val7 = val6 + val5 * (num3 + item2.x / 2f) + val4 * (num4 + item2.z / 2f) + Vector3.up * (num6 + item2.y / 2f);
					Vector3 val8 = item2 / 2f;
					bool num9 = !Physics.CheckBox(val7, val8 * 0.9f, Quaternion.LookRotation(val4), LayerMask.op_Implicit(SemiFunc.LayerMaskGetVisionObstruct()), (QueryTriggerInteraction)1);
					num3 += item2.x + 0.15f;
					num5 = Mathf.Max(num5, item2.z);
					num7 = Mathf.Max(num7, item2.y);
					flag = num9;
				}
				if (!flag)
				{
					val7 = center + Vector3.up * (1f + (float)list2.Count * 0.1f);
				}
				list2.Add((item.physGrabObject, val7));
			}
			if (Object.op_Implicit((Object)(object)Cheats.Runner))
			{
				((MonoBehaviour)Cheats.Runner).StartCoroutine(TeleportInBatches(list2));
			}
		}

		private static IEnumerator TeleportInBatches(List<(PhysGrabObject grab, Vector3 spot)> plan)
		{
			for (int i = 0; i < plan.Count; i++)
			{
				var (val, val2) = plan[i];
				if (Object.op_Implicit((Object)(object)val))
				{
					val.OverrideIndestructible(5f);
					val.Teleport(val2, Quaternion.identity);
				}
				if (i % 4 == 3)
				{
					yield return null;
				}
			}
		}

		private static Vector3 Footprint(PhysGrabObject grab)
		{
			//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_0047: 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_0095: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c3: 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)
			List<Collider> list = (from c in ((Component)grab).GetComponentsInChildren<Collider>()
				where Object.op_Implicit((Object)(object)c) && !c.isTrigger
				select c).ToList();
			if (list.Count == 0)
			{
				return new Vector3(0.5f, 0.5f, 0.5f);
			}
			Bounds bounds = list[0].bounds;
			foreach (Collider item in list)
			{
				((Bounds)(ref bounds)).Encapsulate(item.bounds);
			}
			float num = Mathf.Max(((Bounds)(ref bounds)).size.x, ((Bounds)(ref bounds)).size.z);
			return new Vector3(Mathf.Max(0.3f, num), Mathf.Max(0.3f, ((Bounds)(ref bounds)).size.y), Mathf.Max(0.3f, num));
		}

		public static void CopyUpgradesToAll(string sourceSteamId)
		{
			List<string> list = UpgradeNames();
			foreach (PlayerAvatar item in SemiFunc.PlayerGetList())
			{
				if (!Object.op_Implicit((Object)(object)item) || item.steamID == sourceSteamId)
				{
					continue;
				}
				foreach (string item2 in list)
				{
					int num = UpgradeValue(sourceSteamId, item2) - UpgradeValue(item.steamID, item2);
					if (num != 0)
					{
						Request(HostAction.Upgrade, item.steamID, item2, num);
					}
				}
			}
		}

		public static void UpgradeEveryone(string name, int amount)
		{
			foreach (PlayerAvatar item in SemiFunc.PlayerGetList())
			{
				if (Object.op_Implicit((Object)(object)item))
				{
					Request(HostAction.Upgrade, item.steamID, name, amount);
				}
			}
		}

		private static void Upgrade(string steamId, string name, int amount)
		{
			//IL_003e: 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)
			if (SemiFunc.IsMultiplayer())
			{
				PunManager.instance.photonView.RPC("TesterUpgradeCommandRPC", (RpcTarget)0, new object[3] { steamId, name, amount });
			}
			else
			{
				PunManager.instance.TesterUpgradeCommandRPC(steamId, name, amount, default(PhotonMessageInfo));
			}
		}

		private static void SetFlag(HostFlags flag, bool on)
		{
			if (on)
			{
				localFlags |= flag;
			}
			else
			{
				localFlags &= ~flag;
			}
			if (flag == HostFlags.FreeShop)
			{
				ShopPatches.ApplyFreeShopToScene(on);
			}
			if (flag == HostFlags.NoEnemies && on)
			{
				KeepEnemiesAway();
			}
			Net.BroadcastFlags();
		}

		private static void ForceExtract()
		{
			ExtractionPoint extractionPointCurrent = RoundDirector.instance.extractionPointCurrent;
			if (Object.op_Implicit((Object)(object)extractionPointCurrent) && extractionPointCurrent.StateIs((State)2) && !extractionPointCurrent.isShop)
			{
				extractionPointCurrent.HaulGoalSet(0);
				extractionPointCurrent.haulGoalFetched = true;
				extractionPointCurrent.haulGoal = 0;
				ExtractionGate.TryConfirm(extractionPointCurrent);
			}
		}

		private static void ActivateNearest(PlayerAvatar sender)
		{
			//IL_001f: 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_0024: 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_0083: 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)
			Vector3 val = (Object.op_Implicit((Object)(object)sender) ? ((Component)sender).transform.position : ((Component)PlayerController.instance).transform.position);
			ExtractionPoint val2 = null;
			float num = float.MaxValue;
			foreach (GameObject extractionPoint in RoundDirector.instance.extractionPointList)
			{
				if (!Object.op_Implicit((Object)(object)extractionPoint))
				{
					continue;
				}
				ExtractionPoint component = extractionPoint.GetComponent<ExtractionPoint>();
				if (Object.op_Implicit((Object)(object)component) && !component.isLocked && component.StateIs((State)1))
				{
					Vector3 val3 = extractionPoint.transform.position - val;
					float sqrMagnitude = ((Vector3)(ref val3)).sqrMagnitude;
					if (sqrMagnitude < num)
					{
						num = sqrMagnitude;
						val2 = component;
					}
				}
			}
			if (Object.op_Implicit((Object)(object)val2))
			{
				val2.OnClick();
			}
		}

		private static void SetLevel(int level)
		{
			RunManager.instance.levelsCompleted = Mathf.Max(0, level - 1);
			SemiFunc.StatSetRunLevel(RunManager.instance.levelsCompleted);
			if (SemiFunc.RunIsShop())
			{
				RunManager.instance.ChangeLevel(false, false, (ChangeLevelType)5);
			}
			else if (SemiFunc.RunIsLevel())
			{
				RunManager.instance.ChangeLevel(false, false, (ChangeLevelType)0);
			}
		}

		static Admin()
		{
			Rarity[] array = new Rarity[4];
			RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
			CrateRarities = (Rarity[])(object)array;
			DeadSince = new Dictionary<PlayerAvatar, float>();
			lootSummaryAt = -10f;
			lootSummary = "";
			Spawned = new List<GameObject>();
		}
	}
	public sealed class Cheats : MonoBehaviour
	{
		public static bool God;

		public static bool InfiniteEnergy;

		public static bool NoAggro;

		public static bool Fly;

		public static bool InfiniteBattery;

		public static bool EspEnemies;

		public static bool EspValuables;

		public static bool EspCrates;

		public static float SpeedMultiplier = 1f;

		public static float JumpMultiplier = 1f;

		public static int ExtraJumps;

		public static float GrabStrength = 1f;

		public static float GrabRangeBonus;

		public static readonly List<EnemyParent> EspEnemyList = new List<EnemyParent>();

		public static readonly List<ValuableObject> EspValuableList = new List<ValuableObject>();

		public static readonly List<CosmeticWorldObject> EspCrateList = new List<CosmeticWorldObject>();

		private static Vector3 savedSpot;

		private static LevelGenerator savedSpotLevel;

		private PlayerController lastController;

		private LevelGenerator lastLevel;

		private float nextStandUp;

		private PhysGrabber lastGrabber;

		private float baseJumpForce;

		private float appliedJumpMultiplier = 1f;

		private int appliedExtraJumps;

		private float appliedRangeBonus;

		private bool wasInMainMenu;

		private bool errorLogged;

		private static Vector3 flyPosition;

		private bool flyActive;

		private RigidbodyInterpolation flyInterpolation;

		private bool energyWasOn;

		private bool godWasOn;

		private bool noAggroSent;

		private float nextEspRefresh;

		private float nextEnemySweep;

		public static bool FreeCam { get; private set; }

		public static bool Cinematic => Object.op_Implicit((Object)(object)RecordingDirector.instance);

		public static bool GreenScreen
		{
			get
			{
				if (Object.op_Implicit((Object)(object)GameDirector.instance))
				{
					return GameDirector.instance.greenScreenActive;
				}
				return false;
			}
		}

		public static bool HideGrabBeam
		{
			get
			{
				if (Object.op_Implicit((Object)(object)DebugCommandHandler.instance))
				{
					return DebugCommandHandler.instance.hideGrabber;
				}
				return false;
			}
		}

		public static bool HideItemLabels
		{
			get
			{
				if (Object.op_Implicit((Object)(object)DebugCommandHandler.instance))
				{
					return DebugCommandHandler.instance.hideItemLabels;
				}
				return false;
			}
		}

		public static bool HasSavedSpot
		{
			get
			{
				if (Object.op_Implicit((Object)(object)savedSpotLevel))
				{
					return (Object)(object)savedSpotLevel == (Object)(object)LevelGenerator.Instance;
				}
				return false;
			}
		}

		public static Cheats Runner { get; private set; }

		public static bool AnythingOn => ActiveSummary().StartsWith("On now");

		public static void SetFly(bool on)
		{
			Fly = on;
			if (on)
			{
				SetFreeCam(on: false);
			}
		}

		public static void SetFreeCam(bool on)
		{
			if (on)
			{
				Fly = false;
			}
			FreeCam = on;
			ApplyFreeCam();
		}

		private static void ApplyFreeCam()
		{
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0091: 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_0094: 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_009b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a1: 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_006b: 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_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_005a: Unknown result type (might be due to invalid IL or missing references)
			DebugCommandHandler instance = DebugCommandHandler.instance;
			if (!Object.op_Implicit((Object)(object)instance))
			{
				return;
			}
			bool flag = FreeCam && Admin.InGame;
			if (instance.debugFreeCam != flag)
			{
				if (flag)
				{
					Camera val = (Object.op_Implicit((Object)(object)GameDirector.instance) ? GameDirector.instance.MainCamera : null);
					instance.freecamSmoothedPosition = (instance.freecamPosition = (Object.op_Implicit((Object)(object)val) ? ((Component)val).transform.position : (Object.op_Implicit((Object)(object)PlayerController.instance) ? (((Component)PlayerController.instance).transform.position + Vector3.up * 1.5f) : Vector3.zero)));
					instance.freecamVelocity = Vector3.zero;
				}
				instance.debugFreeCam = flag;
			}
		}

		public static void SetCinematic(bool on)
		{
			if (Object.op_Implicit((Object)(object)GameDirector.instance) && Cinematic != on)
			{
				GameDirector.instance.CommandRecordingDirectorSet(on);
			}
		}

		public static void SetGreenScreen(bool on)
		{
			if (Object.op_Implicit((Object)(object)GameDirector.instance) && GreenScreen != on)
			{
				GameDirector.instance.CommandGreenScreenSet(on);
			}
		}

		public static void SetHideGrabBeam(bool on)
		{
			DebugCommandHandler instance = DebugCommandHandler.instance;
			if (!Object.op_Implicit((Object)(object)instance))
			{
				return;
			}
			instance.hideGrabber = on;
			PhysGrabber instance2 = PhysGrabber.instance;
			if (Object.op_Implicit((Object)(object)instance2))
			{
				if (Object.op_Implicit((Object)(object)instance2.physGrabPointVisual1))
				{
					instance2.physGrabPointVisual1.SetActive(!on);
				}
				if (Object.op_Implicit((Object)(object)instance2.physGrabBeamComponent) && Object.op_Implicit((Object)(object)instance2.physGrabBeamComponent.lineRenderer))
				{
					((Renderer)instance2.physGrabBeamComponent.lineRenderer).enabled = !on && instance2.physGrabBeamActive;
				}
			}
		}

		public static void SetHideItemLabels(bool on)
		{
			if (Object.op_Implicit((Object)(object)DebugCommandHandler.instance))
			{
				DebugCommandHandler.instance.hideItemLabels = on;
			}
		}

		public static void SaveSpot()
		{
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: 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_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			if (Object.op_Implicit((Object)(object)PlayerController.instance))
			{
				savedSpot = ((Component)PlayerController.instance).transform.position + Vector3.up * 0.1f;
				savedSpotLevel = LevelGenerator.Instance;
			}
		}

		public static void BackToSpot()
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			if (HasSavedSpot)
			{
				TeleportSelf(savedSpot);
			}
		}

		public static void TeleportToTruck()
		{
			//IL_0016: 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_0025: 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)
			if (Object.op_Implicit((Object)(object)TruckSafetySpawnPoint.instance))
			{
				TeleportSelf(((Component)TruckSafetySpawnPoint.instance).transform.position + Vector3.up * 0.5f);
			}
		}

		public static void TeleportToExtraction()
		{
			//IL_00fb: 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_0047: 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)
			if (!Object.op_Implicit((Object)(object)RoundDirector.instance))
			{
				return;
			}
			ExtractionPoint val = RoundDirector.instance.extractionPointCurrent;
			if (!Object.op_Implicit((Object)(object)val))
			{
				Vector3 from = (Object.op_Implicit((Object)(object)PlayerController.instance) ? ((Component)PlayerController.instance).transform.position : Vector3.zero);
				val = (from x in RoundDirector.instance.extractionPointList
					where Object.op_Implicit((Object)(object)x)
					select x.GetComponent<ExtractionPoint>() into x
					where Object.op_Implicit((Object)(object)x) && !x.isLocked && !x.StateIs((State)7)
					select x).OrderBy(delegate(ExtractionPoint x)
				{
					//IL_0006: Unknown result type (might be due to invalid IL or missing references)
					//IL_000c: Unknown result type (might be due to invalid IL or missing references)
					//IL_0011: Unknown result type (might be due to invalid IL or missing references)
					//IL_0016: Unknown result type (might be due to invalid IL or missing references)
					Vector3 val2 = ((Component)x).transform.position - from;
					return ((Vector3)(ref val2)).sqrMagnitude;
				}).FirstOrDefault();
			}
			if (Object.op_Implicit((Object)(object)val))
			{
				TeleportSelf(((Component)val).transform.TransformPoint(new Vector3(0f, 0.3f, 3f)));
			}
		}

		private void Awake()
		{
			Runner = this;
		}

		private void Update()
		{
			try
			{
				Tick();
			}
			catch (Exception arg)
			{
				if (!errorLogged)
				{
					errorLogged = true;
					Plugin.Log.LogError((object)$"Menu options failed: {arg}");
				}
			}
		}

		private void ResetWhenBackInMainMenu()
		{
			bool flag = Object.op_Implicit((Object)(object)RunManager.instance) && (Object)(object)RunManager.instance.levelCurrent == (Object)(object)RunManager.instance.levelMainMenu;
			if (flag && !wasInMainMenu)
			{
				God = false;
				InfiniteEnergy = false;
				NoAggro = false;
				Fly = false;
				InfiniteBattery = false;
				EspEnemies = false;
				EspValuables = false;
				EspCrates = false;
				FreeCam = false;
				SetHideGrabBeam(on: false);
				SetHideItemLabels(on: false);
				savedSpotLevel = null;
				SpeedMultiplier = 1f;
				JumpMultiplier = 1f;
				ExtraJumps = 0;
				GrabStrength = 1f;
				GrabRangeBonus = 0f;
				if (Object.op_Implicit((Object)(object)DebugCommandHandler.instance))
				{
					DebugCommandHandler.instance.enemyNoVision.Clear();
				}
				Admin.ResetForNewGame();
			}
			wasInMainMenu = flag;
		}

		private void Tick()
		{
			//IL_006e: Unknown result type (might be due to invalid IL or missing references)
			ResetWhenBackInMainMenu();
			HostSweep();
			RefreshEsp();
			ApplyFreeCam();
			PlayerController instance = PlayerController.instance;
			PlayerAvatar instance2 = PlayerAvatar.instance;
			if (!Admin.InGame || !Object.op_Implicit((Object)(object)instance) || !Object.op_Implicit((Object)(object)instance2))
			{
				return;
			}
			if ((Object)(object)LevelGenerator.Instance != (Object)(object)lastLevel)
			{
				lastLevel = LevelGenerator.Instance;
				if (flyActive)
				{
					flyActive = false;
					instance.rb.interpolation = flyInterpolation;
				}
			}
			if ((Object)(object)instance != (Object)(object)lastController)
			{
				lastController = instance;
				baseJumpForce = instance.JumpForce;
				appliedJumpMultiplier = 1f;
				appliedExtraJumps = 0;
				noAggroSent = false;
				flyActive = false;
			}
			if (God || godWasOn)
			{
				instance2.playerHealth.godMode = God;
			}
			godWasOn = God;
			if (InfiniteEnergy)
			{
				instance.DebugEnergy = true;
				instance.EnergyCurrent = instance.EnergyStart;
			}
			else if (energyWasOn)
			{
				instance.DebugEnergy = false;
			}
			energyWasOn = InfiniteEnergy;
			if (!Mathf.Approximately(SpeedMultiplier, 1f))
			{
				instance.OverrideSpeed(SpeedMultiplier, 0.25f, -1f);
			}
			if (!Mathf.Approximately(JumpMultiplier, appliedJumpMultiplier))
			{
				instance.JumpForce = baseJumpForce * JumpMultiplier;
				appliedJumpMultiplier = JumpMultiplier;
			}
			if (ExtraJumps != appliedExtraJumps)
			{
				instance.JumpExtra += ExtraJumps - appliedExtraJumps;
				appliedExtraJumps = ExtraJumps;
			}
			ApplyGrab();
			ApplyFly(instance);
			if (NoAggro != noAggroSent && Admin.CanUseHostActions)
			{
				noAggroSent = NoAggro;
				Admin.Request(HostAction.NoAggro, instance2.steamID, NoAggro);
			}
		}

		private void ApplyGrab()
		{
			PhysGrabber instance = PhysGrabber.instance;
			if (Object.op_Implicit((Object)(object)instance))
			{
				if ((Object)(object)instance != (Object)(object)lastGrabber)
				{
					lastGrabber = instance;
					appliedRangeBonus = 0f;
				}
				if (!Mathf.Approximately(GrabRangeBonus, appliedRangeBonus))
				{
					instance.grabRange += GrabRangeBonus - appliedRangeBonus;
					appliedRangeBonus = GrabRangeBonus;
				}
				if (GrabStrength > 1f)
				{
					instance.OverrideGrabStrength(instance.grabStrength * GrabStrength, 0.25f);
				}
			}
		}

		private void ApplyFly(PlayerController controller)
		{
			//IL_00e8: 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_00f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0102: 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_00a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ba: 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_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_0115: Unknown result type (might be due to invalid IL or missing references)
			//IL_0116: Unknown result type (might be due to invalid IL or missing references)
			//IL_011b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0120: Unknown result type (might be due to invalid IL or missing references)
			//IL_012a: Unknown result type (might be due to invalid IL or missing references)
			//IL_012b: 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_0135: Unknown result type (might be due to invalid IL or missing references)
			//IL_014c: 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_0159: Unknown result type (might be due to invalid IL or missing references)
			//IL_015e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0163: Unknown result type (might be due to invalid IL or missing references)
			//IL_016e: 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_0194: 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_019d: 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)
			PlayerAvatar playerAvatarScript = controller.playerAvatarScript;
			if (Fly && playerAvatarScript.isTumbling && !playerAvatarScript.deadSet && Object.op_Implicit((Object)(object)playerAvatarScript.tumble) && Time.unscaledTime >= nextStandUp)
			{
				nextStandUp = Time.unscaledTime + 0.5f;
				playerAvatarScript.tumble.TumbleRequest(false, true);
			}
			if (!Fly || playerAvatarScript.isTumbling || playerAvatarScript.deadSet)
			{
				if (flyActive)
				{
					flyActive = false;
					controller.rb.interpolation = flyInterpolation;
				}
				return;
			}
			if (!flyActive)
			{
				flyActive = true;
				flyPosition = ((Component)controller).transform.position;
				flyInterpolation = controller.rb.interpolation;
				controller.rb.interpolation = (RigidbodyInterpolation)0;
			}
			controller.Kinematic(0.25f);
			Transform transform = controller.cameraGameObject.transform;
			Vector3 val = transform.right * SemiFunc.InputMovementX() + transform.forward * SemiFunc.InputMovementY();
			if (SemiFunc.InputHold((InputKey)1))
			{
				val += Vector3.up;
			}
			if (SemiFunc.InputHold((InputKey)12))
			{
				val += Vector3.down;
			}
			float num = (SemiFunc.InputHold((InputKey)15) ? 16f : 7f);
			flyPosition += val * (num * Time.deltaTime);
			controller.rb.position = flyPosition;
			((Component)controller).transform.position = flyPosition;
			Transform transform2 = ((Component)controller).transform;
			Quaternion localRotation = transform.localRotation;
			transform2.rotation = Quaternion.Euler(0f, ((Quaternion)(ref localRotation)).eulerAngles.y, 0f);
		}

		public static void TeleportSelf(Vector3 position)
		{
			//IL_001d: 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_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_008f: 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_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b6: 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_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a8: 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_005c: Unknown result type (might be due to invalid IL or missing references)
			PlayerController instance = PlayerController.instance;
			PlayerAvatar instance2 = PlayerAvatar.instance;
			if (Object.op_Implicit((Object)(object)instance) && Object.op_Implicit((Object)(object)instance2))
			{
				flyPosition = position;
				if (instance2.isTumbling && Object.op_Implicit((Object)(object)instance2.tumble) && Object.op_Implicit((Object)(object)instance2.tumble.physGrabObject))
				{
					instance2.tumble.physGrabObject.Teleport(position, ((Component)instance2).transform.rotation);
				}
				instance.Kinematic(0.2f);
				((Component)instance).transform.position = position;
				instance.rb.position = position;
				((Component)instance2).transform.position = position;
				if (Object.op_Implicit((Object)(object)instance2.rb))
				{
					instance2.rb.position = position;
				}
				instance2.clientPosition = position;
				instance2.clientPositionCurrent = position;
				instance2.playerAvatarVisuals.visualPosition = position;
			}
		}

		public static void NoteGameTeleport(Vector3 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)
			flyPosition = position;
		}

		public static Vector3 FrontOfCamera(float distance)
		{
			//IL_0058: 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_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_0069: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: 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_006f: 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_009b: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: 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_0032: Unknown result type (might be due to invalid IL or missing references)
			Camera val = (Object.op_Implicit((Object)(object)GameDirector.instance) ? GameDirector.instance.MainCamera : Camera.main);
			if (!Object.op_Implicit((Object)(object)val))
			{
				if (!Object.op_Implicit((Object)(object)PlayerController.instance))
				{
					return Vector3.zero;
				}
				return ((Component)PlayerController.instance).transform.position + Vector3.up;
			}
			Vector3 position = ((Component)val).transform.position;
			Vector3 forward = ((Component)val).transform.forward;
			RaycastHit val2 = default(RaycastHit);
			if (Physics.Raycast(position, forward, ref val2, distance, LayerMask.op_Implicit(SemiFunc.LayerMaskGetVisionObstruct()), (QueryTriggerInteraction)1))
			{
				distance = Mathf.Max(0.3f, ((RaycastHit)(ref val2)).distance - 0.5f);
			}
			return position + forward * distance;
		}

		private void HostSweep()
		{
			if (!(Time.unscaledTime < nextEnemySweep))
			{
				nextEnemySweep = Time.unscaledTime + 1f;
				if (Admin.InGame && Admin.IsHost)
				{
					Admin.KeepEnemiesAway();
					Admin.HostTick();
				}
			}
		}

		public static string ActiveSummary()
		{
			List<string> list = new List<string>();
			if (God)
			{
				list.Add("God mode");
			}
			if (InfiniteEnergy)
			{
				list.Add("Infinite stamina");
			}
			if (InfiniteBattery)
			{
				list.Add("Infinite battery");
			}
			if (NoAggro)
			{
				list.Add("Invisible to enemies");
			}
			if (Fly)
			{
				list.Add("Fly");
			}
			if (FreeCam)
			{
				list.Add("Free camera");
			}
			if (Cinematic)
			{
				list.Add("Cinematic");
			}
			if (GreenScreen)
			{
				list.Add("Green screen");
			}
			if (HideGrabBeam)
			{
				list.Add("Hidden grab beam");
			}
			if (HideItemLabels)
			{
				list.Add("Hidden labels");
			}
			if (EspEnemies || EspValuables || EspCrates)
			{
				list.Add("Seeing through walls");
			}
			if (Mathf.Abs(SpeedMultiplier - 1f) > 0.01f)
			{
				list.Add("Speed x" + SpeedMultiplier.ToString("0.##", CultureInfo.InvariantCulture));
			}
			if (JumpMultiplier > 1.01f)
			{
				list.Add("Jump x" + JumpMultiplier.ToString("0.#", CultureInfo.InvariantCulture));
			}
			if (ExtraJumps > 0)
			{
				list.Add(ExtraJumps + " extra jump" + ((ExtraJumps == 1) ? "" : "s"));
			}
			if (GrabStrength > 1.01f)
			{
				list.Add("Grab x" + GrabStrength.ToString("0", CultureInfo.InvariantCulture));
			}
			if (GrabRangeBonus > 0.01f)
			{
				list.Add("Range +" + GrabRangeBonus.ToString("0", CultureInfo.InvariantCulture) + " m");
			}
			if (list.Count != 0)
			{
				return "On now: " + string.Join(", ", list) + ".";
			}
			return "Nothing of your own is on right now.";
		}

		public static void AllOff()
		{
			God = false;
			InfiniteEnergy = false;
			InfiniteBattery = false;
			NoAggro = false;
			SetFly(on: false);
			SetFreeCam(on: false);
			SetCinematic(on: false);
			SetGreenScreen(on: false);
			SetHideGrabBeam(on: false);
			SetHideItemLabels(on: false);
			EspEnemies = false;
			EspValuables = false;
			EspCrates = false;
			SpeedMultiplier = 1f;
			JumpMultiplier = 1f;
			ExtraJumps = 0;
			GrabStrength = 1f;
			GrabRangeBonus = 0f;
		}

		public static bool TeleportWhereILook()
		{
			//IL_0030: 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_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: 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_0074: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_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_009e: 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_00d2: 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_00de: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f4: 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_00ba: 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_00c9: 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_011f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0104: Unknown result type (might be due to invalid IL or missing references)
			//IL_0109: 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_0118: Unknown result type (might be due to invalid IL or missing references)
			//IL_011d: Unknown result type (might be due to invalid IL or missing references)
			Camera val = (Object.op_Implicit((Object)(object)GameDirector.instance) ? GameDirector.instance.MainCamera : null);
			if (!Object.op_Implicit((Object)(object)val) || !Object.op_Implicit((Object)(object)PlayerController.instance))
			{
				return false;
			}
			LayerMask val2 = SemiFunc.LayerMaskGetVisionObstruct();
			Ray val3 = default(Ray);
			((Ray)(ref val3))..ctor(((Component)val).transform.position, ((Component)val).transform.forward);
			RaycastHit val4 = default(RaycastHit);
			if (!Physics.Raycast(val3, ref val4, 60f, LayerMask.op_Implicit(val2), (QueryTriggerInteraction)1))
			{
				return false;
			}
			Vector3 val5 = ((RaycastHit)(ref val4)).point - ((Ray)(ref val3)).direction * 0.6f + ((RaycastHit)(ref val4)).normal * 0.2f;
			RaycastHit val6 = default(RaycastHit);
			if (((RaycastHit)(ref val4)).normal.y > 0.6f)
			{
				val5 = ((RaycastHit)(ref val4)).point + Vector3.up * 0.2f;
			}
			else if (Physics.Raycast(val5 + Vector3.up * 0.5f, Vector3.down, ref val6, 30f, LayerMask.op_Implicit(val2), (QueryTriggerInteraction)1))
			{
				val5 = ((RaycastHit)(ref val6)).point + Vector3.up * 0.2f;
			}
			TeleportSelf(val5);
			return true;
		}

		private void RefreshEsp()
		{
			if ((!EspEnemies && !EspValuables && !EspCrates) || Time.unscaledTime < nextEspRefresh)
			{
				return;
			}
			nextEspRefresh = Time.unscaledTime + 1f;
			if (Admin.InGame)
			{
				EspEnemyList.Clear();
				EspValuableList.Clear();
				EspCrateList.Clear();
				if (EspEnemies)
				{
					EspEnemyList.AddRange(Object.FindObjectsByType<EnemyParent>((FindObjectsSortMode)0));
				}
				if (EspValuables)
				{
					EspValuableList.AddRange(Object.FindObjectsByType<ValuableObject>((FindObjectsSortMode)0));
				}
				if (EspCrates)
				{
					EspCrateList.AddRange(Object.FindObjectsByType<CosmeticWorldObject>((FindObjectsSortMode)0));
				}
			}
		}
	}
	[HarmonyPatch(typeof(PlayerAvatar), "SpawnRPC")]
	internal static class SpawnPositionPatch
	{
		private static void Postfix(PlayerAvatar __instance, Vector3 position)
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)__instance == (Object)(object)PlayerAvatar.instance)
			{
				Cheats.NoteGameTeleport(position);
			}
		}
	}
	[HarmonyPatch(typeof(PlayerAvatar), "PlayerDeath")]
	internal static class GodDeathPatch
	{
		private static bool Prefix(PlayerAvatar __instance)
		{
			if (Cheats.God && (Object)(object)__instance == (Object)(object)PlayerAvatar.instance)
			{
				return SemiFunc.RunIsArena();
			}
			return true;
		}
	}
	[HarmonyPatch(typeof(EnemyHealth), "Hurt")]
	internal static class OneHitEnemiesPatch
	{
		private static void Prefix(ref int _damage)
		{
			if (_damage > 0 && Admin.IsHost && Admin.HostHas(HostFlags.OneHitEnemies))
			{
				_damage = 100000;
			}
		}
	}
	[HarmonyPatch(typeof(ItemBattery), "Update")]
	internal static class BatteryPatch
	{
		private static void Prefix(ItemBattery __instance)
		{
			if (Cheats.InfiniteBattery && __instance.batteryLife < 100f)
			{
				__instance.batteryLife = 100f;
			}
		}
	}
	public sealed class MenuCrate : MonoBehaviour
	{
	}
	[HarmonyPatch(typeof(CosmeticWorldObject), "Extract")]
	internal static class CrateOnlyForModdedPatch
	{
		private static bool Prefix(CosmeticWorldObject __instance)
		{
			if (!SemiFunc.IsMultiplayer() || !PhotonNetwork.IsMasterClient)
			{
				return true;
			}
			bool num = Admin.IsMenuCrate(__instance);
			bool flag = Object.op_Implicit((Object)(object)RunManager.instance) && RunManager.instance.cosmeticWorldObjectCooldown > 0f;
			if (!num && !flag)
			{
				return true;
			}
			try
			{
				PhotonView component = ((Component)__instance).GetComponent<PhotonView>();
				if (!Object.op_Implicit((Object)(object)component))
				{
					return true;
				}
				Player[] playerList = PhotonNetwork.PlayerList;
				foreach (Player val in playerList)
				{
					if (val.IsLocal || Net.PlayerHasCurrentMod(val.ActorNumber))
					{
						component.RPC("ExtractRPC", val, Array.Empty<object>());
					}
				}
				__instance.physGrabObject.DestroyPhysGrabObject();
				return false;
			}
			catch (Exception ex)
			{
				Plugin.Log.LogWarning((object)("Crate extract fell back to the game's own way: " + ex.Message));
				return true;
			}
		}
	}
	[HarmonyPatch(typeof(CosmeticWorldObject), "ExtractRPC")]
	internal static class CrateExtractPatch
	{
		private static bool overridden;

		private static CosmeticWorldObjectDebug saved;

		private static int countBefore;

		private static void Prefix(CosmeticWorldObject __instance)
		{
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			overridden = false;
			countBefore = (Object.op_Implicit((Object)(object)RoundDirector.instance) ? RoundDirector.instance.cosmeticWorldObjectsExtracted.Count : 0);
			ValuableDirector instance = ValuableDirector.instance;
			if (Object.op_Implicit((Object)(object)instance) && Object.op_Implicit((Object)(object)RoundDirector.instance) && Admin.IsMenuCrate(__instance))
			{
				saved = instance.cosmeticWorldObjectDebug;
				instance.cosmeticWorldObjectDebug = (CosmeticWorldObjectDebug)1;
				overridden = true;
			}
		}

		private static void Finalizer()
		{
			//IL_0024: 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)
			bool flag = overridden;
			if (overridden)
			{
				overridden = false;
				if (Object.op_Implicit((Object)(object)ValuableDirector.instance))
				{
					ValuableDirector.instance.cosmeticWorldObjectDebug = saved;
				}
			}
			if (Object.op_Implicit((Object)(object)RoundDirector.instance) && RoundDirector.instance.cosmeticWorldObjectsExtracted.Count > countBefore && Object.op_Implicit((Object)(object)RunManager.instance) && (flag || Net.HostHasMod))
			{
				RunManager.instance.cosmeticWorldObjectCooldown = 0f;
			}
		}
	}
	[HarmonyPatch(typeof(NotValuableObject), "Impact")]
	internal static class CrateNoBreakPatch
	{
		private static bool Prefix(NotValuableObject __instance)
		{
			if (Admin.NoBreakNow)
			{
				return !Object.op_Implicit((Object)(object)((Component)__instance).GetComponent<CosmeticWorldObject>());
			}
			return true;
		}
	}
	public sealed class ExtractButton : MonoBehaviour
	{
		private enum Phase
		{
			Hidden,
			Waiting,
			Ready,
			Running,
			Countdown,
			Done
		}

		private const float Reach = 4f;

		private const float SideEdge = 1.8f;

		private const float FrontLine = 2.07f;

		private const float FootWidth = 0.4f;

		private const float FootDepth = 0.34f;

		private static readonly Vector3 PostPosition = new Vector3(2f, 0f, 1.9f);

		private const float BaseHeight = 0.07f;

		private const float PostHeight = 0.72f;

		private const float PostWidth = 0.3f;

		private const float PostDepth = 0.24f;

		private const float TiltDegrees = 35f;

		private const float TopHeight = 1.48f;

		private const float HiddenDepth = 1.6f;

		private const float CoverOpenAngle = 115f;

		private ExtractionPoint ep;

		private Transform visuals;

		private Transform cap;

		private Transform coverHinge;

		private Material capMaterial;

		private Material beaconMaterial;

		private Material screenMaterial;

		private Material barMaterial;

		private Transform bar;

		private Transform hingePin;

		private const float BarWidth = 0.27f;

		private float barValue;

		private int side = 1;

		private bool placed;

		private Light glow;

		private Light beaconLight;

		private Transform beaconSpin;

		private TextMeshPro screen;

		private string screenText = "";

		private Vector3 capRestLocal;

		private Bounds hitArea;

		private Phase phase;

		private bool appeared;

		private bool tubeOverlaps;

		private float offset = -1.6f;

		private float rise;

		private float press;

		private float cover;

		private float coverVelocity;

		private float denyTimer;

		private float rattle;

		private float pressedLocally = -10f;

		private bool wasReached;

		private bool built;

		public ExtractionPoint Point => ep;

		public bool IsVisible
		{
			get
			{
				if (Object.op_Implicit((Object)(object)visuals))
				{
					return ((Component)visuals).gameObject.activeSelf;
				}
				return false;
			}
		}

		public Vector3 AimPoint
		{
			get
			{
				//IL_001f: 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)
				if (!Object.op_Implicit((Object)(object)cap))
				{
					return ((Component)this).transform.position;
				}
				return cap.position;
			}
		}

		public bool Hovered { get; private set; }

		public string PhaseName => phase.ToString();

		public string ScreenText => screenText;

		public bool CoverOpen => cover > 0.9f;

		public bool TubeOverlaps => tubeOverlaps;

		public string TubeInfo { get; private set; } = "";

		public string PlacementInfo { get; private set; } = "";

		public bool Mirrored => side < 0;

		public float Offset => offset;

		public static void Attach(ExtractionPoint point)
		{
			//IL_0005: 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)
			GameObject val = new GameObject("ManualExtractButton");
			val.transform.SetParent(((Component)point).transform, false);
			val.AddComponent<ExtractButton>().ep = point;
		}

		private void Start()
		{
			try
			{
				Build();
				built = true;
				ExtractionGate.SetButtonWorking(ep, working: true);
			}
			catch (Exception arg)
			{
				Plugin.Log.LogError((object)$"Button build failed, using the normal countdown: {arg}");
			}
		}

		private void Build()
		{
			//IL_001e: 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_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Expected O, but got Unknown
			//IL_0093: 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_00c3: 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_00f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0102: 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_0141: 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_0171: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0208: Unknown result type (might be due to invalid IL or missing references)
			//IL_0242: Unknown result type (might be due to invalid IL or missing references)
			//IL_0268: Unknown result type (might be due to invalid IL or missing references)
			//IL_030b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0331: Unknown result type (might be due to invalid IL or missing references)
			//IL_0360: Unknown result type (might be due to invalid IL or missing references)
			//IL_0386: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_03db: Unknown result type (might be due to invalid IL or missing references)
			//IL_0437: Unknown result type (might be due to invalid IL or missing references)
			//IL_043c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0451: Unknown result type (might be due to invalid IL or missing references)
			//IL_0456: Unknown result type (might be due to invalid IL or missing references)
			//IL_0468: Unknown result type (might be due to invalid IL or missing references)
			//IL_046d: Unknown result type (might be due to invalid IL or missing references)
			//IL_047e: 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_04a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_04c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0501: 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_053c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0562: Unknown result type (might be due to invalid IL or missing references)
			//IL_058d: Unknown result type (might be due to invalid IL or missing references)
			//IL_05b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_05de: Unknown result type (might be due to invalid IL or missing references)
			//IL_0608: 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_0645: Unknown result type (might be due to invalid IL or missing references)
			//IL_0665: Unknown result type (might be due to invalid IL or missing references)
			//IL_0674: Unknown result type (might be due to invalid IL or missing references)
			//IL_0699: Unknown result type (might be due to invalid IL or missing references)
			//IL_06bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_06dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0706: Unknown result type (might be due to invalid IL or missing references)
			//IL_0734: Unknown result type (might be due to invalid IL or missing references)
			//IL_0772: Unknown result type (might be due to invalid IL or missing references)
			//IL_0786: Unknown result type (might be due to invalid IL or missing references)
			//IL_07c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_07d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_07ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_07f3: Expected O, but got Unknown
			//IL_0828: Unknown result type (might be due to invalid IL or missing references)
			//IL_0838: Unknown result type (might be due to invalid IL or missing references)
			//IL_083d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0842: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_08fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_090b: Unknown result type (might be due to invalid IL or missing references)
			//IL_091f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0924: Unknown result type (might be due to invalid IL or missing references)
			//IL_0879: Unknown result type (might be due to invalid IL or missing references)
			//IL_087e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0882: Unknown result type (might be due to invalid IL or missing references)
			//IL_088e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0893: Unknown result type (might be due to invalid IL or missing references)
			//IL_0897: Unknown result type (might be due to invalid IL or missing references)
			//IL_08b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_08c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0955: Unknown result type (might be due to invalid IL or missing references)
			//IL_095a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0965: Unknown result type (might be due to invalid IL or missing references)
			//IL_09a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_09c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_09ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a1e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a44: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a73: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a99: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ac8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0aee: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b1d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b43: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b85: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bb4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bda: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c07: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c16: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c4b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c57: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c5e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c72: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c77: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c7c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c81: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ca8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cb9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cbe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cfc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d0d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d12: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d4c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d5d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d62: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d7d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0da4: