Decompiled source of cheat2 v69.2.0

LethalCompanyModMenu.dll

Decompiled 8 months ago
using System;
using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Globalization;
using System.Linq;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using GameNetcodeStuff;
using HarmonyLib;
using LethalCompanyModMenu.Managers;
using Unity.Netcode;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.InputSystem;
using UnityEngine.InputSystem.Controls;
using UnityEngine.Rendering.HighDefinition;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("LethalCompanyMenu")]
[assembly: AssemblyDescription("Menu")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("MAMA")]
[assembly: AssemblyProduct("LethalCompanyTroll")]
[assembly: AssemblyCopyright("Copyright ©  2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("fe119c12-2e5b-4275-92f6-6e92e3266f8e")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8.1", FrameworkDisplayName = ".NET Framework 4.8.1")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace LethalCompanyModMenu
{
	[BepInPlugin("PDK.LethalCompany.CustomFatPP", "BigPP", "2.3.0")]
	public class MyTrollMod : BaseUnityPlugin
	{
		public enum Submenu
		{
			None,
			Company,
			Player,
			World,
			Host,
			Dungeon,
			Settings,
			CoHost,
			ConfigManager
		}

		[Serializable]
		[CompilerGenerated]
		private sealed class <>c
		{
			public static readonly <>c <>9 = new <>c();

			public static Func<PlayerControllerB, bool> <>9__136_0;

			public static UnityAction <>9__208_0;

			public static UnityAction <>9__208_3;

			public static UnityAction <>9__208_4;

			public static UnityAction <>9__208_5;

			internal bool <GetRealPlayerScripts>b__136_0(PlayerControllerB x)
			{
				if (!x.isPlayerDead)
				{
					return x.isPlayerControlled;
				}
				return true;
			}

			internal void <FactoryMenu>b__208_0()
			{
				SteamValveHazard[] array = Object.FindObjectsOfType<SteamValveHazard>();
				foreach (SteamValveHazard val in array)
				{
					val.FixValveServerRpc();
				}
			}

			internal void <FactoryMenu>b__208_3()
			{
				Landmine[] array = Object.FindObjectsOfType<Landmine>();
				foreach (Landmine val in array)
				{
					if (!val.hasExploded)
					{
						val.ExplodeMineServerRpc();
					}
				}
			}

			internal void <FactoryMenu>b__208_4()
			{
				DoorLock[] array = Object.FindObjectsOfType<DoorLock>();
				foreach (DoorLock val in array)
				{
					val.UnlockDoorSyncWithServer();
				}
			}

			internal void <FactoryMenu>b__208_5()
			{
				EnemyAI[] array = Object.FindObjectsOfType<EnemyAI>();
				foreach (EnemyAI val in array)
				{
					val.HitEnemyServerRpc(10000, 0, true);
					val.KillEnemyServerRpc(true);
				}
			}
		}

		public const string pluginGuid = "PDK.LethalCompany.CustomFatPP";

		public const string pluginName = "BigPP";

		public const string pluginVersion = "2.3.0";

		private Harmony harmony;

		private CustomMenuGUI WorldMenuGUI;

		private CustomMenuGUI MainMenuGUI;

		private CustomMenuGUI CompanyMenuGUI;

		private CustomMenuGUI HostMenuGUI;

		private CustomMenuGUI CoHostMenuGUI;

		private CustomMenuGUI DungeonMenuGUI;

		private CustomMenuGUI PlayerMenuGUI;

		private CustomMenuGUI SettingsGUI;

		private CustomMenuGUI ConfigMenuGUI;

		private bool toggleState = true;

		private PlayerControllerB selectedPlayer;

		private int lightinterval;

		private int screeninterval;

		private int suitFlickerinterval;

		private bool LightState;

		private bool ScreenState;

		private bool LightFlickerToggle;

		private bool DisplayInfoToggle;

		private bool SuitFlicker;

		private bool FactoryLights;

		public string mockMSG = "";

		public string ServermockMSG = "";

		public string SignalmockMSG = "";

		public int planetIndex;

		public int mobIndex;

		public int playerTpIndex;

		public int ItemSpawnIndex;

		public bool doortog;

		public bool itemtog;

		public bool ScreenTog;

		public bool HangerDoorTog;

		public bool TurretTog;

		public bool nightVisionTog;

		public bool isFreeCameratog;

		public bool EnableTestRoom;

		public bool AllowLocalPlayerDeath = true;

		public bool InfSprintTog;

		public bool InfAmmo;

		public bool InfBattery;

		public bool NameTog;

		public bool SpectateTog;

		public bool ShowItemListTog;

		public bool ItemESP;

		public bool PlayerESP;

		public bool EnemyESP;

		public float orbitSpeed = 10f;

		public PlayerControllerB spectatedPlayer;

		public string credits = "";

		public int creds;

		public int audio_index;

		public int audio_indexPlayer;

		public int DamagePlayerAmount;

		public int HealPlayerAmount;

		public float grabDistance = 5f;

		public float Speedy = 5f;

		public bool speedCheat;

		public int suit_index;

		public Dictionary<int, bool> rainbowSuitDictionary = new Dictionary<int, bool>();

		private Transform SelectedPlayerTransform;

		private PlayerControllerB OrbitPlayer;

		public Vector3 original;

		private Vector3 Mark;

		public int NightVisionIntensity = 50;

		public int NightVisionRange = 12;

		public bool newNightTog;

		public float companyBuyingRate;

		public Vector4 rgba = new Vector4(1f, 1f, 1f, 1f);

		public Vector4 rgba2 = new Vector4(1f, 1f, 1f, 1f);

		public bool NoClip;

		private Submenu currentSubmenu;

		private bool settingsOn;

		private bool DisableToolTips;

		public bool DeathNotif;

		public bool BroadcastName;

		private static int VK_Toggle;

		private static int VK_Cursor;

		private ConfigEntry<int> VK_ToggleConfigEntry;

		private ConfigEntry<int> VK_CursorConfigEntry;

		private ConfigEntry<int> MainMenuXConfigEntry;

		private ConfigEntry<int> MainMenuYConfigEntry;

		private ConfigEntry<int> CompanyXConfigEntry;

		private ConfigEntry<int> CompanyYConfigEntry;

		private ConfigEntry<int> PlayerXConfigEntry;

		private ConfigEntry<int> PlayerYConfigEntry;

		private ConfigEntry<int> WorldXConfigEntry;

		private ConfigEntry<int> WorldYConfigEntry;

		private ConfigEntry<int> HostXConfigEntry;

		private ConfigEntry<int> HostYConfigEntry;

		private ConfigEntry<int> DungeonXConfigEntry;

		private ConfigEntry<int> DungeonYConfigEntry;

		private ConfigEntry<int> ConfigXConfigEntry;

		private ConfigEntry<int> ConfigYConfigEntry;

		private ConfigEntry<bool> DisableToolTipsConfigEntry;

		private ConfigEntry<bool> NightVisionConfigEntry;

		private ConfigEntry<bool> GodModeConfigEntry;

		private ConfigEntry<bool> InfAmmoConfigEntry;

		private ConfigEntry<bool> InfSprintConfigEntry;

		private ConfigEntry<bool> InfBatteryConfigEntry;

		private ConfigEntry<bool> EnemyESPConfigEntry;

		private ConfigEntry<bool> ItemESPConfigEntry;

		private ConfigEntry<bool> PlayerESPConfigEntry;

		private ConfigEntry<float> grabDistanceConfigEntry;

		private ConfigEntry<Vector4> rgbConfigEntry;

		private ConfigEntry<Vector4> rgb2ConfigEntry;

		public static MyTrollMod instance;

		public ManualLogSource MyLogger;

		public PlayerControllerB MyPlayer;

		public ulong MySteamId;

		private PlayerControllerB[] RealPlayerScripts;

		private StartOfRound StartOfRoundInstance;

		private ShipLights ShipLightsInstance;

		private ManualCameraRenderer ManualCameraRendererInstance;

		private SoundManager SoundManagerInstance;

		private RoundManager RoundManagerInstance;

		private DepositItemsDesk DepositItemsDeskInstance;

		private HUDManager HUDManagerInstance;

		private Terminal TerminalInstance;

		private QuickMenuManager QuickMenuManagerInstance;

		private TimeOfDay TimeOfDayInstance;

		private StartMatchLever StartMatchLeverInstance;

		private GrabbableObject[] GrabbableObjects = (GrabbableObject[])(object)new GrabbableObject[0];

		private List<UnlockableSuit> UnlockableSuitList = new List<UnlockableSuit>();

		private List<GameObject> spawnedObjects = new List<GameObject>();

		private EnemyAI[] Enemies;

		private Turret[] Turrets;

		private Landmine[] Landmines;

		private int esprefresh = 300;

		private CharacterController MyCharacterController;

		public float MyCharacterControllerRadius;

		private bool InGame;

		private bool HasUpdated;

		public Camera FreeCamera;

		public GameObject lightHolder;

		public AudioListener ears;

		public AudioListener MegaEars;

		public Light light;

		private bool InFreeCam;

		public float defaultVoiceRange;

		public bool IsDumboEars;

		private Vector3 rotateValue = Vector3.zero;

		private int CoHostId;

		public string CoHostNames = "";

		private int PlayerMenuTimer = 144;

		private int SpawnableMapObjectIndex;

		public int ChallengeVal;

		public bool itemsOrbit;

		private int playerxp;

		public bool shooty;

		private int firerate = 144;

		private int firerateRefresh;

		private Vector2 scrollPosition = Vector2.zero;

		public Item itemToSpawn;

		private int tempIndex;

		private EnemyType enemyType;

		public bool CursorTog;

		[DllImport("user32.dll")]
		private static extern short GetAsyncKeyState(int vKey);

		public void Awake()
		{
			//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fb: Expected O, but got Unknown
			//IL_04b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_04e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0504: Unknown result type (might be due to invalid IL or missing references)
			//IL_0509: Unknown result type (might be due to invalid IL or missing references)
			//IL_0515: Unknown result type (might be due to invalid IL or missing references)
			//IL_051a: Unknown result type (might be due to invalid IL or missing references)
			instance = this;
			CreateFreeCam();
			CreateDumboEars();
			WorldMenuGUI = ((Component)this).gameObject.AddComponent<CustomMenuGUI>();
			MainMenuGUI = ((Component)this).gameObject.AddComponent<CustomMenuGUI>();
			CompanyMenuGUI = ((Component)this).gameObject.AddComponent<CustomMenuGUI>();
			HostMenuGUI = ((Component)this).gameObject.AddComponent<CustomMenuGUI>();
			MainMenuGUI.X = 0;
			CoHostMenuGUI = ((Component)this).gameObject.AddComponent<CustomMenuGUI>();
			CoHostMenuGUI.X = 0;
			DungeonMenuGUI = ((Component)this).gameObject.AddComponent<CustomMenuGUI>();
			PlayerMenuGUI = ((Component)this).gameObject.AddComponent<CustomMenuGUI>();
			SettingsGUI = ((Component)this).gameObject.AddComponent<CustomMenuGUI>();
			SettingsGUI.X = 550;
			SettingsGUI.Y = 0;
			ConfigMenuGUI = ((Component)this).gameObject.AddComponent<CustomMenuGUI>();
			ConfigMenuGUI.X = 0;
			harmony = new Harmony("BigPP");
			harmony.PatchAll();
			VK_ToggleConfigEntry = ((BaseUnityPlugin)this).Config.Bind<int>("General", "VK_Toggle", 161, "Key for showing menu https://cherrytree.at/misc/vk.htm");
			VK_CursorConfigEntry = ((BaseUnityPlugin)this).Config.Bind<int>("General", "VK_Cursor", 164, "Key for showing cursor https://cherrytree.at/misc/vk.htm");
			MainMenuXConfigEntry = ((BaseUnityPlugin)this).Config.Bind<int>("Menu Settings", "MainMenuXConfigEntry", 0, "The x location where this menu will appear");
			MainMenuYConfigEntry = ((BaseUnityPlugin)this).Config.Bind<int>("Menu Settings", "MainMenuYConfigEntry", 10, "The y location where this menu will appear");
			WorldXConfigEntry = ((BaseUnityPlugin)this).Config.Bind<int>("Menu Settings", "WorldXConfigEntry", 200, "The x location where this menu will appear");
			WorldYConfigEntry = ((BaseUnityPlugin)this).Config.Bind<int>("Menu Settings", "WorldYConfigEntry", 10, "The y location where this menu will appear");
			CompanyXConfigEntry = ((BaseUnityPlugin)this).Config.Bind<int>("Menu Settings", "CompanyXConfigEntry", 200, "The x location where this menu will appear");
			CompanyYConfigEntry = ((BaseUnityPlugin)this).Config.Bind<int>("Menu Settings", "CompanyYConfigEntry", 10, "The y location where this menu will appear");
			PlayerXConfigEntry = ((BaseUnityPlugin)this).Config.Bind<int>("Menu Settings", "PlayerXConfigEntry", 200, "The x location where this menu will appear");
			PlayerYConfigEntry = ((BaseUnityPlugin)this).Config.Bind<int>("Menu Settings", "PlayerYConfigEntry", 10, "The y location where this menu will appear");
			HostXConfigEntry = ((BaseUnityPlugin)this).Config.Bind<int>("Menu Settings", "HostXConfigEntry", 200, "The x location where this menu will appear");
			HostYConfigEntry = ((BaseUnityPlugin)this).Config.Bind<int>("Menu Settings", "HostYConfigEntry", 10, "The y location where this menu will appear");
			DungeonXConfigEntry = ((BaseUnityPlugin)this).Config.Bind<int>("Menu Settings", "DungeonXConfigEntry", 200, "The x location where this menu will appear");
			DungeonYConfigEntry = ((BaseUnityPlugin)this).Config.Bind<int>("Menu Settings", "DungeonYConfigEntry", 10, "The y location where this menu will appear");
			ConfigXConfigEntry = ((BaseUnityPlugin)this).Config.Bind<int>("Menu Settings", "DungeonXConfigEntry", 200, "The x location where this menu will appear");
			ConfigYConfigEntry = ((BaseUnityPlugin)this).Config.Bind<int>("Menu Settings", "DungeonYConfigEntry", 10, "The y location where this menu will appear");
			DisableToolTipsConfigEntry = ((BaseUnityPlugin)this).Config.Bind<bool>("Settings", "DisableToolTips", false, "Display controls for items in top left");
			NightVisionConfigEntry = ((BaseUnityPlugin)this).Config.Bind<bool>("Settings", "Enable night vision", false, "Alway enable night vision");
			GodModeConfigEntry = ((BaseUnityPlugin)this).Config.Bind<bool>("Settings", "Allow Local Player death", true, "Alway enable GodMode");
			InfAmmoConfigEntry = ((BaseUnityPlugin)this).Config.Bind<bool>("Settings", "Enable Inf ammo", false, "Alway enable inf ammo");
			InfSprintConfigEntry = ((BaseUnityPlugin)this).Config.Bind<bool>("Settings", "Enable Inf sprint", false, "Alway enable inf sprint");
			InfBatteryConfigEntry = ((BaseUnityPlugin)this).Config.Bind<bool>("Settings", "Enable Inf battery", false, "Alway enable inf battery");
			EnemyESPConfigEntry = ((BaseUnityPlugin)this).Config.Bind<bool>("Settings", "Enable Inf battery", false, "Alway enable inf battery");
			ItemESPConfigEntry = ((BaseUnityPlugin)this).Config.Bind<bool>("Settings", "Enable Inf battery", false, "Alway enable inf battery");
			PlayerESPConfigEntry = ((BaseUnityPlugin)this).Config.Bind<bool>("Settings", "Enable Inf battery", false, "Alway enable inf battery");
			grabDistanceConfigEntry = ((BaseUnityPlugin)this).Config.Bind<float>("Settings", "GrabDistance", 5f, "How far you can grab objects");
			rgbConfigEntry = ((BaseUnityPlugin)this).Config.Bind<Vector4>("Menu Settings", "Menu RGBA", new Vector4(1f, 1f, 1f, 1f), "The Color and alpha Of the menu");
			rgb2ConfigEntry = ((BaseUnityPlugin)this).Config.Bind<Vector4>("Menu Settings", "Menu Text RGBA", new Vector4(1f, 1f, 1f, 1f), "The Color and alpha Of the menu");
			rgba = rgbConfigEntry.Value;
			rgba2 = rgb2ConfigEntry.Value;
			DisableToolTips = DisableToolTipsConfigEntry.Value;
			newNightTog = NightVisionConfigEntry.Value;
			AllowLocalPlayerDeath = GodModeConfigEntry.Value;
			InfAmmo = InfAmmoConfigEntry.Value;
			InfSprintTog = InfSprintConfigEntry.Value;
			InfBattery = InfBatteryConfigEntry.Value;
			ItemESP = ItemESPConfigEntry.Value;
			PlayerESP = PlayerESPConfigEntry.Value;
			EnemyESP = EnemyESPConfigEntry.Value;
			grabDistance = grabDistanceConfigEntry.Value;
			VK_Toggle = VK_ToggleConfigEntry.Value;
			VK_Cursor = VK_CursorConfigEntry.Value;
			WorldMenuGUI.X = WorldXConfigEntry.Value;
			WorldMenuGUI.Y = WorldYConfigEntry.Value;
			MainMenuGUI.X = MainMenuXConfigEntry.Value;
			MainMenuGUI.Y = MainMenuYConfigEntry.Value;
			CompanyMenuGUI.X = CompanyXConfigEntry.Value;
			CompanyMenuGUI.Y = CompanyYConfigEntry.Value;
			PlayerMenuGUI.X = PlayerXConfigEntry.Value;
			PlayerMenuGUI.Y = PlayerYConfigEntry.Value;
			HostMenuGUI.X = HostXConfigEntry.Value;
			HostMenuGUI.Y = HostYConfigEntry.Value;
			DungeonMenuGUI.X = DungeonXConfigEntry.Value;
			DungeonMenuGUI.Y = DungeonYConfigEntry.Value;
			ConfigMenuGUI.X = ConfigXConfigEntry.Value;
			ConfigMenuGUI.Y = ConfigYConfigEntry.Value;
		}

		[HarmonyPatch(typeof(PlayerControllerB), "KillPlayerServerRpc")]
		[HarmonyPrefix]
		public static void KillPlayerServerRpcPrefix(PlayerControllerB __instance, int playerId, bool spawnBody, Vector3 bodyVelocity, int causeOfDeath, int deathAnimation)
		{
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			MethodInfo method = typeof(PlayerControllerB).GetMethod("KillPlayerServerRpc", BindingFlags.Instance | BindingFlags.NonPublic);
			if (method != null)
			{
				method.Invoke(__instance, new object[5] { playerId, spawnBody, bodyVelocity, causeOfDeath, deathAnimation });
			}
			else
			{
				Debug.LogError((object)"KillPlayerServerRpcPrefix method not found!");
			}
		}

		[HarmonyPatch(typeof(PlayerControllerB), "KillPlayerClientRpc")]
		[HarmonyPrefix]
		public static void KillPlayerClientRpcPrefix(PlayerControllerB __instance, int playerId, bool spawnBody, Vector3 bodyVelocity, int causeOfDeath, int deathAnimation)
		{
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			MethodInfo method = typeof(PlayerControllerB).GetMethod("KillPlayerClientRpc", BindingFlags.Instance | BindingFlags.NonPublic);
			if (method != null)
			{
				method.Invoke(__instance, new object[5] { playerId, spawnBody, bodyVelocity, causeOfDeath, deathAnimation });
			}
			else
			{
				Debug.LogError((object)"KillPlayerClientRpcPrefix method not found!");
			}
		}

		[HarmonyPatch(typeof(GrabbableObject), "ActivateItemServerRpc")]
		[HarmonyPrefix]
		public static void ActivateItemServerRpcPrefix(GrabbableObject __instance, bool onOff, bool buttonDown)
		{
			MethodInfo method = typeof(GrabbableObject).GetMethod("ActivateItemServerRpc", BindingFlags.Instance | BindingFlags.NonPublic);
			if (method != null)
			{
				method.Invoke(__instance, new object[2] { onOff, buttonDown });
			}
			else
			{
				Debug.LogError((object)"ActivateItemServerRpcPrefix method not found!");
			}
		}

		[HarmonyPatch(typeof(PlayerControllerB), "GrabObjectServerRpc")]
		[HarmonyPrefix]
		public static void GrabObjectServerRpcPrefix(PlayerControllerB __instance, NetworkObjectReference grabbedObject)
		{
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			MethodInfo method = typeof(PlayerControllerB).GetMethod("GrabObjectServerRpc", BindingFlags.Instance | BindingFlags.NonPublic);
			if (method != null)
			{
				method.Invoke(__instance, new object[1] { grabbedObject });
			}
			else
			{
				Debug.LogError((object)"GrabObjectServerRpcPrefix method not found!");
			}
		}

		[HarmonyPatch(typeof(StartOfRound), "OnPlayerConnectedClientRpc")]
		[HarmonyPrefix]
		public static void OnPlayerConnectedClientRpcPrefix(StartOfRound __instance, ulong clientId, int connectedPlayers, ulong[] connectedPlayerIdsOrdered, int assignedPlayerObjectId, int serverMoneyAmount, int levelID, int profitQuota, int timeUntilDeadline, int quotaFulfilled, int randomSeed)
		{
			MethodInfo method = typeof(StartOfRound).GetMethod("OnPlayerConnectedClientRpc", BindingFlags.Instance | BindingFlags.NonPublic);
			if (method != null)
			{
				method.Invoke(__instance, new object[10] { clientId, connectedPlayers, connectedPlayerIdsOrdered, assignedPlayerObjectId, serverMoneyAmount, levelID, profitQuota, timeUntilDeadline, quotaFulfilled, randomSeed });
			}
			else
			{
				Debug.LogError((object)"OnPlayerConnectedClientRpcPrefix method not found!");
			}
		}

		private void FindAndPopulateGrabbableObjectList()
		{
			GrabbableObjects = Object.FindObjectsOfType<GrabbableObject>();
		}

		public static PlayerControllerB[] GetRealPlayerScripts(StartOfRound startOfRound)
		{
			if ((Object)(object)startOfRound == (Object)null || startOfRound.allPlayerScripts == null)
			{
				return (PlayerControllerB[])(object)new PlayerControllerB[0];
			}
			return startOfRound.allPlayerScripts.Where((PlayerControllerB x) => x.isPlayerDead || x.isPlayerControlled).ToArray();
		}

		public static bool WorldToScreen(Camera camera, Vector3 world, out Vector3 screen)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			screen = camera.WorldToViewportPoint(world);
			screen.x *= Screen.width;
			screen.y *= Screen.height;
			screen.y = (float)Screen.height - screen.y;
			return screen.z > 0f;
		}

		public void DrawBoxESP(Vector3 footpos, Vector3 headpos, Color color)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: 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_0063: 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_006f: Unknown result type (might be due to invalid IL or missing references)
			float num = headpos.y - footpos.y;
			float num2 = 2f;
			float num3 = num / num2;
			Render.DrawBox(footpos.x - num3 / 2f, (float)Screen.height - footpos.y - num, num3, num, color, 2f);
			Render.DrawLine(new Vector2((float)(Screen.width / 2), (float)(Screen.height / 2)), new Vector2(footpos.x, (float)Screen.height - footpos.y), color, 2f);
		}

		private void updateesplists()
		{
			if (esprefresh >= 300)
			{
				Enemies = Object.FindObjectsOfType<EnemyAI>();
				Turrets = Object.FindObjectsOfType<Turret>();
				Landmines = Object.FindObjectsOfType<Landmine>();
				FindAndPopulateGrabbableObjectList();
				esprefresh = 0;
			}
			esprefresh++;
		}

		private void EnemyEsp()
		{
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0191: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: 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_00f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ff: 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_0110: Unknown result type (might be due to invalid IL or missing references)
			//IL_0121: Unknown result type (might be due to invalid IL or missing references)
			//IL_0130: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01db: Unknown result type (might be due to invalid IL or missing references)
			if (!((Object)(object)RoundManager.Instance != (Object)null))
			{
				return;
			}
			EnemyAI[] enemies = Enemies;
			foreach (EnemyAI val in enemies)
			{
				try
				{
					string enemyName = val.enemyType.enemyName;
					if (WorldToScreen(GameNetworkManager.Instance.localPlayerController.gameplayCamera, ((Component)val).transform.position, out var screen))
					{
						Color contentColor = GUI.contentColor;
						GUI.contentColor = Color.red;
						GUI.Label(new Rect(screen.x, screen.y, 100f, 100f), enemyName);
						GUI.contentColor = contentColor;
					}
				}
				catch (Exception ex)
				{
					Debug.LogError((object)("Error processing enemy: " + ex.Message));
				}
			}
			Turret[] turrets = Turrets;
			foreach (Turret val2 in turrets)
			{
				try
				{
					if (WorldToScreen(GameNetworkManager.Instance.localPlayerController.gameplayCamera, ((Component)val2).transform.position, out var screen2))
					{
						Color contentColor2 = GUI.contentColor;
						GUI.contentColor = Color.red;
						GUI.Label(new Rect(screen2.x, screen2.y, 100f, 100f), "turret");
						GUI.contentColor = contentColor2;
					}
				}
				catch (Exception ex2)
				{
					Debug.LogError((object)("Error processing enemy: " + ex2.Message));
				}
			}
			Landmine[] landmines = Landmines;
			foreach (Landmine val3 in landmines)
			{
				try
				{
					if (WorldToScreen(GameNetworkManager.Instance.localPlayerController.gameplayCamera, ((Component)val3).transform.position, out var screen3))
					{
						Color contentColor3 = GUI.contentColor;
						GUI.contentColor = Color.red;
						GUI.Label(new Rect(screen3.x, screen3.y, 100f, 100f), "landmine");
						GUI.contentColor = contentColor3;
					}
				}
				catch (Exception ex3)
				{
					Debug.LogError((object)("Error processing enemy: " + ex3.Message));
				}
			}
		}

		private void ItemEsp()
		{
			//IL_0079: 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_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_009f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
			GrabbableObject[] grabbableObjects = GrabbableObjects;
			foreach (GrabbableObject val in grabbableObjects)
			{
				try
				{
					string text = "Object";
					if ((Object)(object)val.itemProperties != (Object)null && val.itemProperties.itemName != null)
					{
						text = val.itemProperties.itemName;
						int creditsWorth = val.itemProperties.creditsWorth;
						text = text + " (" + creditsWorth + ")";
					}
					if (WorldToScreen(GameNetworkManager.Instance.localPlayerController.gameplayCamera, ((Component)val).transform.position, out var screen))
					{
						Color contentColor = GUI.contentColor;
						GUI.contentColor = Color.green;
						GUI.Label(new Rect(screen.x, screen.y, 100f, 25f), text);
						GUI.contentColor = contentColor;
					}
				}
				catch (Exception ex)
				{
					Debug.LogError((object)("Error processing grabbable object: " + ex.Message));
					FindAndPopulateGrabbableObjectList();
				}
			}
		}

		private void PlayerEsp()
		{
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: 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_0056: 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_006e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0079: Unknown result type (might be due to invalid IL or missing references)
			PlayerControllerB[] realPlayerScripts = RealPlayerScripts;
			foreach (PlayerControllerB val in realPlayerScripts)
			{
				try
				{
					string playerUsername = val.playerUsername;
					if (WorldToScreen(GameNetworkManager.Instance.localPlayerController.gameplayCamera, ((Component)val.playerGlobalHead).transform.position, out var screen))
					{
						Color contentColor = GUI.contentColor;
						GUI.contentColor = Color.blue;
						GUI.Label(new Rect(screen.x, screen.y, 100f, 25f), playerUsername);
						GUI.contentColor = contentColor;
					}
				}
				catch (Exception ex)
				{
					Debug.LogError((object)("Error processing player: " + ex.Message));
				}
			}
		}

		private void EspCheck()
		{
			if (EnemyESP || ItemESP)
			{
				updateesplists();
			}
			if (EnemyESP)
			{
				EnemyEsp();
			}
			if (ItemESP)
			{
				ItemEsp();
			}
			if (PlayerESP)
			{
				PlayerEsp();
			}
		}

		private void InfiniteAmmo()
		{
			if (!((Object)(object)MyPlayer != (Object)null) || MyPlayer.ItemSlots == null)
			{
				return;
			}
			GrabbableObject[] itemSlots = MyPlayer.ItemSlots;
			foreach (GrabbableObject val in itemSlots)
			{
				if ((Object)(object)val != (Object)null && (Object)(object)((Component)val).GetComponent<ShotgunItem>() != (Object)null)
				{
					((Component)val).GetComponent<ShotgunItem>().shellsLoaded = 2;
				}
			}
		}

		private void InfiniteBattery()
		{
			if (!((Object)(object)MyPlayer != (Object)null) || MyPlayer.ItemSlots == null)
			{
				return;
			}
			GrabbableObject[] itemSlots = MyPlayer.ItemSlots;
			foreach (GrabbableObject val in itemSlots)
			{
				if ((Object)(object)val != (Object)null && val.insertedBattery != null)
				{
					val.insertedBattery.empty = false;
					val.insertedBattery.charge = 100f;
				}
			}
		}

		private void newNightTogfunc()
		{
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			lightHolder.SetActive(true);
			((Component)light).transform.localEulerAngles = new Vector3(((Component)MyPlayer).transform.localEulerAngles.x + 90f, ((Component)MyPlayer).transform.localEulerAngles.y, 0f);
		}

		public void OnClientDisconnectCallbackHandler(ulong clientId)
		{
			try
			{
				((BaseUnityPlugin)this).Logger.LogInfo((object)("Received callback for client disconnect. ClientId:" + clientId));
				RealPlayerScripts = GetRealPlayerScripts(StartOfRoundInstance);
			}
			catch (Exception ex)
			{
				((BaseUnityPlugin)this).Logger.LogInfo((object)("Error in OnClientDisconnectCallbackHandler: " + ex.Message));
			}
		}

		public void OnClientConnectCallbackHandler(ulong clientId)
		{
			try
			{
				((BaseUnityPlugin)this).Logger.LogInfo((object)("Received callback for client connect. ClientId:" + clientId));
				RealPlayerScripts = GetRealPlayerScripts(StartOfRoundInstance);
			}
			catch (Exception ex)
			{
				((BaseUnityPlugin)this).Logger.LogInfo((object)("Error in OnClientConnectCallbackHandler: " + ex.Message));
			}
		}

		public void OnPlayerDCCallbackHandler(int playerObjectNumber, ulong clientId)
		{
			try
			{
				((BaseUnityPlugin)this).Logger.LogInfo((object)("Received callback for OnPlayerDC disconnect. ClientId:" + clientId));
				RealPlayerScripts = GetRealPlayerScripts(StartOfRoundInstance);
			}
			catch (Exception ex)
			{
				((BaseUnityPlugin)this).Logger.LogInfo((object)("Error in OnClientDisconnectCallbackHandler: " + ex.Message));
			}
		}

		public void OnPlayerConnectedClientRpcCallbackHandler(ulong clientId, int connectedPlayers, ulong[] connectedPlayerIdsOrdered, int assignedPlayerObjectId, int serverMoneyAmount, int levelID, int profitQuota, int timeUntilDeadline, int quotaFulfilled, int randomSeed)
		{
			try
			{
				((BaseUnityPlugin)this).Logger.LogInfo((object)("Received callback for OnPlayerConnectedClientRpc disconnect. ClientId:" + clientId));
				RealPlayerScripts = GetRealPlayerScripts(StartOfRoundInstance);
			}
			catch (Exception ex)
			{
				((BaseUnityPlugin)this).Logger.LogInfo((object)("Error in OnClientDisconnectCallbackHandler: " + ex.Message));
			}
		}

		private void PlayerUpdates()
		{
			StartOfRoundInstance.allowLocalPlayerDeath = AllowLocalPlayerDeath;
			MyPlayer = GameNetworkManager.Instance.localPlayerController;
			if (!((Object)(object)MyPlayer == (Object)null))
			{
				if (InfSprintTog)
				{
					MyPlayer.sprintMeter = 100f;
				}
				if (speedCheat)
				{
					MyPlayer.movementSpeed = Speedy;
				}
				if (NoClip)
				{
					NoClipSetup();
				}
				if (InFreeCam && !CursorTog)
				{
					UpdateFreeCam();
				}
				if (InfAmmo)
				{
					InfiniteAmmo();
				}
				if (newNightTog)
				{
					newNightTogfunc();
				}
				if (shooty)
				{
					shootlol();
				}
				if (InfBattery)
				{
					InfiniteBattery();
				}
				if (itemsOrbit)
				{
					itemsorbiting();
				}
				if (IsDumboEars)
				{
					setPlayersCurrentVoiceChatAudioSourceDistance();
				}
			}
		}

		private void itemsorbiting()
		{
			//IL_0078: 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_0084: 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_0096: Unknown result type (might be due to invalid IL or missing references)
			//IL_0098: 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_00a4: 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_00c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
			if (!((Object)(object)OrbitPlayer == (Object)null) && Object.FindObjectsOfType<PlaceableShipObject>() != null)
			{
				PlaceableShipObject[] array = Object.FindObjectsOfType<PlaceableShipObject>();
				int num = 0;
				PlaceableShipObject[] array2 = array;
				foreach (PlaceableShipObject val in array2)
				{
					num++;
					float num2 = 5f;
					orbitSpeed = 10f;
					float num3 = Time.time * orbitSpeed + (float)num * ((float)Math.PI * 2f / (float)Object.FindObjectsOfType<PlaceableShipObject>().Length);
					Vector3 val2 = new Vector3(Mathf.Cos(num3), 0.5f, Mathf.Sin(num3)) * num2;
					Vector3 val3 = ((Component)OrbitPlayer).transform.position + val2;
					ShipBuildModeManager.Instance.PlaceShipObject(val3, new Vector3(-90f, 90f, 90f), val, false);
					ShipBuildModeManager.Instance.PlaceShipObjectServerRpc(val3, new Vector3(-90f, 90f, 90f), NetworkObjectReference.op_Implicit(((Component)val.parentObject).GetComponent<NetworkObject>()), (int)MyPlayer.actualClientId);
				}
				num = 0;
			}
		}

		private void NoClipSetup()
		{
			StartOfRoundInstance.allowLocalPlayerDeath = false;
			MyCharacterController = ((Component)MyPlayer).GetComponent<CharacterController>();
			Rigidbody component = ((Component)MyPlayer).GetComponent<Rigidbody>();
			if (MyCharacterControllerRadius == 0f)
			{
				MyCharacterControllerRadius = MyCharacterController.radius;
			}
			((Collider)MyCharacterController).enabled = !NoClip;
			MyPlayer.isInHangarShipRoom = false;
			MyCharacterController.radius = float.PositiveInfinity;
			component.useGravity = false;
			component.isKinematic = true;
			NoClipMovement();
		}

		public void NoClipMovement()
		{
			//IL_007f: 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_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bb: 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_00c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e9: 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_0063: Unknown result type (might be due to invalid IL or missing references)
			float num = 20f;
			if (((ButtonControl)Keyboard.current.leftShiftKey).isPressed)
			{
				num *= 2f;
			}
			Vector2 val = (((ButtonControl)Keyboard.current.wKey).isPressed ? Vector2.up : (((ButtonControl)Keyboard.current.sKey).isPressed ? Vector2.down : (((ButtonControl)Keyboard.current.aKey).isPressed ? Vector2.left : (((ButtonControl)Keyboard.current.dKey).isPressed ? Vector2.right : Vector2.zero))));
			float num2 = 0f;
			if (((ButtonControl)Keyboard.current.spaceKey).isPressed)
			{
				num2 = 0.75f;
			}
			else if (((ButtonControl)Keyboard.current.leftCtrlKey).isPressed)
			{
				num2 = -0.75f;
			}
			Vector3 val2 = new Vector3(val.x, num2, val.y) * num * Time.deltaTime;
			((Component)MyPlayer).transform.Translate(val2);
		}

		private void NoClipDisable()
		{
			((Collider)MyCharacterController).enabled = true;
			MyCharacterController.radius = MyCharacterControllerRadius;
			StartOfRoundInstance.allowLocalPlayerDeath = AllowLocalPlayerDeath;
		}

		private void UnregCallbacks()
		{
			if ((Object)(object)Object.FindObjectOfType<NetworkManager>() != (Object)null)
			{
				Object.FindObjectOfType<NetworkManager>().OnClientConnectedCallback -= OnClientConnectCallbackHandler;
				Object.FindObjectOfType<NetworkManager>().OnClientDisconnectCallback -= OnClientDisconnectCallbackHandler;
				OnPlayerDCPatch.UnregisterOnPlayerDCCallback(OnPlayerDCCallbackHandler);
				OnPlayerConnectedClientRpcPatch.UnregisterOnPlayerConnectedClientRpcCallback(OnPlayerConnectedClientRpcCallbackHandler);
			}
		}

		private void RegisterCallbacks()
		{
			Object.FindObjectOfType<NetworkManager>().OnClientConnectedCallback += OnClientConnectCallbackHandler;
			Object.FindObjectOfType<NetworkManager>().OnClientDisconnectCallback += OnClientDisconnectCallbackHandler;
			OnPlayerDCPatch.RegisterOnPlayerDCCallback(OnPlayerDCCallbackHandler);
			OnPlayerConnectedClientRpcPatch.RegisterOnPlayerConnectedClientRpcCallback(OnPlayerConnectedClientRpcCallbackHandler);
		}

		private void CreateFreeCam()
		{
			//IL_0082: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Expected O, but got Unknown
			if ((Object)(object)FreeCamera == (Object)null)
			{
				FreeCamera = ((Component)this).gameObject.AddComponent<Camera>();
				((Behaviour)FreeCamera).enabled = false;
			}
			if ((Object)(object)FreeCamera != (Object)null)
			{
				((BaseUnityPlugin)this).Logger.LogInfo((object)"Added camera");
				FreeCamera.cullingMask = 20649983;
			}
			else
			{
				((BaseUnityPlugin)this).Logger.LogInfo((object)"Failed to add camera");
			}
			if ((Object)(object)lightHolder == (Object)null)
			{
				lightHolder = new GameObject("lightermfer");
				((Object)lightHolder).hideFlags = (HideFlags)61;
				Object.DontDestroyOnLoad((Object)(object)lightHolder);
				light = lightHolder.AddComponent<Light>();
				light.type = (LightType)1;
				lightHolder.AddComponent<HDAdditionalLightData>();
				((Component)light).gameObject.GetComponent<HDAdditionalLightData>().intensity = 10f;
				light.intensity = 50f;
				lightHolder.SetActive(false);
				((BaseUnityPlugin)this).Logger.LogInfo((object)"Light spawned");
			}
			if ((Object)(object)ears == (Object)null)
			{
				((BaseUnityPlugin)this).Logger.LogInfo((object)"ears spawned");
				ears = ((Component)this).gameObject.AddComponent<AudioListener>();
				((Behaviour)ears).enabled = false;
			}
		}

		private void setPlayersCurrentVoiceChatAudioSourceDistance()
		{
			//IL_0072: 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)
			if (!((Object)(object)StartOfRound.Instance != (Object)null))
			{
				return;
			}
			if (defaultVoiceRange == 0f && (Object)(object)MyPlayer != (Object)null && (Object)(object)MyPlayer.currentVoiceChatAudioSource != (Object)null)
			{
				defaultVoiceRange = MyPlayer.currentVoiceChatAudioSource.maxDistance;
			}
			PlayerControllerB[] realPlayerScripts = RealPlayerScripts;
			foreach (PlayerControllerB val in realPlayerScripts)
			{
				if ((Object)(object)val != (Object)null)
				{
					float num = Vector3.Distance(((Component)val).transform.position, ((Component)MyPlayer).transform.position);
					if ((Object)(object)val.currentVoiceChatIngameSettings != (Object)null)
					{
						val.currentVoiceChatAudioSource.maxDistance = num + 5f;
					}
				}
			}
		}

		private void CreateDumboEars()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			MegaEars = new GameObject("Ears").AddComponent<AudioListener>();
			((Behaviour)MegaEars).enabled = false;
		}

		private void enableDumboEars()
		{
			if ((Object)(object)MegaEars == (Object)null)
			{
				CreateDumboEars();
			}
			((Behaviour)MegaEars).enabled = true;
			if ((Object)(object)ears != (Object)null)
			{
				((Behaviour)ears).enabled = false;
			}
			if ((Object)(object)MyPlayer != (Object)null && (Object)(object)MyPlayer.activeAudioListener != (Object)null)
			{
				((Behaviour)MyPlayer.activeAudioListener).enabled = false;
			}
		}

		private void DisableDumboEars()
		{
			if ((Object)(object)MegaEars != (Object)null)
			{
				((Behaviour)MegaEars).enabled = false;
			}
			if (InFreeCam)
			{
				if ((Object)(object)ears != (Object)null)
				{
					((Behaviour)ears).enabled = true;
				}
			}
			else if ((Object)(object)MyPlayer != (Object)null && (Object)(object)MyPlayer.activeAudioListener != (Object)null)
			{
				((Behaviour)MyPlayer.activeAudioListener).enabled = true;
			}
		}

		private void disableFreeCam()
		{
			MyCharacterController = ((Component)MyPlayer).GetComponent<CharacterController>();
			((Collider)MyCharacterController).enabled = true;
			((Behaviour)MyPlayer.activeAudioListener).enabled = true;
			((Behaviour)FreeCamera).enabled = false;
			((Behaviour)ears).enabled = false;
			lightHolder.SetActive(false);
		}

		private void EnableFreeCam()
		{
			//IL_0063: 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)
			newNightTog = false;
			MyCharacterController = ((Component)MyPlayer).GetComponent<CharacterController>();
			((Collider)MyCharacterController).enabled = false;
			((Behaviour)MyPlayer.activeAudioListener).enabled = false;
			((Behaviour)FreeCamera).enabled = true;
			lightHolder.SetActive(true);
			((Component)FreeCamera).transform.position = ((Component)MyCharacterController).transform.position;
			((Component)FreeCamera).transform.rotation = ((Component)MyCharacterController).transform.rotation;
			((Behaviour)ears).enabled = true;
		}

		private Transform GetMyTransform()
		{
			if (InFreeCam)
			{
				return ((Component)FreeCamera).transform;
			}
			return ((Component)MyPlayer).transform;
		}

		private void UpdateFreeCam()
		{
			//IL_0085: 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_007e: 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_00cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00da: Unknown result type (might be due to invalid IL or missing references)
			//IL_00df: 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_00f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_013d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0147: Unknown result type (might be due to invalid IL or missing references)
			//IL_014e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0154: Unknown result type (might be due to invalid IL or missing references)
			//IL_015a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0164: Unknown result type (might be due to invalid IL or missing references)
			//IL_0169: Unknown result type (might be due to invalid IL or missing references)
			//IL_0176: Unknown result type (might be due to invalid IL or missing references)
			//IL_0193: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bd: 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_0069: Unknown result type (might be due to invalid IL or missing references)
			float num = 20f;
			float num2 = 2f;
			if (((ButtonControl)Keyboard.current.leftShiftKey).isPressed)
			{
				num *= 2f;
			}
			Vector2 val = (((ButtonControl)Keyboard.current.wKey).isPressed ? Vector2.up : (((ButtonControl)Keyboard.current.sKey).isPressed ? Vector2.down : (((ButtonControl)Keyboard.current.aKey).isPressed ? Vector2.left : (((ButtonControl)Keyboard.current.dKey).isPressed ? Vector2.right : Vector2.zero))));
			float num3 = 0f;
			if (((ButtonControl)Keyboard.current.spaceKey).isPressed)
			{
				num3 = 0.75f;
			}
			else if (((ButtonControl)Keyboard.current.leftCtrlKey).isPressed)
			{
				num3 = -0.75f;
			}
			Vector2 val2 = ((InputControl<Vector2>)(object)((Pointer)Mouse.current).delta).ReadValue() * num2;
			rotateValue += new Vector3(0f - val2.y, val2.x, 0f) * 0.1f;
			rotateValue.x = Mathf.Clamp(rotateValue.x, -89f, 89f);
			((Component)FreeCamera).transform.eulerAngles = rotateValue;
			Vector3 val3 = new Vector3(val.x, num3, val.y) * num * Time.deltaTime;
			((Component)FreeCamera).transform.Translate(val3);
			((Component)light).transform.localEulerAngles = new Vector3(((Component)FreeCamera).transform.localEulerAngles.x + 90f, ((Component)FreeCamera).transform.localEulerAngles.y, 0f);
		}

		private void Update()
		{
			if ((Object)(object)StartOfRound.Instance == (Object)null)
			{
				RealPlayerScripts = null;
				UnregCallbacks();
				InGame = false;
				MyPlayer = null;
				selectedPlayer = null;
				currentSubmenu = Submenu.None;
				NoClip = false;
				return;
			}
			if (!InGame)
			{
				RoundManagerInstance = Object.FindObjectOfType<RoundManager>();
				RegisterCallbacks();
				((BaseUnityPlugin)this).Logger.LogInfo((object)"!Setting new lobby instances!");
				InGame = true;
				TimeOfDayInstance = Object.FindObjectOfType<TimeOfDay>();
				return;
			}
			if ((Object)(object)GameNetworkManager.Instance != (Object)null)
			{
				if (GameNetworkManager.Instance.gameHasStarted && !HasUpdated)
				{
					((BaseUnityPlugin)this).Logger.LogInfo((object)"Loading new level");
					FindAndPopulateGrabbableObjectList();
					((BaseUnityPlugin)this).Logger.LogInfo((object)GrabbableObjects.Length);
					HasUpdated = true;
				}
				if (!GameNetworkManager.Instance.gameHasStarted && HasUpdated)
				{
					((BaseUnityPlugin)this).Logger.LogInfo((object)"Unloading level");
					HasUpdated = false;
				}
			}
			StartOfRoundInstance = StartOfRound.Instance;
			PlayerUpdates();
			if (RealPlayerScripts == null || (RealPlayerScripts.Length < StartOfRound.Instance.connectedPlayersAmount + 1 && ((NetworkBehaviour)StartOfRound.Instance).IsHost) || (RealPlayerScripts.Length < StartOfRound.Instance.connectedPlayersAmount && ((NetworkBehaviour)StartOfRound.Instance).IsClient))
			{
				RealPlayerScripts = GetRealPlayerScripts(StartOfRoundInstance);
				((BaseUnityPlugin)this).Logger.LogInfo((object)("adding player " + StartOfRound.Instance.connectedPlayersAmount + "rps " + RealPlayerScripts.Length));
			}
			PlayerControllerB[] realPlayerScripts = RealPlayerScripts;
			foreach (PlayerControllerB val in realPlayerScripts)
			{
				if (NameTog)
				{
					val.ShowNameBillboard();
				}
			}
			if (DisableToolTips && (Object)(object)HUDManager.Instance != (Object)null)
			{
				HUDManager.Instance.ClearControlTips();
			}
			if (((uint)GetAsyncKeyState(VK_Toggle) & (true ? 1u : 0u)) != 0)
			{
				toggleState = !toggleState;
			}
			if (((uint)GetAsyncKeyState(VK_Cursor) & (true ? 1u : 0u)) != 0)
			{
				ToggleCursor();
			}
		}

		private void PopulatePlayers()
		{
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Expected O, but got Unknown
			for (int i = 0; i < RealPlayerScripts.Length; i++)
			{
				PlayerControllerB player = RealPlayerScripts[i];
				MainMenuGUI.AddButton("Player " + player.playerUsername, (UnityAction)delegate
				{
					RealPlayerScripts = GetRealPlayerScripts(StartOfRoundInstance);
					if ((Object)(object)player == (Object)(object)selectedPlayer)
					{
						selectedPlayer = null;
						currentSubmenu = Submenu.None;
					}
					else
					{
						currentSubmenu = Submenu.Player;
						selectedPlayer = player;
					}
				});
			}
		}

		private void CompanyBuildingMenu()
		{
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Expected O, but got Unknown
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Expected O, but got Unknown
			//IL_008f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0099: Expected O, but got Unknown
			DepositItemsDeskInstance = Object.FindObjectOfType<DepositItemsDesk>();
			CompanyMenuGUI.AddButton("Attack Players", (UnityAction)delegate
			{
				DepositItemsDeskInstance.AttackPlayersServerRpc();
			});
			CompanyMenuGUI.AddButton("Set Patience", (UnityAction)delegate
			{
				DepositItemsDeskInstance.SetPatienceServerRpc(-3f);
			});
			if (((NetworkBehaviour)MyPlayer).IsServer)
			{
				companyBuyingRate = CompanyMenuGUI.Sliderf(0f, 10f, companyBuyingRate, companyBuyingRate.ToString());
				CompanyMenuGUI.AddButton("Set Buy Rate", (UnityAction)delegate
				{
					StartOfRoundInstance.companyBuyingRate = companyBuyingRate;
					StartOfRoundInstance.SyncCompanyBuyingRateServerRpc();
				});
			}
		}

		private bool isCohost()
		{
			string[] array = CoHostNames.Split(new char[1] { ',' });
			foreach (string text in array)
			{
				if (text == MyPlayer.playerUsername)
				{
					return true;
				}
			}
			return false;
		}

		private bool isCohost2(string cohostnames, string name)
		{
			string[] array = cohostnames.Split(new char[1] { ',' });
			foreach (string text in array)
			{
				if (text == name)
				{
					return true;
				}
			}
			return false;
		}

		private void WorldMenu()
		{
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Expected O, but got Unknown
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Expected O, but got Unknown
			//IL_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0076: Expected O, but got Unknown
			//IL_009f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: Expected O, but got Unknown
			//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c5: Expected O, but got Unknown
			//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e1: Expected O, but got Unknown
			//IL_0131: Unknown result type (might be due to invalid IL or missing references)
			//IL_013b: Expected O, but got Unknown
			//IL_0188: Unknown result type (might be due to invalid IL or missing references)
			//IL_0192: Expected O, but got Unknown
			//IL_01a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ae: Expected O, but got Unknown
			//IL_01c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ca: Expected O, but got Unknown
			//IL_01dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e6: Expected O, but got Unknown
			//IL_01f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0202: Expected O, but got Unknown
			TerminalInstance = Object.FindObjectOfType<Terminal>();
			WorldMenuGUI.AddButton("Display Info", (UnityAction)delegate
			{
				DisplayInfoToggle = !DisplayInfoToggle;
			});
			WorldMenuGUI.AddButton("Spawn All", (UnityAction)delegate
			{
				int num = 0;
				foreach (UnlockableItem unlockable in StartOfRoundInstance.unlockablesList.unlockables)
				{
					((BaseUnityPlugin)this).Logger.LogInfo((object)(unlockable.unlockableName + " Unlocked: " + unlockable.alreadyUnlocked));
					if (!unlockable.alreadyUnlocked)
					{
						int groupCredits = Object.FindObjectOfType<Terminal>().groupCredits;
						StartOfRoundInstance.BuyShipUnlockableClientRpc(groupCredits, num);
						StartOfRoundInstance.BuyShipUnlockableServerRpc(num, groupCredits);
					}
					num++;
				}
			});
			SignalmockMSG = WorldMenuGUI.TextBox(SignalmockMSG);
			WorldMenuGUI.AddButton("Signal Message", (UnityAction)delegate
			{
				HUDManagerInstance = Object.FindObjectOfType<HUDManager>();
				HUDManagerInstance.UseSignalTranslatorServerRpc(SignalmockMSG);
			});
			ServermockMSG = WorldMenuGUI.TextBox(ServermockMSG);
			WorldMenuGUI.AddButton("Send Message as", (UnityAction)delegate
			{
				HUDManagerInstance = Object.FindObjectOfType<HUDManager>();
				HUDManagerInstance.AddTextToChatOnServer(ServermockMSG, -1);
			});
			WorldMenuGUI.AddButton("Force Start", (UnityAction)delegate
			{
				StartMatchLeverInstance = Object.FindObjectOfType<StartMatchLever>();
				StartOfRoundInstance.StartGameServerRpc();
			});
			WorldMenuGUI.AddButton("EndGame takeoff", (UnityAction)delegate
			{
				StartOfRoundInstance.EndGameServerRpc(0);
			});
			planetIndex = WorldMenuGUI.Slider(0, StartOfRoundInstance.levels.Length - 1, planetIndex, StartOfRoundInstance.levels[planetIndex].PlanetName);
			WorldMenuGUI.AddButton("Cycle Planet", (UnityAction)delegate
			{
				((BaseUnityPlugin)this).Logger.LogInfo((object)StartOfRoundInstance.levels[planetIndex].PlanetName);
				if (planetIndex < StartOfRoundInstance.levels.Length)
				{
					StartOfRoundInstance.ChangeLevelServerRpc(planetIndex, Object.FindObjectOfType<Terminal>().groupCredits);
				}
			});
			audio_index = WorldMenuGUI.Slider(0, TerminalInstance.syncedAudios.Length - 1, audio_index, Mathf.RoundToInt((float)audio_index).ToString());
			WorldMenuGUI.AddButton("Play Sound", (UnityAction)delegate
			{
				TerminalInstance.PlayTerminalAudioServerRpc(audio_index);
			});
			WorldMenuGUI.AddButton("Flicker Lights", (UnityAction)delegate
			{
				LightFlickerToggle = !LightFlickerToggle;
			});
			WorldMenuGUI.AddButton("Toggle On Items", (UnityAction)delegate
			{
				itemtog = !itemtog;
				FindAndPopulateGrabbableObjectList();
				GrabbableObject[] grabbableObjects = GrabbableObjects;
				foreach (GrabbableObject _instance in grabbableObjects)
				{
					ActivateItemServerRpcPrefix(_instance, itemtog, itemtog);
				}
			});
			WorldMenuGUI.AddButton("Flicker Terminal", (UnityAction)delegate
			{
				ScreenTog = !ScreenTog;
			});
			WorldMenuGUI.AddButton("Always Name", (UnityAction)delegate
			{
				NameTog = !NameTog;
			});
		}

		private void DisplayInfo()
		{
			//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00da: Expected O, but got Unknown
			WorldMenuGUI.AddInfo("Total Money: " + Object.FindObjectOfType<Terminal>().groupCredits);
			WorldMenuGUI.AddInfo("valueOfFoundScrapItems: " + RoundManager.Instance.valueOfFoundScrapItems);
			WorldMenuGUI.AddInfo("totalScrapValueInLevel: " + RoundManager.Instance.totalScrapValueInLevel);
			WorldMenuGUI.AddInfo("Alive Players: " + StartOfRoundInstance.livingPlayers);
			foreach (EnemyAI EnemyAI in RoundManager.Instance.SpawnedEnemies)
			{
				if (!EnemyAI.isEnemyDead)
				{
					WorldMenuGUI.AddKillButton((UnityAction)delegate
					{
						EnemyAI.HitEnemyServerRpc(10000, 0, true);
						EnemyAI.KillEnemyServerRpc(true);
					});
					WorldMenuGUI.AddInfo(EnemyAI.enemyType.enemyName);
				}
			}
		}

		private void LightFlicker()
		{
			ShipLightsInstance = Object.FindObjectOfType<ShipLights>();
			if ((Object)(object)ShipLightsInstance != (Object)null)
			{
				if (lightinterval > 10)
				{
					LightState = !LightState;
					ShipLightsInstance.SetShipLightsServerRpc(LightState);
					lightinterval = 0;
				}
				else
				{
					lightinterval++;
				}
			}
		}

		private void ScreenTogFunc()
		{
			ManualCameraRendererInstance = Object.FindObjectOfType<ManualCameraRenderer>();
			if ((Object)(object)ManualCameraRendererInstance != (Object)null)
			{
				if (screeninterval > 10)
				{
					ScreenState = !ScreenState;
					ManualCameraRendererInstance.SwitchScreenButton();
					screeninterval = 0;
				}
				else
				{
					screeninterval++;
				}
			}
		}

		private void SuitFlickerFunc()
		{
			int num = (int)selectedPlayer.actualClientId;
			if (suitFlickerinterval > 50)
			{
				if (suit_index >= UnlockableSuitList.Count)
				{
					suit_index = 0;
				}
				else
				{
					suit_index++;
				}
				Object.FindObjectsOfType<UnlockableSuit>()[suit_index].SwitchSuitToThis(selectedPlayer);
				suitFlickerinterval = 0;
			}
			else
			{
				suitFlickerinterval++;
			}
		}

		private void RefreshPlayerMenu()
		{
			if (PlayerMenuTimer == 144)
			{
				SoundManagerInstance = Object.FindObjectOfType<SoundManager>();
				PlayerMenuTimer = 0;
			}
			PlayerMenuTimer++;
		}

		private void PlayerMenu()
		{
			//IL_019a: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a4: Expected O, but got Unknown
			//IL_01db: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e5: Expected O, but got Unknown
			//IL_01f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0201: Expected O, but got Unknown
			//IL_0243: Unknown result type (might be due to invalid IL or missing references)
			//IL_024d: Expected O, but got Unknown
			//IL_0276: Unknown result type (might be due to invalid IL or missing references)
			//IL_0280: Expected O, but got Unknown
			//IL_0292: Unknown result type (might be due to invalid IL or missing references)
			//IL_029c: Expected O, but got Unknown
			//IL_02ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b8: Expected O, but got Unknown
			//IL_02ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d4: Expected O, but got Unknown
			//IL_03fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0404: Expected O, but got Unknown
			//IL_0416: Unknown result type (might be due to invalid IL or missing references)
			//IL_0420: Expected O, but got Unknown
			//IL_0432: Unknown result type (might be due to invalid IL or missing references)
			//IL_043c: Expected O, but got Unknown
			//IL_044e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0458: Expected O, but got Unknown
			//IL_046a: Unknown result type (might be due to invalid IL or missing references)
			//IL_047b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0485: Expected O, but got Unknown
			//IL_0485: Expected O, but got Unknown
			//IL_04e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ee: Expected O, but got Unknown
			//IL_052d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0537: Expected O, but got Unknown
			//IL_0576: Unknown result type (might be due to invalid IL or missing references)
			//IL_0580: Expected O, but got Unknown
			//IL_0592: Unknown result type (might be due to invalid IL or missing references)
			//IL_059c: Expected O, but got Unknown
			//IL_05ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_05d8: Expected O, but got Unknown
			//IL_05ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_05f4: Expected O, but got Unknown
			//IL_062b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0635: Expected O, but got Unknown
			//IL_0647: Unknown result type (might be due to invalid IL or missing references)
			//IL_0651: Expected O, but got Unknown
			//IL_0663: Unknown result type (might be due to invalid IL or missing references)
			//IL_066d: Expected O, but got Unknown
			//IL_067f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0689: Expected O, but got Unknown
			//IL_069b: Unknown result type (might be due to invalid IL or missing references)
			//IL_06a5: Expected O, but got Unknown
			//IL_06b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_06c1: Expected O, but got Unknown
			//IL_06d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_06dd: Expected O, but got Unknown
			//IL_06ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_06f9: Expected O, but got Unknown
			//IL_070b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0715: Expected O, but got Unknown
			//IL_0386: Unknown result type (might be due to invalid IL or missing references)
			//IL_0390: Expected O, but got Unknown
			//IL_03a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ac: Expected O, but got Unknown
			//IL_0324: Unknown result type (might be due to invalid IL or missing references)
			//IL_032e: Expected O, but got Unknown
			//IL_0773: Unknown result type (might be due to invalid IL or missing references)
			//IL_077d: Expected O, but got Unknown
			//IL_07b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_07ba: Expected O, but got Unknown
			//IL_0757: Unknown result type (might be due to invalid IL or missing references)
			//IL_0761: Expected O, but got Unknown
			RefreshPlayerMenu();
			SelectedPlayerTransform = ((Component)selectedPlayer).transform;
			if (selectedPlayer.actualClientId == MyPlayer.actualClientId)
			{
				SelectedPlayerTransform = GetMyTransform();
			}
			PlayerMenuGUI.AddInfo("playerUsername: " + selectedPlayer.playerUsername.ToString());
			PlayerMenuGUI.AddInfo("playerLevelNumber: " + selectedPlayer.playerLevelNumber);
			PlayerMenuGUI.AddInfo("health: " + selectedPlayer.health);
			PlayerMenuGUI.AddInfo("drunkness: " + selectedPlayer.drunkness);
			PlayerMenuGUI.AddInfo("insanityLevel: " + selectedPlayer.insanityLevel);
			PlayerMenuGUI.AddInfo("isPlayerDead: " + selectedPlayer.isPlayerDead);
			PlayerMenuGUI.AddInfo("carryWeight: " + selectedPlayer.carryWeight);
			PlayerMenuGUI.AddInfo("playerID: " + selectedPlayer.actualClientId);
			DamagePlayerAmount = PlayerMenuGUI.Slider(0, 100, DamagePlayerAmount, DamagePlayerAmount.ToString());
			PlayerMenuGUI.AddButton("Damage Player", (UnityAction)delegate
			{
				//IL_0022: Unknown result type (might be due to invalid IL or missing references)
				Vector3 val6 = default(Vector3);
				((Vector3)(ref val6))..ctor(1f, 2f, 3f);
				selectedPlayer.DamagePlayerFromOtherClientServerRpc(DamagePlayerAmount, val6, 0);
			});
			HealPlayerAmount = PlayerMenuGUI.Slider(0, 100, HealPlayerAmount, HealPlayerAmount.ToString());
			PlayerMenuGUI.AddButton("Heal Player", (UnityAction)delegate
			{
				//IL_0023: Unknown result type (might be due to invalid IL or missing references)
				Vector3 val5 = default(Vector3);
				((Vector3)(ref val5))..ctor(1f, 2f, 3f);
				selectedPlayer.DamagePlayerFromOtherClientServerRpc(-HealPlayerAmount, val5, 0);
				if (selectedPlayer.criticallyInjured)
				{
					selectedPlayer.MakeCriticallyInjured(false);
				}
			});
			PlayerMenuGUI.AddButton("Kill Player", (UnityAction)delegate
			{
				//IL_0029: Unknown result type (might be due to invalid IL or missing references)
				//IL_0044: Unknown result type (might be due to invalid IL or missing references)
				//IL_0052: Unknown result type (might be due to invalid IL or missing references)
				Vector3 val4 = default(Vector3);
				((Vector3)(ref val4))..ctor(1f, 2f, 3f);
				KillPlayerServerRpcPrefix(selectedPlayer, (int)selectedPlayer.actualClientId, spawnBody: true, val4, 0, 1);
				KillPlayerClientRpcPrefix(selectedPlayer, (int)selectedPlayer.actualClientId, spawnBody: true, val4, 0, 1);
				selectedPlayer.KillPlayer(val4, true, (CauseOfDeath)0, 0);
				Debug.Log((object)("Kill Player Button clicked for Player " + selectedPlayer.playerUsername));
			});
			audio_indexPlayer = PlayerMenuGUI.Slider(0, SoundManagerInstance.syncedAudioClips.Length, audio_indexPlayer, audio_indexPlayer.ToString());
			PlayerMenuGUI.AddButton("Play Audio", (UnityAction)delegate
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_000b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0012: Unknown result type (might be due to invalid IL or missing references)
				Vector3 position5 = SelectedPlayerTransform.position;
				SoundManagerInstance.PlayAudio1AtPositionForAllClients(position5, audio_indexPlayer);
			});
			mockMSG = PlayerMenuGUI.TextBox(mockMSG);
			PlayerMenuGUI.AddButton("Send Message as", (UnityAction)delegate
			{
				HUDManagerInstance = Object.FindObjectOfType<HUDManager>();
				HUDManagerInstance.AddTextToChatOnServer(mockMSG, (int)selectedPlayer.playerClientId);
			});
			PlayerMenuGUI.AddButton("Set as Radar Target", (UnityAction)delegate
			{
				ManualCameraRendererInstance = Object.FindObjectOfType<ManualCameraRenderer>();
				ManualCameraRendererInstance.SwitchRadarTargetServerRpc((int)selectedPlayer.actualClientId);
			});
			PlayerMenuGUI.AddButton("RainBow Suit Toggle", (UnityAction)delegate
			{
				SuitFlicker = !SuitFlicker;
			});
			PlayerMenuGUI.AddButton("Teleport Items", (UnityAction)delegate
			{
				//IL_002c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0031: Unknown result type (might be due to invalid IL or missing references)
				//IL_001e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0023: Unknown result type (might be due to invalid IL or missing references)
				//IL_0061: Unknown result type (might be due to invalid IL or missing references)
				//IL_0066: Unknown result type (might be due to invalid IL or missing references)
				//IL_0086: 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_009d: 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)
				Vector3 val3;
				if ((Object)(object)MyPlayer == (Object)null)
				{
					((BaseUnityPlugin)this).Logger.LogInfo((object)"Im null??");
					val3 = Vector3.zero;
				}
				else
				{
					val3 = SelectedPlayerTransform.position;
				}
				GrabbableObject[] array = Object.FindObjectsOfType<GrabbableObject>();
				for (int j = 0; j < array.Length; j++)
				{
					if (!array[j].isInShipRoom)
					{
						ManualLogSource logger = ((BaseUnityPlugin)this).Logger;
						string name = ((Object)array[j].itemProperties).name;
						Vector3 position4 = ((Component)array[j]).transform.position;
						logger.LogInfo((object)(name + ((object)(Vector3)(ref position4)).ToString()));
						((Component)array[j]).transform.position = val3;
						((Component)array[j]).transform.localPosition = val3;
						array[j].targetFloorPosition = val3;
					}
				}
			});
			if ((Object)(object)MyPlayer != (Object)null && ((NetworkBehaviour)MyPlayer).IsServer)
			{
				if (RoundManager.Instance.currentLevel.Enemies.Count > 0)
				{
					GetEnemySpawnSlider();
					PlayerMenuGUI.AddButton("Spawn Enemy", (UnityAction)delegate
					{
						//IL_0006: Unknown result type (might be due to invalid IL or missing references)
						//IL_000b: Unknown result type (might be due to invalid IL or missing references)
						//IL_005e: Unknown result type (might be due to invalid IL or missing references)
						//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
						try
						{
							Vector3 position3 = SelectedPlayerTransform.position;
							((BaseUnityPlugin)this).Logger.LogInfo((object)"Spawning");
							((BaseUnityPlugin)this).Logger.LogInfo((object)mobIndex);
							if (selectedPlayer.isInsideFactory)
							{
								if (((NetworkBehaviour)MyPlayer).IsServer)
								{
									SpawnEnemyInside(mobIndex, ((Component)selectedPlayer).transform.position);
								}
							}
							else if ((Object)(object)enemyType != (Object)null && (Object)(object)enemyType.enemyPrefab != (Object)null)
							{
								if (((NetworkBehaviour)MyPlayer).IsServer)
								{
									SpawnEnemyOutside(tempIndex, ((Component)selectedPlayer).transform.position);
								}
							}
							else
							{
								((BaseUnityPlugin)this).Logger.LogError((object)"EnemyType or enemyPrefab is null.");
							}
							((BaseUnityPlugin)this).Logger.LogInfo((object)"Spawned");
						}
						catch (Exception ex)
						{
							((BaseUnityPlugin)this).Logger.LogError((object)("Error while spawning enemy: " + ex.Message));
						}
					});
				}
				SpawnableMapObjectIndex = PlayerMenuGUI.Slider(0, RoundManager.Instance.spawnableMapObjects.Length - 1, SpawnableMapObjectIndex, ((Object)RoundManager.Instance.spawnableMapObjects[SpawnableMapObjectIndex].prefabToSpawn).name.ToString());
				PlayerMenuGUI.AddButton("Spawn Object", (UnityAction)delegate
				{
					//IL_001f: Unknown result type (might be due to invalid IL or missing references)
					if (((NetworkBehaviour)MyPlayer).IsServer)
					{
						SpawnObject(SpawnableMapObjectIndex, ((Component)selectedPlayer).transform.position);
					}
				});
				PlayerMenuGUI.AddButton("Despawn Objects", (UnityAction)delegate
				{
					if (((NetworkBehaviour)MyPlayer).IsServer)
					{
						DespawnObjects();
					}
				});
			}
			if (selectedPlayer.actualClientId != MyPlayer.actualClientId)
			{
				return;
			}
			playerxp = int.Parse(PlayerMenuGUI.TextBox(playerxp.ToString()));
			PlayerMenuGUI.AddButton("Set player XP", (UnityAction)delegate
			{
				Object.FindObjectOfType<HUDManager>().localPlayerXP = playerxp;
			});
			PlayerMenuGUI.AddButton("Teleport to Entrance", (UnityAction)delegate
			{
				//IL_0013: Unknown result type (might be due to invalid IL or missing references)
				//IL_0018: Unknown result type (might be due to invalid IL or missing references)
				//IL_0019: Unknown result type (might be due to invalid IL or missing references)
				//IL_001a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0035: Unknown result type (might be due to invalid IL or missing references)
				//IL_003a: Unknown result type (might be due to invalid IL or missing references)
				//IL_004a: Unknown result type (might be due to invalid IL or missing references)
				if ((Object)(object)RoundManagerInstance != (Object)null)
				{
					Vector3 val2 = RoundManager.FindMainEntrancePosition(true, false);
					if (val2 != Vector3.zero)
					{
						original = ((Component)selectedPlayer).transform.position;
						((Component)selectedPlayer).transform.position = val2;
						((BaseUnityPlugin)this).Logger.LogInfo((object)("Entrance X:" + val2.x + "Y: " + val2.y + "Z: " + val2.z));
						selectedPlayer.isInsideFactory = true;
					}
				}
			});
			PlayerMenuGUI.AddButton("Teleport to Ship", (UnityAction)delegate
			{
				//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_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_002e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0033: Unknown result type (might be due to invalid IL or missing references)
				//IL_0034: Unknown result type (might be due to invalid IL or missing references)
				//IL_0035: Unknown result type (might be due to invalid IL or missing references)
				//IL_0046: 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)
				original = ((Component)selectedPlayer).transform.position;
				Bounds bounds = selectedPlayer.playersManager.shipBounds.bounds;
				Vector3 center = ((Bounds)(ref bounds)).center;
				if (center != Vector3.zero)
				{
					center.y /= 2f;
					((Component)selectedPlayer).transform.position = center;
					selectedPlayer.isInsideFactory = false;
					((BaseUnityPlugin)this).Logger.LogInfo((object)("tp to X:" + center.x + "Y: " + center.y + "Z: " + center.z));
				}
			});
			PlayerMenuGUI.AddButton("Recall", (UnityAction)delegate
			{
				//IL_000b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0010: Unknown result type (might be due to invalid IL or missing references)
				//IL_001d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0028: Unknown result type (might be due to invalid IL or missing references)
				//IL_0029: Unknown result type (might be due to invalid IL or missing references)
				Vector3 position2 = ((Component)selectedPlayer).transform.position;
				((Component)selectedPlayer).transform.position = original;
				original = position2;
			});
			PlayerMenuGUI.AddSideBySideButton("Mark", (UnityAction)delegate
			{
				//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)
				Mark = ((Component)selectedPlayer).transform.position;
			}, "Goto Mark", (UnityAction)delegate
			{
				//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_0022: Unknown result type (might be due to invalid IL or missing references)
				original = ((Component)selectedPlayer).transform.position;
				((Component)selectedPlayer).transform.position = Mark;
			});
			if (playerTpIndex > RealPlayerScripts.Length - 1)
			{
				playerTpIndex = 0;
			}
			playerTpIndex = PlayerMenuGUI.Slider(0, RealPlayerScripts.Length - 1, playerTpIndex, RealPlayerScripts[playerTpIndex].playerUsername);
			PlayerMenuGUI.AddButton("Teleport to Player", (UnityAction)delegate
			{
				//IL_0012: Unknown result type (might be due to invalid IL or missing references)
				//IL_0017: Unknown result type (might be due to invalid IL or missing references)
				//IL_0018: Unknown result type (might be due to invalid IL or missing references)
				//IL_0019: Unknown result type (might be due to invalid IL or missing references)
				//IL_0034: Unknown result type (might be due to invalid IL or missing references)
				//IL_0039: Unknown result type (might be due to invalid IL or missing references)
				//IL_0064: Unknown result type (might be due to invalid IL or missing references)
				//IL_0051: Unknown result type (might be due to invalid IL or missing references)
				Vector3 position = ((Component)RealPlayerScripts[playerTpIndex]).transform.position;
				if (position != Vector3.zero)
				{
					original = ((Component)selectedPlayer).transform.position;
					if (InFreeCam)
					{
						((Component)FreeCamera).transform.position = position;
					}
					else
					{
						((Component)selectedPlayer).transform.position = position;
					}
					((BaseUnityPlugin)this).Logger.LogInfo((object)("Entrance X:" + position.x + "Y: " + position.y + "Z: " + position.z));
				}
			});
			Speedy = PlayerMenuGUI.Sliderf(0.5f, 20f, Speedy, Speedy.ToString());
			PlayerMenuGUI.AddButton("Set Speed", (UnityAction)delegate
			{
				MyPlayer.movementSpeed = Speedy;
				speedCheat = true;
			});
			grabDistance = PlayerMenuGUI.Sliderf(0f, 500f, grabDistance, grabDistance.ToString());
			PlayerMenuGUI.AddButton("Set GrabDistance", (UnityAction)delegate
			{
				MyPlayer.grabDistance = grabDistance;
			});
			PlayerMenuGUI.AddButton("Disable Speed Cheat", (UnityAction)delegate
			{
				MyPlayer.movementSpeed = 5f;
				speedCheat = false;
			});
			PlayerMenuGUI.AddInfo("allowLocalPlayerDeath:" + AllowLocalPlayerDeath);
			PlayerMenuGUI.AddButton("God Mode", (UnityAction)delegate
			{
				AllowLocalPlayerDeath = !AllowLocalPlayerDeath;
				StartOfRoundInstance.allowLocalPlayerDeath = AllowLocalPlayerDeath;
			});
			PlayerMenuGUI.AddButton("Inf Sprint", (UnityAction)delegate
			{
				InfSprintTog = !InfSprintTog;
			});
			NightVisionIntensity = PlayerMenuGUI.Slider(0, 50, NightVisionIntensity, NightVisionIntensity.ToString());
			PlayerMenuGUI.AddButton("NightVision Intensity", (UnityAction)delegate
			{
				light.intensity = NightVisionIntensity;
			});
			PlayerMenuGUI.AddButton("NightVision", (UnityAction)delegate
			{
				newNightTog = !newNightTog;
				lightHolder.SetActive(newNightTog);
			});
			PlayerMenuGUI.AddButton("ItemESP", (UnityAction)delegate
			{
				FindAndPopulateGrabbableObjectList();
				ItemESP = !ItemESP;
			});
			PlayerMenuGUI.AddButton("PlayerESP", (UnityAction)delegate
			{
				PlayerESP = !PlayerESP;
			});
			PlayerMenuGUI.AddButton("EnemyESP", (UnityAction)delegate
			{
				EnemyESP = !EnemyESP;
			});
			PlayerMenuGUI.AddButton("No Clip", (UnityAction)delegate
			{
				NoClip = !NoClip;
				if (!NoClip)
				{
					NoClipDisable();
					disableFreeCam();
				}
			});
			PlayerMenuGUI.AddButton("Free cam", (UnityAction)delegate
			{
				InFreeCam = !InFreeCam;
				if (InFreeCam)
				{
					EnableFreeCam();
				}
				else
				{
					NoClipDisable();
					disableFreeCam();
				}
			});
			PlayerMenuGUI.AddButton("Infinite ammo", (UnityAction)delegate
			{
				InfAmmo = !InfAmmo;
			});
			PlayerMenuGUI.AddButton("Infinite battery", (UnityAction)delegate
			{
				InfBattery = !InfBattery;
			});
			if (ShootGunlol())
			{
				firerate = PlayerMenuGUI.Slider(0, 144, firerate, firerate.ToString());
				PlayerMenuGUI.AddButton("Shoot all shotguns", (UnityAction)delegate
				{
					shooty = !shooty;
				});
			}
			PlayerMenuGUI.AddButton("Hear Everything", (UnityAction)delegate
			{
				IsDumboEars = !IsDumboEars;
				if (!IsDumboEars)
				{
					PlayerControllerB[] realPlayerScripts = RealPlayerScripts;
					foreach (PlayerControllerB val in realPlayerScripts)
					{
						if ((Object)(object)val != (Object)null && (Object)(object)val.currentVoiceChatIngameSettings != (Object)null)
						{
							val.currentVoiceChatAudioSource.maxDistance = defaultVoiceRange;
							((BaseUnityPlugin)this).Logger.LogInfo((object)("Set" + val.playerUsername + "back to default distance"));
						}
					}
				}
			});
			ChallengeVal = int.Parse(PlayerMenuGUI.TextBox(ChallengeVal.ToString()));
			PlayerMenuGUI.AddButton("Submit Challenge scrap", (UnityAction)delegate
			{
				HUDManager.Instance.FillChallengeResultsStats(ChallengeVal);
			});
		}

		public bool ShootGunlol()
		{
			if ((Object)(object)Object.FindObjectOfType<ShotgunItem>() != (Object)null)
			{
				return true;
			}
			return false;
		}

		public void shootlol()
		{
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			if (firerateRefresh >= firerate)
			{
				ShotgunItem[] array = Object.FindObjectsOfType<ShotgunItem>();
				foreach (ShotgunItem val in array)
				{
					val.ShootGunServerRpc(((Component)MyPlayer).transform.position, -((Component)MyPlayer.gameplayCamera).transform.up);
				}
				firerateRefresh = 0;
			}
			else
			{
				firerateRefresh++;
			}
		}

		private void FactoryMenu()
		{
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Expected O, but got Unknown
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: Expected O, but got Unknown
			//IL_001f: 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_002a: Expected O, but got Unknown
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_008b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0091: Expected O, but got Unknown
			//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c0: Expected O, but got Unknown
			//IL_0106: Unknown result type (might be due to invalid IL or missing references)
			//IL_0110: Expected O, but got Unknown
			//IL_0122: Unknown result type (might be due to invalid IL or missing references)
			//IL_012c: Expected O, but got Unknown
			//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ef: Expected O, but got Unknown
			CustomMenuGUI dungeonMenuGUI = DungeonMenuGUI;
			object obj = <>c.<>9__208_0;
			if (obj == null)
			{
				UnityAction val = delegate
				{
					SteamValveHazard[] array6 = Object.FindObjectsOfType<SteamValveHazard>();
					foreach (SteamValveHazard val10 in array6)
					{
						val10.FixValveServerRpc();
					}
				};
				<>c.<>9__208_0 = val;
				obj = (object)val;
			}
			dungeonMenuGUI.AddButton("Fix Steam Valves", (UnityAction)obj);
			DungeonMenuGUI.AddButton("Open Big Doors", (UnityAction)delegate
			{
				doortog = !doortog;
				TerminalAccessibleObject[] array5 = Object.FindObjectsOfType<TerminalAccessibleObject>();
				foreach (TerminalAccessibleObject val9 in array5)
				{
					val9.SetDoorOpenServerRpc(doortog);
				}
			});
			DungeonMenuGUI.AddButton("Disable All Turrets", (UnityAction)delegate
			{
				TurretTog = !TurretTog;
				Turret[] array4 = Object.FindObjectsOfType<Turret>();
				foreach (Turret val8 in array4)
				{
					val8.ToggleTurretServerRpc(TurretTog);
				}
			});
			CustomMenuGUI dungeonMenuGUI2 = DungeonMenuGUI;
			object obj2 = <>c.<>9__208_3;
			if (obj2 == null)
			{
				UnityAction val2 = delegate
				{
					Landmine[] array3 = Object.FindObjectsOfType<Landmine>();
					foreach (Landmine val7 in array3)
					{
						if (!val7.hasExploded)
						{
							val7.ExplodeMineServerRpc();
						}
					}
				};
				<>c.<>9__208_3 = val2;
				obj2 = (object)val2;
			}
			dungeonMenuGUI2.AddButton("Explode All Landmines", (UnityAction)obj2);
			CustomMenuGUI dungeonMenuGUI3 = DungeonMenuGUI;
			object obj3 = <>c.<>9__208_4;
			if (obj3 == null)
			{
				UnityAction val3 = delegate
				{
					DoorLock[] array2 = Object.FindObjectsOfType<DoorLock>();
					foreach (DoorLock val6 in array2)
					{
						val6.UnlockDoorSyncWithServer();
					}
				};
				<>c.<>9__208_4 = val3;
				obj3 = (object)val3;
			}
			dungeonMenuGUI3.AddButton("Unlock All Doors", (UnityAction)obj3);
			CustomMenuGUI dungeonMenuGUI4 = DungeonMenuGUI;
			object obj4 = <>c.<>9__208_5;
			if (obj4 == null)
			{
				UnityAction val4 = delegate
				{
					EnemyAI[] array = Object.FindObjectsOfType<EnemyAI>();
					foreach (EnemyAI val5 in array)
					{
						val5.HitEnemyServerRpc(10000, 0, true);
						val5.KillEnemyServerRpc(true);
					}
				};
				<>c.<>9__208_5 = val4;
				obj4 = (object)val4;
			}
			dungeonMenuGUI4.AddButton("Kill All Mobs", (UnityAction)obj4);
			DungeonMenuGUI.AddButton("Toggle Lights", (UnityAction)delegate
			{
				RoundManagerInstance = Object.FindObjectOfType<RoundManager>();
				FactoryLights = !FactoryLights;
				RoundManagerInstance.SwitchPower(FactoryLights);
			});
			DungeonMenuGUI.AddButton("Reset Level vars", (UnityAction)delegate
			{
				RoundManagerInstance = Object.FindObjectOfType<RoundManager>();
				RoundManagerInstance.FinishGeneratingNewLevelServerRpc();
			});
		}

		private void LoadItemList()
		{
			//IL_0041: 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_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_00f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0100: Expected O, but got Unknown
			//IL_0105: Expected O, but got Unknown
			scrollPosition = GUI.BeginScrollView(new Rect(200f, 500f, (float)(HostMenuGUI.ContainterImgX * 4 + 30), (float)(HostMenuGUI.ContainterImgY + HostMenuGUI.ContainterPaddingy)), scrollPosition, new Rect(0f, 0f, (float)(HostMenuGUI.ContainterImgX * 4), (float)(StartOfRoundInstance.allItemsList.itemsList.Count / 3 * HostMenuGUI.ContainterImgY + HostMenuGUI.ContainterPaddingy)));
			int i;
			UnityAction val2 = default(UnityAction);
			for (i = 0; i < StartOfRound.Instance.allItemsList.itemsList.Count; i++)
			{
				Item val = StartOfRound.Instance.allItemsList.itemsList[i];
				Sprite itemIcon = val.itemIcon;
				Texture2D texture = itemIcon.texture;
				string itemName = val.itemName;
				CustomMenuGUI hostMenuGUI = HostMenuGUI;
				UnityAction obj = val2;
				if (obj == null)
				{
					UnityAction val3 = delegate
					{
						//IL_004e: Unknown result type (might be due to invalid IL or missing references)
						//IL_0028: Unknown result type (might be due to invalid IL or missing references)
						if (((NetworkBehaviour)StartOfRound.Instance).IsHost)
						{
							SpawnItem(i, ((Component)MyPlayer).transform.position);
						}
						else
						{
							NetworkManagerMyMod.instance.SpawnItemServerRpc(i, ((Component)MyPlayer).transform.position, CoHostId);
						}
					};
					UnityAction val4 = val3;
					val2 = val3;
					obj = val4;
				}
				hostMenuGUI.AddImgListItem(texture, itemName, obj);
			}
			GUI.EndScrollView();
		}

		public void SpawnItem(int index, Vector3 p)
		{
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			Item val = StartOfRound.Instance.allItemsList.itemsList[index];
			GameObject val2 = Object.Instantiate<GameObject>(val.spawnPrefab, p, Quaternion.identity, StartOfRoundInstance.propsContainer);
			val2.GetComponent<GrabbableObject>().fallTime = 0f;
			int scrapValue = (int)((float)Random.Range(val2.GetComponent<GrabbableObject>().itemProperties.minValue + 25, val2.GetComponent<GrabbableObject>().itemProperties.maxValue + 35) * RoundManager.Instance.scrapValueMultiplier);
			val2.GetComponent<GrabbableObject>().SetScrapValue(scrapValue);
			val2.GetComponent<NetworkObject>().Spawn(false);
		}

		public void SpawnObject(int index, Vector3 p)
		{
			//IL_0011: 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)
			GameObject val = Object.Instantiate<GameObject>(RoundManager.Instance.spawnableMapObjects[index].prefabToSpawn, p, Quaternion.identity, StartOfRoundInstance.propsContainer);
			spawnedObjects.Add(val);
			NetworkObject component = val.GetComponent<NetworkObject>();
			if ((Object)(object)component != (Object)null)
			{
				component.Spawn(false);
			}
		}

		public void DespawnObjects()
		{
			foreach (GameObject spawnedObject in spawnedObjects)
			{
				NetworkObject component = spawnedObject.GetComponent<NetworkObject>();
				if ((Object)(object)component != (Object)null)
				{
					component.Despawn(true);
				}
				else
				{
					Object.Destroy((Object)(object)spawnedObject);
				}
			}
			spawnedObjects.Clear();
		}

		public void GetEnemySpawnSlider()
		{
			if (selectedPlayer.isInsideFactory)
			{
				mobIndex = Mathf.Clamp(mobIndex, 0, RoundManagerInstance.currentLevel.Enemies.Count - 1);
				string label = RoundManagerInstance.currentLevel.Enemies[mobIndex].enemyType.enemyName.ToString();
				mobIndex = PlayerMenuGUI.Slider(0, RoundManagerInstance.currentLevel.Enemies.Count - 1, mobIndex, label);
				return;
			}
			if (mobIndex == 0)
			{
				mobIndex = RoundManagerInstance.currentLevel.Enemies.Count;
			}
			List<SpawnableEnemyWithRarity> list = new List<SpawnableEnemyWithRarity>();
			list.AddRange(RoundManagerInstance.currentLevel.OutsideEnemies);
			list.AddRange(RoundManagerInstance.currentLevel.DaytimeEnemies);
			int maxValue = list.Count + RoundManagerInstance.currentLevel.Enemies.Count - 1;
			int count = RoundManagerInstance.currentLevel.Enemies.Count;
			tempIndex = Mathf.Clamp(mobIndex - RoundManagerInstance.currentLevel.Enemies.Count, 0, list.Count - 1);
			string label2 = list[tempIndex].enemyType.enemyName.ToString();
			enemyType = list[tempIndex].enemyType;
			mobIndex = PlayerMenuGUI.Slider(count, maxValue, mobIndex, label2);
		}

		public void SpawnEnemyInside(int index, Vector3 p)
		{
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = Object.Instantiate<GameObject>(RoundManager.Instance.currentLevel.Enemies[index].enemyType.enemyPrefab, p, Quaternion.Euler(new Vector3(0f, 0f, 0f)));
			val.GetComponentInChildren<NetworkObject>().Spawn(true);
			RoundManagerInstance.SpawnedEnemies.Add(val.GetComponent<EnemyAI>());
		}

		public void SpawnEnemyOutside(int index, Vector3 p)
		{
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			List<SpawnableEnemyWithRarity> list = new List<SpawnableEnemyWithRarity>();
			list.AddRange(RoundManager.Instance.currentLevel.OutsideEnemies);
			list.AddRange(RoundManager.Instance.currentLevel.DaytimeEnemies);
			GameObject val = Object.Instantiate<GameObject>(list[index].enemyType.enemyPrefab, p, Quaternion.Euler(new Vector3(0f, 0f, 0f)));
			val.GetComponentInChildren<NetworkObject>().Spawn(true);
			RoundManagerInstance.SpawnedEnemies.Add(val.GetComponent<EnemyAI>());
		}

		private void HostMenu()
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Expected O, but got Unknown
			//IL_0070: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Expected O, but got Unknown
			//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d9: Expected O, but got Unknown
			//IL_0110: Unknown result type (might be due to invalid IL or missing references)
			//IL_011a: Expected O, but got Unknown
			//IL_014c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0156: Expected O, but got Unknown
			//IL_018e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0198: Expected O, but got Unknown
			//IL_01aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b4: Expected O, but got Unknown
			credits = HostMenuGUI.TextBox(credits);
			HostMenuGUI.AddButton("Set Credits", (UnityAction)delegate
			{
				if (int.TryParse(credits, out creds))
				{
					TerminalInstance.SyncGroupCreditsServerRpc(creds, TerminalInstance.numberOfItemsInDropship);
				}
			});
			TimeOfDayInstance.profitQuota = int.Parse(HostMenuGUI.TextBox(TimeOfDayInstance.profitQuota.ToString()));
			HostMenuGUI.AddButton("Set Quota", (UnityAction)delegate
			{
				float baseIncrease = TimeOfDayInstance.quotaVariables.baseIncrease;
				TimeOfDayInstance.quotaVariables.baseIncrease = 0f;
				TimeOfDayInstance.SetNewProfitQuota();
				TimeOfDayInstance.quotaVariables.baseIncrease = baseIncrease;
			});
			TimeOfDayInstance.quotaVariables.deadlineDaysAmount = HostMenuGUI.Slider(0, 12, TimeOfDayInstance.quotaVariables.deadlineDaysAmount, TimeOfDayInstance.quotaVariables.deadlineDaysAmount.ToString());
			HostMenuGUI.AddButton("Set DeadLine", (UnityAction)delegate
			{
				TimeOfDayInstance.SetNewProfitQuota();
			});
			HostMenuGUI.AddInfo("allowLocalPlayerDeath: " + StartOfRoundInstance.allowLocalPlayerDeath);
			HostMenuGUI.AddButton("God Mode + friends", (UnityAction)delegate
			{
				AllowLocalPlayerDeath = !AllowLocalPlayerDeath;
				StartOfRoundInstance.Debug_ToggleAllowDeathServerRpc();
				StartOfRoundInstance.allowLocalPlayerDeath = AllowLocalPlayerDeath;
				StartOfRoundInstance.Debug_ToggleAllowDeathClientRpc(AllowLocalPlayerDeath);
			});
			HostMenuGUI.AddInfo("Test Room: " + EnableTestRoom);
			HostMenuGUI.AddButton("Enable Test Room", (UnityAction)delegate
			{
				//IL_0044: Unknown result type (might be due to invalid IL or missing references)
				//IL_0054: Unknown result type (might be due to invalid IL or missing references)
				//IL_0114: Unknown result type (might be due to invalid IL or missing references)
				//IL_011a: Unknown result type (might be due to invalid IL or missing references)
				//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
				EnableTestRoom = !EnableTestRoom;
				StartOfRoundInstance.Debug_EnableTestRoomServerRpc(EnableTestRoom);
				if (EnableTestRoom)
				{
					StartOfRoundInstance.testRoom = Object.Instantiate<GameObject>(StartOfRoundInstance.testRoomPrefab, StartOfRoundInstance.testRoomSpawnPosition.position, StartOfRoundInstance.testRoomSpawnPosition.rotation, StartOfRoundInstance.testRoomSpawnPosition);
					StartOfRoundInstance.testRoom.GetComponent<NetworkObject>().Spawn(false);
				}
				else if ((Object)(object)StartOfRound.Instance.testRoom != (Object)null)
				{
					if (!StartOfRoundInstance.testRoom.GetComponent<NetworkObject>().IsSpawned)
					{
						Object.Destroy((Object)(object)StartOfRoundInstance.testRoom);
					}
					else
					{
						StartOfRoundInstance.testRoom.GetComponent<NetworkObject>().Despawn(true);
					}
				}
				if (EnableTestRoom)
				{
					StartOfRoundInstance.Debug_EnableTestRoomClientRpc(EnableTestRoom, NetworkObjectReference.op_Implicit(StartOfRoundInstance.testRoom.GetComponent<NetworkObject>()));
				}
				else
				{
					StartOfRoundInstance.Debug_EnableTestRoomClientRpc(EnableTestRoom, default(NetworkObjectReference));
				}
			});
			if (ItemSpawnIndex > StartOfRoundInstance.allItemsList.itemsList.Count - 1)
			{
				ItemSpawnIndex = 0;
			}
			HostMenuGUI.AddButton("Spawn Items", (UnityAction)delegate
			{
				ShowItemListTog = !ShowItemListTog;
				((BaseUnityPlugin)this).Logger.LogInfo((object)ShowItemListTog);
			});
			HostMenuGUI.AddButton("Eject", (UnityAction)delegate
			{
				StartOfRoundInstance.ManuallyEjectPlayersServerRpc();
			});
		}

		private void CoHostMenu()
		{
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Expected O, but got Unknown
			CoHostMenuGUI.AddButton("Spawn Items", (UnityAction)delegate
			{
				ShowItemListTog = !ShowItemListTog;
				((BaseUnityPlugin)this).Logger.LogInfo((object)ShowItemListTog);
			});
		}

		private void AddHostMenu()
		{
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Expected O, but got Unknown
			if (!((Object)(object)MyPlayer != (Object)null) || !((NetworkBehaviour)MyPlayer).IsServer)
			{
				return;
			}
			MainMenuGUI.AddButton("Host Options", (UnityAction)delegate
			{
				if (currentSubmenu == Submenu.Host)
				{
					currentSubmenu = Submenu.None;
				}
				else
				{
					currentSubmenu = Submenu.Host;
				}
			});
		}

		private void AddCoHostMenu()
		{
		}

		private void SettingsMenu()
		{
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Expected O, but got Unknown
			//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Expected O, but got Unknown
			//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ff: Expected O, but got Unknown
			//IL_0148: Unknown result type (might be due to invalid IL or missing references)
			//IL_0152: Expected O, but got Unknown
			//IL_019b: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a5: Expected O, but got Unknown
			//IL_01ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f8: Expected O, but got Unknown
			//IL_0241: Unknown result type (might be due to invalid IL or missing references)
			//IL_024b: Expected O, but got Unknown
			//IL_0294: Unknown result type (might be due to invalid IL or missing references)
			//IL_029e: Expected O, but got Unknown
			//IL_02e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f1: Expected O, but got Unknown
			//IL_033a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0344: Expected O, but got Unknown
			//IL_038d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0397: Expected O, but got Unknown
			//IL_03e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ea: Expected O, but got Unknown
			//IL_0433: Unknown result type (might be due to invalid IL or missing references)
			//IL_043d: Expected O, but got Unknown
			//IL_0486: Unknown result type (might be due to invalid IL or missing references)
			//IL_0490: Expected O, but got Unknown
			//IL_0566: Unknown result type (might be due to invalid IL or missing references)
			//IL_0570: Expected O, but got Unknown
			//IL_0646: Unknown result type (might be due to invalid IL or missing references)
			//IL_0650: Expected O, but got Unknown
			CustomMenuGUI[] array = Object.FindObjectsOfType<CustomMenuGUI>();
			MainMenuGUI.X = SettingsGUI.Slider(0, Screen.width, MainMenuGUI.X, MainMenuGUI.X.ToString());
			SettingsGUI.AddButton("Save MainMenu X", (UnityAction)delegate
			{
				MainMenuXConfigEntry.Value = MainMenuGUI.X;
				((BaseUnityPlugin)this).Config.Save();
			});
			MainMenuGUI.Y = SettingsGUI.Slider(0, Screen.height, MainMenuGUI.Y, MainMenuGUI.Y.ToString());
			SettingsGUI.AddButton("MainMenu Y", (UnityAction)delegate
			{
				MainMenuYConfigEntry.Value = MainMenuGUI.Y;
				((BaseUnityPlugin)this).Config.Save();
			});
			WorldMenuGUI.X = SettingsGUI.Slider(0, Screen.width, WorldMenuGUI.X, WorldMenuGUI.X.ToString());
			SettingsGUI.AddButton("WorldMenu X", (UnityAction)delegate
			{
				WorldXConfigEntry.Value = WorldMenuGUI.X;
				((BaseUnityPlugin)this).Config.Save();
			});
			WorldMenuGUI.Y = SettingsGUI.Slider(0, Screen.height, WorldMenuGUI.Y, WorldMenuGUI.Y.ToString());
			SettingsGUI.AddButton("WorldMenu y", (UnityAction)delegate
			{
				WorldYConfigEntry.Value = WorldMenuGUI.Y;
				((BaseUnityPlugin)this).Config.Save();
			});
			CompanyMenuGUI.X = SettingsGUI.Slider(0, Screen.width, CompanyMenuGUI.X, CompanyMenuGUI.X.ToString());
			SettingsGUI.AddButton("CompanyMenu X", (UnityAction)delegate
			{
				CompanyXConfigEntry.Value = CompanyMenuGUI.X;
				((BaseUnityPlugin)this).Config.Save();
			});
			CompanyMenuGUI.Y = SettingsGUI.Slider(0, Screen.height, CompanyMenuGUI.Y, CompanyMenuGUI.Y.ToString());
			SettingsGUI.AddButton("CompanyMenu Y", (UnityAction)delegate
			{
				CompanyYConfigEntry.Value = CompanyMenuGUI.Y;
				((BaseUnityPlugin)this).Config.Save();
			});
			PlayerMenuGUI.X = SettingsGUI.Slider(0, Screen.width, PlayerMenuGUI.X, PlayerMenuGUI.X.ToString());
			SettingsGUI.AddButton("PlayerMenu X", (UnityAction)delegate
			{
				PlayerXConfigEntry.Value = PlayerMenuGUI.X;
				((BaseUnityPlugin)this).Config.Save();
			});
			PlayerMenuGUI.Y = SettingsGUI.Slider(0, Screen.height, PlayerMenuGUI.Y, PlayerMenuGUI.Y.ToString());
			SettingsGUI.AddButton("PlayerMenu Y", (UnityAction)delegate
			{
				PlayerYConfigEntry.Value = PlayerMen