Decompiled source of Pdksmodmenuv50 v1.0.1
LethalCompanyModMeneu.dll
Decompiled 8 months ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.CodeDom.Compiler; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.Globalization; using System.IO; 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.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [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__137_0; public static UnityAction <>9__213_0; public static UnityAction <>9__213_3; public static UnityAction <>9__213_4; public static UnityAction <>9__213_5; internal bool <GetRealPlayerScripts>b__137_0(PlayerControllerB x) { return x.isPlayerDead || x.isPlayerControlled; } internal void <FactoryMenu>b__213_0() { SteamValveHazard[] array = Object.FindObjectsOfType<SteamValveHazard>(); foreach (SteamValveHazard val in array) { val.FixValveServerRpc(); } } internal void <FactoryMenu>b__213_3() { Landmine[] array = Object.FindObjectsOfType<Landmine>(); foreach (Landmine val in array) { if (!val.hasExploded) { val.ExplodeMineServerRpc(); } } } internal void <FactoryMenu>b__213_4() { DoorLock[] array = Object.FindObjectsOfType<DoorLock>(); foreach (DoorLock val in array) { val.UnlockDoorSyncWithServer(); } } internal void <FactoryMenu>b__213_5() { EnemyAI[] array = Object.FindObjectsOfType<EnemyAI>(); foreach (EnemyAI val in array) { val.HitEnemyServerRpc(10000, 0, true, -1); 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 = 0; private int screeninterval = 0; private int suitFlickerinterval = 0; private bool LightState = false; private bool ScreenState = false; private bool LightFlickerToggle = false; private bool DisplayInfoToggle = false; private bool SuitFlicker = false; private bool FactoryLights = false; public string mockMSG = ""; public string ServermockMSG = ""; public string SignalmockMSG = ""; public int planetIndex = 0; public int mobIndex = 0; public int playerTpIndex = 0; public int ItemSpawnIndex = 0; public bool doortog = false; public bool itemtog = false; public bool ScreenTog = false; public bool HangerDoorTog = false; public bool TurretTog = false; public bool nightVisionTog = false; public bool isFreeCameratog = false; public bool EnableTestRoom = false; public bool AllowLocalPlayerDeath = true; public bool InfSprintTog = false; public bool InfAmmo = false; public bool InfBattery = false; public bool NameTog = false; public bool SpectateTog = false; public bool ShowItemListTog = false; public bool ItemESP = false; public bool PlayerESP = false; public bool EnemyESP = false; public float orbitSpeed = 10f; public PlayerControllerB spectatedPlayer = null; public string credits = ""; public int creds = 0; public int audio_index = 0; public int audio_indexPlayer = 0; public int DamagePlayerAmount = 0; public int HealPlayerAmount = 0; public float grabDistance = 5f; public float Speedy = 5f; public bool speedCheat = false; public int suit_index = 0; public Dictionary<int, bool> rainbowSuitDictionary = new Dictionary<int, bool>(); private Transform SelectedPlayerTransform; private PlayerControllerB OrbitPlayer = null; public Vector3 original; private Vector3 Mark; public int NightVisionIntensity = 50; public int NightVisionRange = 12; public bool newNightTog = false; public float companyBuyingRate; public Vector4 rgba = new Vector4(1f, 1f, 1f, 1f); public Vector4 rgba2 = new Vector4(1f, 1f, 1f, 1f); public bool NoClip = false; private Submenu currentSubmenu = Submenu.None; private bool settingsOn = false; 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 = null; 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 = null; private Turret[] Turrets = null; private Landmine[] Landmines = null; private int esprefresh = 300; private CharacterController MyCharacterController; public float MyCharacterControllerRadius = 0f; private bool InGame = false; private bool HasUpdated = false; private bool flipper = false; private int items_index = 0; public Camera FreeCamera = null; public GameObject lightHolder; public AudioListener ears; public AudioListener MegaEars; public Light light; private bool InFreeCam = false; public float defaultVoiceRange = 0f; public bool IsDumboEars = false; private Vector3 rotateValue = Vector3.zero; private Vector2 PlayerMenuScrollPos = Vector2.zero; private int CoHostId; public string CoHostNames = ""; private int[] mylist = new int[1]; private int PlayerMenuTimer = 144; private int SpawnableMapObjectIndex = 0; public int ChallengeVal = 0; public bool itemsOrbit = false; private int playerxp = 0; public bool shooty = false; private int firerate = 144; private int firerateRefresh = 0; private Vector2 scrollPosition = Vector2.zero; public Item itemToSpawn; private int tempIndex = 0; private EnemyType enemyType = null; public bool CursorTog = false; [DllImport("user32.dll")] private static extern short GetAsyncKeyState(int vKey); public void Awake() { //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Expected O, but got Unknown //IL_04ce: Unknown result type (might be due to invalid IL or missing references) //IL_0507: Unknown result type (might be due to invalid IL or missing references) //IL_0522: Unknown result type (might be due to invalid IL or missing references) //IL_0527: Unknown result type (might be due to invalid IL or missing references) //IL_0533: Unknown result type (might be due to invalid IL or missing references) //IL_0538: Unknown result type (might be due to invalid IL or missing references) instance = this; string text = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "netcodemod"); 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_0040: 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_0040: 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_002e: 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(PlayerControllerB), "ThrowObjectServerRpc")] [HarmonyPrefix] public static void ThrowObjectServerRpcPrefix(PlayerControllerB __instance, NetworkObjectReference grabbedObject, bool droppedInElevator, bool droppedInShipRoom, Vector3 targetFloorPosition, int floorYRot) { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) MethodInfo method = typeof(PlayerControllerB).GetMethod("ThrowObjectServerRpc", BindingFlags.Instance | BindingFlags.NonPublic); if (method != null) { method.Invoke(__instance, new object[5] { grabbedObject, droppedInElevator, droppedInShipRoom, targetFloorPosition, floorYRot }); } else { Debug.LogError((object)"ThrowObjectServerRpcPrefix 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_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_0009: 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_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) 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_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_008c: 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_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0129: 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_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_020d: 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_0089: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: 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_0037: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0067: 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_0084: 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_0024: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_004e: 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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //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_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)OrbitPlayer == (Object)null || Object.FindObjectsOfType<GrabbableObject>() == null) { return; } GrabbableObject[] array = Object.FindObjectsOfType<GrabbableObject>(); if (items_index < array.Length) { GrabbableObject val = array[items_index]; ManualLogSource logger = ((BaseUnityPlugin)this).Logger; string itemName = val.itemProperties.itemName; Vector3 position = ((Component)val).transform.position; logger.LogInfo((object)("Item:" + itemName + "Pos" + ((object)(Vector3)(ref position)).ToString())); float num = 5f; float num2 = Time.time * orbitSpeed + (float)items_index * ((float)Math.PI * 2f / (float)Object.FindObjectsOfType<PlaceableShipObject>().Length); Vector3 val2 = new Vector3(Mathf.Cos(num2), 0.5f, Mathf.Sin(num2)) * num; Vector3 val3 = ((Component)OrbitPlayer).transform.position + val2; if (!flipper) { flipper = !flipper; GrabObjectServerRpcPrefix(MyPlayer, NetworkObjectReference.op_Implicit(((Component)val).GetComponent<NetworkObject>())); } else { ThrowObjectServerRpcPrefix(MyPlayer, NetworkObjectReference.op_Implicit(((Component)MyPlayer.currentlyHeldObjectServer).GetComponent<NetworkObject>()), droppedInElevator: false, droppedInShipRoom: false, ((Component)MyPlayer).transform.position, 1); flipper = !flipper; items_index++; } } else { items_index = 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_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_007f: 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_00ca: 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_00d7: 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_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: 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_0071: 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) 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_0094: Unknown result type (might be due to invalid IL or missing references) //IL_009e: 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_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) 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_0007: 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_0068: 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) 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_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0085: 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_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: 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_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_0077: 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) 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_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0092: 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_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Expected O, but got Unknown MainMenuGUI.buttonlistindex_y = 0; int num = RealPlayerScripts.Length; if (RealPlayerScripts.Length > 4) { num = 4; } PlayerMenuScrollPos = GUI.BeginScrollView(new Rect((float)MainMenuGUI.X, (float)MainMenuGUI.Y, (float)MainMenuGUI.xLen, (float)(MainMenuGUI.PaddingY * num)), PlayerMenuScrollPos, new Rect(0f, 0f, (float)MainMenuGUI.xLen, (float)(RealPlayerScripts.Length * MainMenuGUI.PaddingY)), false, false); for (int i = 0; i < RealPlayerScripts.Length; i++) { PlayerControllerB player = RealPlayerScripts[i]; MainMenuGUI.AddButtonList("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; } }); MainMenuGUI.buttonlistindex_y++; } GUI.EndScrollView(); MainMenuGUI.ButtonIndex = num; } private void CompanyBuildingMenu() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Expected O, but got Unknown //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009f: 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_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Expected O, but got Unknown //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Expected O, but got Unknown //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Expected O, but got Unknown //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Expected O, but got Unknown //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Expected O, but got Unknown //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Expected O, but got Unknown //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Expected O, but got Unknown //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Expected O, but got Unknown //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Expected O, but got Unknown //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Expected O, but got Unknown //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_020e: 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_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Expected O, but got Unknown //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_0172: 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); Terminal terminalInstance = Object.FindObjectOfType<Terminal>(); Item[] buyableItemsList = terminalInstance.buyableItemsList; foreach (Item item in buyableItemsList) { WorldMenuGUI.AddInfo(item.itemName); WorldMenuGUI.AddKillButton("buy", (UnityAction)delegate { mylist[0] = item.itemId; Terminal obj = terminalInstance; int[] array = mylist; int groupCredits = terminalInstance.groupCredits; Terminal obj2 = terminalInstance; obj.BuyItemsServerRpc(array, groupCredits, ++obj2.numberOfItemsInDropship); }); } foreach (EnemyAI EnemyAI in RoundManager.Instance.SpawnedEnemies) { if (!EnemyAI.isEnemyDead) { WorldMenuGUI.AddKillButton("Kill Monster", (UnityAction)delegate { EnemyAI.HitEnemyServerRpc(10000, 0, true, -1); 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_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Expected O, but got Unknown //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Expected O, but got Unknown //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Expected O, but got Unknown //IL_0256: Unknown result type (might be due to invalid IL or missing references) //IL_0260: Expected O, but got Unknown //IL_028a: Unknown result type (might be due to invalid IL or missing references) //IL_0294: Expected O, but got Unknown //IL_02a7: Unknown result type (might be due to invalid IL or missing references) //IL_02b1: Expected O, but got Unknown //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02ce: Expected O, but got Unknown //IL_02e1: Unknown result type (might be due to invalid IL or missing references) //IL_02eb: Expected O, but got Unknown //IL_032b: Unknown result type (might be due to invalid IL or missing references) //IL_0335: Expected O, but got Unknown //IL_0389: Unknown result type (might be due to invalid IL or missing references) //IL_0393: Expected O, but got Unknown //IL_03a6: Unknown result type (might be due to invalid IL or missing references) //IL_03b0: Expected O, but got Unknown //IL_03c3: Unknown result type (might be due to invalid IL or missing references) //IL_03cd: 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_03fd: Unknown result type (might be due to invalid IL or missing references) //IL_040e: Unknown result type (might be due to invalid IL or missing references) //IL_0418: Expected O, but got Unknown //IL_0418: Expected O, but got Unknown //IL_047e: Unknown result type (might be due to invalid IL or missing references) //IL_0488: Expected O, but got Unknown //IL_04c8: Unknown result type (might be due to invalid IL or missing references) //IL_04d2: Expected O, but got Unknown //IL_0512: Unknown result type (might be due to invalid IL or missing references) //IL_051c: Expected O, but got Unknown //IL_052f: Unknown result type (might be due to invalid IL or missing references) //IL_0539: Expected O, but got Unknown //IL_056d: Unknown result type (might be due to invalid IL or missing references) //IL_0577: Expected O, but got Unknown //IL_058a: Unknown result type (might be due to invalid IL or missing references) //IL_0594: Expected O, but got Unknown //IL_05cc: Unknown result type (might be due to invalid IL or missing references) //IL_05d6: Expected O, but got Unknown //IL_05e9: Unknown result type (might be due to invalid IL or missing references) //IL_05f3: Expected O, but got Unknown //IL_0606: Unknown result type (might be due to invalid IL or missing references) //IL_0610: Expected O, but got Unknown //IL_0623: Unknown result type (might be due to invalid IL or missing references) //IL_062d: Expected O, but got Unknown //IL_0640: Unknown result type (might be due to invalid IL or missing references) //IL_064a: Expected O, but got Unknown //IL_065d: Unknown result type (might be due to invalid IL or missing references) //IL_0667: Expected O, but got Unknown //IL_067a: Unknown result type (might be due to invalid IL or missing references) //IL_0684: Expected O, but got Unknown //IL_0697: Unknown result type (might be due to invalid IL or missing references) //IL_06a1: Expected O, but got Unknown //IL_06b4: Unknown result type (might be due to invalid IL or missing references) //IL_06be: Expected O, but got Unknown //IL_0722: Unknown result type (might be due to invalid IL or missing references) //IL_072c: Expected O, but got Unknown //IL_0760: Unknown result type (might be due to invalid IL or missing references) //IL_076a: Expected O, but got Unknown //IL_0704: Unknown result type (might be due to invalid IL or missing references) //IL_070e: Expected O, but got Unknown //IL_0837: Unknown result type (might be due to invalid IL or missing references) //IL_0841: Expected O, but got Unknown //IL_0854: Unknown result type (might be due to invalid IL or missing references) //IL_085e: Expected O, but got Unknown //IL_07c9: Unknown result type (might be due to invalid IL or missing references) //IL_07d3: 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_0023: 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_0024: 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_002a: 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_0056: 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_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0013: 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_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0023: 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_0072: 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_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: 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; } } }); orbitSpeed = PlayerMenuGUI.Sliderf(0f, 10f, orbitSpeed, orbitSpeed.ToString()); PlayerMenuGUI.AddButton("Orbit items", (UnityAction)delegate { itemsOrbit = !itemsOrbit; OrbitPlayer = selectedPlayer; }); if (selectedPlayer.actualClientId == MyPlayer.actualClientId) { 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_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0051: 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_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0027: 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_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_004a: 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) 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_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_001e: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) Vector3 position3 = ((Component)selectedPlayer).transform.position; ((Component)selectedPlayer).transform.position = original; original = position3; }); PlayerMenuGUI.AddSideBySideButton("Mark", (UnityAction)delegate { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) Mark = ((Component)selectedPlayer).transform.position; }, "Goto Mark", (UnityAction)delegate { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0023: 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_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_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) Vector3 position2 = ((Component)RealPlayerScripts[playerTpIndex]).transform.position; if (position2 != Vector3.zero) { original = ((Component)selectedPlayer).transform.position; if (InFreeCam) { ((Component)FreeCamera).transform.position = position2; } else { ((Component)selectedPlayer).transform.position = position2; } ((BaseUnityPlugin)this).Logger.LogInfo((object)("Entrance X:" + position2.x + "Y: " + position2.y + "Z: " + position2.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); }); } if (!((Object)(object)MyPlayer != (Object)null) || !((NetworkBehaviour)MyPlayer).IsServer) { return; } if (RoundManager.Instance.currentLevel.Enemies.Count > 0) { GetEnemySpawnSlider(); PlayerMenuGUI.AddButton("Spawn Enemy", (UnityAction)delegate { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) try { Vector3 position = 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.currentLevel.spawnableMapObjects.Length - 1, SpawnableMapObjectIndex, ((Object)RoundManager.Instance.currentLevel.spawnableMapObjects[SpawnableMapObjectIndex].prefabToSpawn).name.ToString()); PlayerMenuGUI.AddButton("Spawn Object", (UnityAction)delegate { //IL_0045: Unknown result type (might be due to invalid IL or missing references) ((BaseUnityPlugin)this).Logger.LogInfo((object)RoundManager.Instance.currentLevel.spawnableMapObjects.Length); if (((NetworkBehaviour)MyPlayer).IsServer) { SpawnObject(SpawnableMapObjectIndex, ((Component)selectedPlayer).transform.position); } }); PlayerMenuGUI.AddButton("Despawn Objects", (UnityAction)delegate { if (((NetworkBehaviour)MyPlayer).IsServer) { DespawnObjects(); } }); } public bool ShootGunlol() { if ((Object)(object)Object.FindObjectOfType<ShotgunItem>() != (Object)null) { return true; } return false; } public void shootlol() { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) 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_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Expected O, but got Unknown //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Expected O, but got Unknown //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Expected O, but got Unknown //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Expected O, but got Unknown //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Expected O, but got Unknown //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Expected O, but got Unknown CustomMenuGUI dungeonMenuGUI = DungeonMenuGUI; object obj = <>c.<>9__213_0; if (obj == null) { UnityAction val = delegate { SteamValveHazard[] array6 = Object.FindObjectsOfType<SteamValveHazard>(); foreach (SteamValveHazard val10 in array6) { val10.FixValveServerRpc(); } }; <>c.<>9__213_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__213_3; if (obj2 == null) { UnityAction val2 = delegate { Landmine[] array3 = Object.FindObjectsOfType<Landmine>(); foreach (Landmine val7 in array3) { if (!val7.hasExploded) { val7.ExplodeMineServerRpc(); } } }; <>c.<>9__213_3 = val2; obj2 = (object)val2; } dungeonMenuGUI2.AddButton("Explode All Landmines", (UnityAction)obj2); CustomMenuGUI dungeonMenuGUI3 = DungeonMenuGUI; object obj3 = <>c.<>9__213_4; if (obj3 == null) { UnityAction val3 = delegate { DoorLock[] array2 = Object.FindObjectsOfType<DoorLock>(); foreach (DoorLock val6 in array2) { val6.UnlockDoorSyncWithServer(); } }; <>c.<>9__213_4 = val3; obj3 = (object)val3; } dungeonMenuGUI3.AddButton("Unlock All Doors", (UnityAction)obj3); CustomMenuGUI dungeonMenuGUI4 = DungeonMenuGUI; object obj4 = <>c.<>9__213_5; if (obj4 == null) { UnityAction val4 = delegate { EnemyAI[] array = Object.FindObjectsOfType<EnemyAI>(); foreach (EnemyAI val5 in array) { val5.HitEnemyServerRpc(10000, 0, true, -1); val5.KillEnemyServerRpc(true); } }; <>c.<>9__213_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_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: 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; 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; HostMenuGUI.AddImgListItem(texture, itemName, (UnityAction)delegate { //IL_0056: 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) if (((NetworkBehaviour)StartOfRound.Instance).IsHost) { SpawnItem(i, ((Component)MyPlayer).transform.position); } else { NetworkManagerMyMod.instance.SpawnItemServerRpc(i, ((Component)MyPlayer).transform.position, CoHostId); } }); } GUI.EndScrollView(); } public void SpawnItem(int index, Vector3 p) { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) 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_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) GameObject val = Object.Instantiate<GameObject>(RoundManager.Instance.currentLevel.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_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: 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_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_0059: 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_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Expected O, but got Unknown //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Expected O, but got Unknown //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Expected O, but got Unknown //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Expected O, but got Unknown //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Expected O, but got Unknown //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Expected O, but got Unknown //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: 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_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_0114: 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_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Expected O, but got Unknown CoHostMenuGUI.AddButton("Spawn Items", (UnityAction)delegate { ShowItemListTog = !ShowItemListTog; ((BaseUnityPlugin)this).Logger.LogInfo((object)ShowItemListTog); }); } private void AddHostMenu() { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003e: 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_0050: Unknown result type (might be due to invalid IL or missing references)