The BepInEx console will not appear when launching like it does for other games on Thunderstore (you can turn it back on in your BepInEx.cfg file). If your PEAK crashes on startup, add -dx12 to your launch parameters.
Decompiled source of PEAKER v0.3.1
BepInEx/plugins/PEAKER.dll
Decompiled 2 hours ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Text; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using ExitGames.Client.Photon; using HarmonyLib; using Microsoft.CodeAnalysis; using Photon.Pun; using Photon.Realtime; using Steamworks; using TMPro; using Unity.Collections; using UnityEngine; using UnityEngine.InputSystem; using UnityEngine.InputSystem.Controls; using UnityEngine.UI; using Zorro.Core; using Zorro.Core.Serizalization; using Zorro.Settings; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: IgnoresAccessChecksTo("Assembly-CSharp")] [assembly: IgnoresAccessChecksTo("Photon3Unity3D")] [assembly: IgnoresAccessChecksTo("PhotonRealtime")] [assembly: IgnoresAccessChecksTo("PhotonUnityNetworking")] [assembly: IgnoresAccessChecksTo("PhotonVoice")] [assembly: AssemblyCompany("PEAKER")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyCopyright("Copyright © 2024")] [assembly: AssemblyFileVersion("0.3.1.0")] [assembly: AssemblyInformationalVersion("0.3.1")] [assembly: AssemblyProduct("PEAKER")] [assembly: AssemblyTitle("PEAKER")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("0.3.1.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace PEAKER { internal static class AntiCheatDependency { internal const string PluginGuid = "com.hiccup444.anticheat"; internal static bool ListenForCheaterDetections(Action<Player, string, CSteamID, string> listener) { if (!Chainloader.PluginInfos.TryGetValue("com.hiccup444.anticheat", out var value)) { return false; } Assembly assembly = ((value == null) ? null : ((object)value.Instance)?.GetType()?.Assembly); if (assembly == null) { return false; } Type type = assembly.GetType("AntiCheatMod.AntiCheatEvents"); if (type == null) { return false; } EventInfo @event = type.GetEvent("OnCheaterDetected", BindingFlags.Static | BindingFlags.Public); if (@event == null) { return false; } @event.AddEventHandler(null, listener); return true; } } public class BannedScouts : MonoBehaviour { private readonly struct LoggedCheatDetection { public readonly Player player; public readonly string reason; public readonly CSteamID steamID; public readonly string timestamp; public LoggedCheatDetection(Player player, string reason, CSteamID steamID, string timestamp) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) this.player = player; this.reason = reason; this.steamID = steamID; this.timestamp = timestamp; } } private static Callback<LobbyChatUpdate_t> _onLobbyChatUpdateCallback; internal static readonly Dictionary<ulong, string> bannedScouts = new Dictionary<ulong, string>(); internal static readonly HashSet<ulong> ignoredScouts = new HashSet<ulong>(); private static CSteamID _lastSentChat; private bool _showScoutList; private Key _toggleScoutListKey; private static bool _listeningForCheatDetections; private readonly Queue<LoggedCheatDetection> _loggedCheatDetections = new Queue<LoggedCheatDetection>(); public static bool ListeningForCheatDetections => _listeningForCheatDetections; public static bool IsBanned(CSteamID steamId) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) return bannedScouts.ContainsKey(steamId.m_SteamID); } public static bool IsIgnored(CSteamID steamId) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) return ignoredScouts.Contains(steamId.m_SteamID); } internal void Awake() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Expected O, but got Unknown //IL_002c: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) _toggleScoutListKey = PEAKER.Config.Bind<Key>(new ConfigDefinition("Keybinds", "ToggleScoutListKey"), (Key)102, new ConfigDescription("The key used to toggle the scout list, where you may ban scouts from joining your future lobbies. (Client)", (AcceptableValueBase)null, Array.Empty<object>())).Value; PEAKER.Logger.LogInfo((object)$"Scout List Key: {_toggleScoutListKey}"); UpdateBannedScouts(); PEAKER.Patches.PatchAll(typeof(BannedScouts)); _listeningForCheatDetections = AntiCheatDependency.ListenForCheaterDetections(delegate(Player player, string reason, CSteamID steamID, string timestamp) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) _loggedCheatDetections.Enqueue(new LoggedCheatDetection(player, reason, steamID, timestamp)); while (_loggedCheatDetections.Count > 15) { _loggedCheatDetections.Dequeue(); } }); } internal void Update() { if (_showScoutList && !PhotonNetwork.InRoom) { _showScoutList = false; } } internal void OnGUI() { //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Expected O, but got Unknown //IL_0056: 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_0080: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Expected O, but got Unknown //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Expected O, but got Unknown //IL_00c2: Unknown result type (might be due to invalid IL or missing references) if (_showScoutList) { int num = (int)((float)Screen.width * 0.25f); int num2 = (int)((float)Screen.height * 0.75f); GUI.Window(GUIUtility.GetControlID((FocusType)2), new Rect(0f, (float)((Screen.height - num2) / 2), (float)(num * 2), (float)num2), new WindowFunction(DrawCheatDetectionLog), "Cheat Detection Log"); GUI.Window(GUIUtility.GetControlID((FocusType)2), new Rect((float)(num * 2), (float)((Screen.height - num2) / 2), (float)num, (float)num2), new WindowFunction(DrawPhotonWindow), "Photon Scouts"); GUI.Window(GUIUtility.GetControlID((FocusType)2), new Rect((float)(Screen.width - num), (float)((Screen.height - num2) / 2), (float)num, (float)num2), new WindowFunction(DrawSteamWindow), "Steam Scouts"); } } private void DrawCheatDetectionLog(int windowID) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0016: 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: Expected O, but got Unknown //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) GUIStyle val = new GUIStyle(GUI.skin.label) { alignment = (TextAnchor)3, fontSize = 20, fixedHeight = 28f }; if (!_listeningForCheatDetections) { GUILayout.Label("PEAKAntiCheat by hiccup is not installed, or was not detected.", val, Array.Empty<GUILayoutOption>()); return; } GUILayout.BeginVertical(Array.Empty<GUILayoutOption>()); foreach (LoggedCheatDetection loggedCheatDetection in _loggedCheatDetections) { GUILayout.Label($"{loggedCheatDetection.timestamp} | {loggedCheatDetection.player.NickName} (#{loggedCheatDetection.player.ActorNumber}) | {SteamFriends.GetFriendPersonaName(loggedCheatDetection.steamID)} ({loggedCheatDetection.steamID.m_SteamID})", val, Array.Empty<GUILayoutOption>()); GUILayout.Label("- " + loggedCheatDetection.reason, val, Array.Empty<GUILayoutOption>()); GUILayout.Space(5f); } GUILayout.EndVertical(); } private void DrawPhotonWindow(int windowID) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0016: 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: Expected O, but got Unknown //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Expected O, but got Unknown GUIStyle val = new GUIStyle(GUI.skin.label) { alignment = (TextAnchor)3, fontSize = 20, fixedHeight = 28f }; if (!PhotonNetwork.InRoom) { GUILayout.Label("Not in a Photon Room.", val, Array.Empty<GUILayoutOption>()); return; } GUIStyle val2 = new GUIStyle(GUI.skin.button) { fontSize = 20, fixedHeight = 28f }; GUILayout.BeginVertical(Array.Empty<GUILayoutOption>()); Player[] playerList = PhotonNetwork.PlayerList; Scoutmaster val6 = default(Scoutmaster); Scoutmaster val5 = default(Scoutmaster); foreach (Player player in playerList) { GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); if (GUILayout.Button("Slow", val2, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(95f) })) { PEAKER.Logger.LogInfo((object)("Slowing down " + player.NickName + "...")); Character val3 = Character.AllCharacters.FindLast((Character character) => character.view.Owner.ActorNumber == player.ActorNumber && !((Component)character).TryGetComponent<Scoutmaster>(ref val6)); if ((Object)(object)val3 != (Object)null) { foreach (Bodypart part in val3.refs.ragdoll.partList) { Rigidbody rig = part.rig; rig.maxLinearVelocity *= 0.1f; if (part.rig.maxLinearVelocity < 0.1f) { part.rig.maxLinearVelocity = 0.1f; } } PEAKER.Logger.LogInfo((object)val3.refs.ragdoll.partList[0].rig.maxLinearVelocity); } } if (GUILayout.Button("Speed", val2, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(95f) })) { PEAKER.Logger.LogInfo((object)("Speeding up " + player.NickName + "...")); Character val4 = Character.AllCharacters.FindLast((Character character) => character.view.Owner.ActorNumber == player.ActorNumber && !((Component)character).TryGetComponent<Scoutmaster>(ref val5)); if ((Object)(object)val4 != (Object)null) { foreach (Bodypart part2 in val4.refs.ragdoll.partList) { Rigidbody rig2 = part2.rig; rig2.maxLinearVelocity *= 10f; if (part2.rig.maxLinearVelocity > 1E+16f) { part2.rig.maxLinearVelocity = 1E+16f; } } PEAKER.Logger.LogInfo((object)val4.refs.ragdoll.partList[0].rig.maxLinearVelocity); } } GUILayout.Label($"#{player.ActorNumber}: {player.NickName}", val, Array.Empty<GUILayoutOption>()); GUILayout.EndHorizontal(); } GUILayout.EndVertical(); } private void DrawSteamWindow(int windowID) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0016: 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: Expected O, but got Unknown //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_005d: 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_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Expected O, but got Unknown //IL_0080: 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_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: 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_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_0206: Unknown result type (might be due to invalid IL or missing references) //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) GUIStyle val = new GUIStyle(GUI.skin.label) { alignment = (TextAnchor)3, fontSize = 20, fixedHeight = 28f }; CSteamID currentLobby = GameHandler.GetService<SteamLobbyHandler>().m_currentLobby; if (currentLobby == CSteamID.Nil) { GUILayout.Label("Not in a Steam Lobby.", val, Array.Empty<GUILayoutOption>()); return; } GUIStyle val2 = new GUIStyle(GUI.skin.button) { fontSize = 20, fixedHeight = 28f }; GUILayout.BeginVertical(Array.Empty<GUILayoutOption>()); int numLobbyMembers = SteamMatchmaking.GetNumLobbyMembers(currentLobby); for (int i = 0; i < numLobbyMembers; i++) { CSteamID lobbyMemberByIndex = SteamMatchmaking.GetLobbyMemberByIndex(currentLobby, i); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); if (SteamUser.GetSteamID() == lobbyMemberByIndex) { GUILayout.Label("You", val, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(85f) }); } else if (bannedScouts.ContainsKey(lobbyMemberByIndex.m_SteamID)) { GUILayout.Label("BANNED", val, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(85f) }); if (ignoredScouts.Contains(lobbyMemberByIndex.m_SteamID)) { GUILayout.Label("IGNORED", val, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(95f) }); } else if (GUILayout.Button("Ignore", val2, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(95f) })) { PEAKER.Logger.LogInfo((object)$"Ignoring {lobbyMemberByIndex.m_SteamID}: {SteamFriends.GetFriendPersonaName(lobbyMemberByIndex)}..."); ignoredScouts.Add(lobbyMemberByIndex.m_SteamID); } } else if (GUILayout.Button("Ban", val2, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(85f) })) { PEAKER.Logger.LogInfo((object)$"Banning {lobbyMemberByIndex.m_SteamID}: {SteamFriends.GetFriendPersonaName(lobbyMemberByIndex)}..."); File.AppendAllText(Path.Combine(Paths.BepInExRootPath, "banned.txt"), $"\n{lobbyMemberByIndex.m_SteamID} | {SteamFriends.GetFriendPersonaName(lobbyMemberByIndex)} | No reason specified"); UpdateBannedScouts(); ignoredScouts.Add(lobbyMemberByIndex.m_SteamID); } GUILayout.Label($"{lobbyMemberByIndex.m_SteamID}: {SteamFriends.GetFriendPersonaName(lobbyMemberByIndex)}", val, Array.Empty<GUILayoutOption>()); GUILayout.EndHorizontal(); } GUILayout.EndVertical(); } internal static void BanScout(CSteamID steamId, string reason) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) PEAKER.Logger.LogInfo((object)$"Banning {steamId.m_SteamID}: {SteamFriends.GetFriendPersonaName(steamId)}..."); File.AppendAllText(Path.Combine(Paths.BepInExRootPath, "banned.txt"), $"\n{steamId.m_SteamID} | {SteamFriends.GetFriendPersonaName(steamId)} | {reason}"); UpdateBannedScouts(); ignoredScouts.Add(steamId.m_SteamID); } internal static void UnbanScout(CSteamID steamId) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) PEAKER.Logger.LogInfo((object)$"Unbanning {steamId.m_SteamID}: {SteamFriends.GetFriendPersonaName(steamId)}..."); string[] source = File.ReadAllLines(Path.Combine(Paths.BepInExRootPath, "banned.txt")); source = source.Where((string line) => !line.StartsWith(steamId.m_SteamID.ToString())).ToArray(); File.WriteAllLines(Path.Combine(Paths.BepInExRootPath, "banned.txt"), source); UpdateBannedScouts(); ignoredScouts.Remove(steamId.m_SteamID); } internal static void IgnoreScout(CSteamID steamId) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) PEAKER.Logger.LogInfo((object)$"Ignoring {steamId.m_SteamID}: {SteamFriends.GetFriendPersonaName(steamId)}"); ignoredScouts.Add(steamId.m_SteamID); } internal static void UpdateBannedScouts() { PEAKER.Logger.LogInfo((object)"Updating Banned Scouts..."); bannedScouts.Clear(); if (!File.Exists(Path.Combine(Paths.BepInExRootPath, "banned.txt"))) { File.WriteAllText(Path.Combine(Paths.BepInExRootPath, "banned.txt"), ""); } else { string[] array = File.ReadAllLines(Path.Combine(Paths.BepInExRootPath, "banned.txt")); foreach (string text in array) { int num = text.IndexOf('|'); if (num == -1) { num = text.Length; } ulong result; ulong num2 = (ulong.TryParse(text.Substring(0, num).Trim(), out result) ? result : 0); if (num2 != 0L && !bannedScouts.ContainsKey(num2)) { string value = string.Empty; if (num != text.Length) { string text2 = text; int num3 = num + 1; value = text2.Substring(num3, text2.Length - num3).Trim(); } bannedScouts.Add(num2, value); } } } foreach (ulong key in bannedScouts.Keys) { PEAKER.Logger.LogInfo((object)$"Banned Scout: {key} ({bannedScouts[key]})"); } } private static void OnLobbyChatUpdate(LobbyChatUpdate_t data) { //IL_0000: 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_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0031: 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) if (data.m_ulSteamIDLobby == GameHandler.GetService<SteamLobbyHandler>().m_currentLobby.m_SteamID) { if (data.m_rgfChatMemberStateChange == 1) { PEAKER.Logger.LogInfo((object)$"{SteamFriends.GetFriendPersonaName(new CSteamID(data.m_ulSteamIDUserChanged))} ({data.m_ulSteamIDUserChanged}) entered the Steam lobby."); return; } PEAKER.Logger.LogInfo((object)$"{SteamFriends.GetFriendPersonaName(new CSteamID(data.m_ulSteamIDUserChanged))} ({data.m_ulSteamIDUserChanged}) left the Steam lobby. ({(object)(EChatMemberStateChange)data.m_rgfChatMemberStateChange})"); ignoredScouts.Remove(data.m_ulSteamIDUserChanged); } } [HarmonyPatch(typeof(GameHandler), "Awake")] [HarmonyPostfix] internal static void PostGameHandlerAwake() { _onLobbyChatUpdateCallback = Callback<LobbyChatUpdate_t>.Create((DispatchDelegate<LobbyChatUpdate_t>)OnLobbyChatUpdate); } [HarmonyPatch(typeof(GameHandler), "OnDestroy")] [HarmonyPostfix] internal static void PostGameHandlerOnDestroy() { _onLobbyChatUpdateCallback?.Unregister(); } [HarmonyPatch(typeof(SteamLobbyHandler), "OnLobbyEnter")] [HarmonyPostfix] internal static void PostSteamLobbyHandlerOnLobbyEnter() { ignoredScouts.Clear(); } [HarmonyPatch(typeof(SteamLobbyHandler), "OnLobbyChat")] [HarmonyPrefix] internal static void PreSteamLobbyHandlerOnLobbyChat(SteamLobbyHandler __instance, ref LobbyChatMsg_t param) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_005a: 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_006b: 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) _lastSentChat = new CSteamID(param.m_ulSteamIDUser); PEAKER.Logger.LogInfo((object)$"Steam Chat Message Received: '{SteamFriends.GetFriendPersonaName(new CSteamID(param.m_ulSteamIDUser))}' ({param.m_ulSteamIDUser})"); int numLobbyMembers = SteamMatchmaking.GetNumLobbyMembers(__instance.m_currentLobby); for (int i = 0; i < numLobbyMembers; i++) { PEAKER.Logger.LogInfo((object)$"Steam Lobby Member: '{SteamFriends.GetFriendPersonaName(SteamMatchmaking.GetLobbyMemberByIndex(__instance.m_currentLobby, i))}' ({SteamMatchmaking.GetLobbyMemberByIndex(__instance.m_currentLobby, i).m_SteamID})"); } } [HarmonyPatch(typeof(SteamLobbyHandler), "SendRoomID")] [HarmonyPrefix] internal static bool PreSteamLobbyHandlerSendRoomID(SteamLobbyHandler __instance) { //IL_000a: 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_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_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Unknown result type (might be due to invalid IL or missing references) if (!PhotonNetwork.IsMasterClient) { return true; } int numLobbyMembers = SteamMatchmaking.GetNumLobbyMembers(__instance.m_currentLobby); for (int i = 0; i < numLobbyMembers; i++) { CSteamID lobbyMemberByIndex = SteamMatchmaking.GetLobbyMemberByIndex(__instance.m_currentLobby, i); PEAKER.Logger.LogInfo((object)$"Checking banned and !ignored status for '{SteamFriends.GetFriendPersonaName(lobbyMemberByIndex)}' ({lobbyMemberByIndex.m_SteamID}): {bannedScouts.ContainsKey(lobbyMemberByIndex.m_SteamID)} {!ignoredScouts.Contains(lobbyMemberByIndex.m_SteamID)}"); if (bannedScouts.ContainsKey(lobbyMemberByIndex.m_SteamID) && !ignoredScouts.Contains(lobbyMemberByIndex.m_SteamID)) { PEAKER.Logger.LogWarning((object)$"'{SteamFriends.GetFriendPersonaName(_lastSentChat)}' ({_lastSentChat.m_SteamID}) tried to join, but there is a banned user in the lobby: '{SteamFriends.GetFriendPersonaName(lobbyMemberByIndex)}' ({lobbyMemberByIndex.m_SteamID}) not letting them in..."); PEAKER.LogVisually($"{{userColor}} {SteamFriends.GetFriendPersonaName(_lastSentChat)}' ({_lastSentChat.m_SteamID})</color>{{joinedColor}} tried to join, but</color>{{userColor}} {SteamFriends.GetFriendPersonaName(lobbyMemberByIndex)} ({lobbyMemberByIndex.m_SteamID})</color>{{leftColor}} is banned! Not letting them in...", onlySendOnce: false, sfxJoin: false, sfxLeave: true); string text = Guid.NewGuid().ToString(); string[] obj = new string[5] { text.Substring(0, 14), (new char[15] { '0', '1', '2', '3', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' })[Random.Range(0, 15)].ToString(), text.Substring(15, 4), (new char[12] { '0', '1', '2', '3', '4', '5', '6', '7', 'c', 'd', 'e', 'f' })[Random.Range(0, 12)].ToString(), null }; string text2 = text; obj[4] = text2.Substring(20, text2.Length - 20); text = string.Concat(obj); BinarySerializer val = new BinarySerializer(256, (Allocator)2); val.WriteByte((byte)2); val.WriteString(text, Encoding.ASCII); byte[] array = NativeArrayExtensions.ToByteArray(val.buffer); val.Dispose(); if (!SteamMatchmaking.SendLobbyChatMsg(__instance.m_currentLobby, array, array.Length)) { __instance.m_currentlyRequestingRoomID = Optionable<CSteamID>.None; Debug.LogError((object)"Failed to send Room ID..."); return false; } Debug.Log((object)("Lobby has been requested. Sending " + text + " (fake room)")); return false; } } return true; } } public class CheatDetections : MonoBehaviour, IInRoomCallbacks, ILobbyCallbacks { private enum OwnershipCondition { None, IsMasterClient, IsViewOwner, IsMasterClientOrViewOwner } [CompilerGenerated] private sealed class <CheckScoutsForMods>d__16 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public CheatDetections <>4__this; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <CheckScoutsForMods>d__16(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Expected O, but got Unknown int num = <>1__state; CheatDetections cheatDetections = <>4__this; if (num != 0) { if (num != 1) { return false; } <>1__state = -1; if (PhotonNetwork.InRoom) { foreach (Player value in PhotonNetwork.CurrentRoom.Players.Values) { cheatDetections.CheckScoutForMods(value); } } } else { <>1__state = -1; } <>2__current = (object)new WaitForSeconds(5f); <>1__state = 1; return true; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } internal static readonly HashSet<int> ignoredPlayerNumbers = new HashSet<int>(); internal void Awake() { //IL_001e: 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_0039: Expected O, but got Unknown //IL_0039: Expected O, but got Unknown PEAKER.Logger.LogInfo((object)"Checking cheat detections"); if (!PEAKER.Config.Bind<bool>(new ConfigDefinition("Cheat Detections", "Enabled"), true, new ConfigDescription("Whether or not to enable PEAKER's cheat detections. Will be ignored is PEAKAntiCheat is in use. (Client)", (AcceptableValueBase)null, Array.Empty<object>())).Value || BannedScouts.ListeningForCheatDetections) { PEAKER.Logger.LogInfo((object)"Cheat detections not enabled"); Object.DestroyImmediate((Object)(object)this); } else { PEAKER.Logger.LogInfo((object)"Cheat detections enabled"); ((MonoBehaviour)this).StartCoroutine(CheckScoutsForMods()); PEAKER.Patches.PatchAll(typeof(CheatDetections)); } } internal void OnEnable() { PhotonNetwork.AddCallbackTarget((object)this); } internal void OnDisable() { PhotonNetwork.RemoveCallbackTarget((object)this); } public static bool IsIgnored(Player player) { if (player != null) { return ignoredPlayerNumbers.Contains(player.ActorNumber); } return false; } internal static void IgnorePlayer(Player player) { if (player != null) { PEAKER.Logger.LogInfo((object)$"Ignoring #{player.ActorNumber}: {player.NickName}"); ignoredPlayerNumbers.Add(player.ActorNumber); } } internal static void UnignorePlayer(Player player) { if (player != null) { PEAKER.Logger.LogInfo((object)$"Unignoring #{player.ActorNumber}: {player.NickName}"); ignoredPlayerNumbers.Remove(player.ActorNumber); } } public void OnPlayerEnteredRoom(Player newPlayer) { } public void OnPlayerLeftRoom(Player otherPlayer) { UnignorePlayer(otherPlayer); } public void OnRoomPropertiesUpdate(Hashtable propertiesThatChanged) { } public void OnPlayerPropertiesUpdate(Player targetPlayer, Hashtable changedProps) { if (((Dictionary<object, object>)(object)changedProps).ContainsKey((object)"NickName")) { PEAKER.Logger.LogInfo((object)$"{targetPlayer.NickName} (#{targetPlayer.ActorNumber}) changed their Photon name!"); PEAKER.LogVisually("{userColor} " + targetPlayer.NickName + "</color>{joinedColor} changed their Photon name!", onlySendOnce: true, sfxJoin: true); } } public void OnMasterClientSwitched(Player newMasterClient) { //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) //IL_0052: Unknown result type (might be due to invalid IL or missing references) PEAKER.Logger.LogInfo((object)$"{newMasterClient.NickName} (#{newMasterClient.ActorNumber}) is the new owner of the lobby!"); PEAKER.LogVisually("{userColor} " + newMasterClient.NickName + "</color>{joinedColor} is the new owner of the lobby!", onlySendOnce: true, sfxJoin: true); if (SteamMatchmaking.GetLobbyOwner(GameHandler.GetService<SteamLobbyHandler>().m_currentLobby) == SteamUser.GetSteamID()) { PEAKER.Logger.LogInfo((object)"Ownership of the lobby was taken from you! Taking it back..."); PEAKER.LogVisually("{leftColor} Ownership of the lobby was taken from you! Taking it back...", onlySendOnce: true, sfxJoin: false, sfxLeave: true); PhotonNetwork.SetMasterClient(PhotonNetwork.LocalPlayer); } } public void OnJoinedLobby() { ignoredPlayerNumbers.Clear(); } public void OnLeftLobby() { ignoredPlayerNumbers.Clear(); } public void OnRoomListUpdate(List<RoomInfo> roomList) { } public void OnLobbyStatisticsUpdate(List<TypedLobbyInfo> lobbyStatistics) { } [IteratorStateMachine(typeof(<CheckScoutsForMods>d__16))] private IEnumerator CheckScoutsForMods() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <CheckScoutsForMods>d__16(0) { <>4__this = this }; } private void CheckScoutForMods(Player player) { if (player.ActorNumber != PhotonNetwork.LocalPlayer.ActorNumber && !ignoredPlayerNumbers.Contains(player.ActorNumber)) { if (((Dictionary<object, object>)(object)player.CustomProperties).ContainsKey((object)"CherryUser")) { PEAKER.LogVisually("{userColor} " + player.NickName + "</color>{leftColor} is using the Cherry mod!</color>", onlySendOnce: true); } if (((Dictionary<object, object>)(object)player.CustomProperties).ContainsKey((object)"CherryOwner")) { PEAKER.LogVisually("{userColor} " + player.NickName + "</color>{leftColor} is the Owner of the Cherry mod!</color>", onlySendOnce: true); } if (((Dictionary<object, object>)(object)player.CustomProperties).ContainsKey((object)"AtlUser")) { PEAKER.LogVisually("{userColor} " + player.NickName + "</color>{leftColor} is using the Atlas mod!</color>", onlySendOnce: true); } if (((Dictionary<object, object>)(object)player.CustomProperties).ContainsKey((object)"AtlOwner")) { PEAKER.LogVisually("{userColor} " + player.NickName + "</color>{leftColor} is the Owner of the Atlas mod!</color>", onlySendOnce: true); } } } private static bool IsRpcValid(PhotonView view, Player sender, OwnershipCondition ownershipCondition, Func<bool> validCondition = null) { if (sender == null || ignoredPlayerNumbers.Contains(sender.ActorNumber)) { return true; } switch (ownershipCondition) { case OwnershipCondition.IsMasterClient: if (sender.IsMasterClient) { return true; } break; case OwnershipCondition.IsViewOwner: if (sender.ActorNumber == view.Owner.ActorNumber) { return true; } break; case OwnershipCondition.IsMasterClientOrViewOwner: if (sender.IsMasterClient || sender.ActorNumber == view.Owner.ActorNumber) { return true; } break; } return validCondition?.Invoke() ?? true; } [HarmonyPatch(typeof(BananaPeel), "RPCA_TriggerBanana")] [HarmonyPostfix] internal static void PostBananaPeelRPCA_TriggerBanana(int viewID, ref PhotonMessageInfo info) { if (!IsRpcValid(PhotonView.Find(viewID), info.Sender, OwnershipCondition.IsViewOwner)) { PEAKER.Logger.LogWarning((object)$"{info.Sender.NickName} (#{info.Sender.ActorNumber}) slipped {PhotonView.Find(viewID).Owner.NickName} (#{PhotonView.Find(viewID).Owner.ActorNumber})!"); PEAKER.LogVisually("{userColor} " + info.Sender.NickName + "</color>{leftColor} slipped</color>{userColor} " + PhotonView.Find(viewID).Owner.NickName + "!</color>", onlySendOnce: false, sfxJoin: false, sfxLeave: true); } } [HarmonyPatch(typeof(BeeSwarm), "DisperseRPC")] [HarmonyPostfix] internal static void PostBeeSwarmDisperseRPC(BeeSwarm __instance, ref PhotonMessageInfo info) { if (!IsRpcValid(((MonoBehaviourPun)__instance).photonView, info.Sender, OwnershipCondition.IsMasterClient)) { PEAKER.Logger.LogWarning((object)$"{info.Sender.NickName} (#{info.Sender.ActorNumber}) dispersed a swarm!"); PEAKER.LogVisually("{userColor} " + info.Sender.NickName + "</color>{leftColor} dispersed a swarm!</color>", onlySendOnce: false, sfxJoin: false, sfxLeave: true); } } [HarmonyPatch(typeof(BeeSwarm), "SetBeesAngryRPC")] [HarmonyPostfix] internal static void PostBeeSwarmSetBeesAngryRPC(BeeSwarm __instance, ref PhotonMessageInfo info) { if (!IsRpcValid(((MonoBehaviourPun)__instance).photonView, info.Sender, OwnershipCondition.IsMasterClient)) { PEAKER.Logger.LogWarning((object)$"{info.Sender.NickName} (#{info.Sender.ActorNumber}) changed a swarm's anger!"); PEAKER.LogVisually("{userColor} " + info.Sender.NickName + "</color>{leftColor} changed a swarm's anger!</color>", onlySendOnce: false, sfxJoin: false, sfxLeave: true); } } [HarmonyPatch(typeof(Bugfix), "AttachBug")] [HarmonyPostfix] internal static void PostBugfixAttachBug(int targetID, ref PhotonMessageInfo info) { if (!IsRpcValid(PhotonView.Find(targetID), info.Sender, OwnershipCondition.IsViewOwner)) { PEAKER.Logger.LogWarning((object)$"{info.Sender.NickName} (#{info.Sender.ActorNumber}) attached a tick to {PhotonView.Find(targetID).Owner.NickName} (#{PhotonView.Find(targetID).Owner.ActorNumber})!"); PEAKER.LogVisually("{userColor} " + info.Sender.NickName + "</color>{leftColor} attached a tick to</color>{userColor} " + PhotonView.Find(targetID).Owner.NickName + "!</color>", onlySendOnce: false, sfxJoin: false, sfxLeave: true); } } [HarmonyPatch(typeof(Flare), "TriggerHelicopter")] [HarmonyPostfix] internal static void PostFlareTriggerHelicopter(Flare __instance, ref PhotonMessageInfo info) { if (!IsRpcValid(((ItemComponent)__instance).photonView, info.Sender, OwnershipCondition.None, () => Singleton<PeakHandler>.Instance.summonedHelicopter || (((ItemComponent)__instance).GetData<BoolItemData>((DataEntryKey)3).Value && Singleton<MountainProgressHandler>.Instance.IsAtPeak(((Component)__instance).transform.position + new Vector3(0f, 0f, 10f))))) { PEAKER.Logger.LogWarning((object)$"{info.Sender.NickName} (#{info.Sender.ActorNumber}) triggered the helicopter!"); PEAKER.LogVisually("{userColor} " + info.Sender.NickName + "</color>{leftColor} triggered the helicopter!</color>", onlySendOnce: false, sfxJoin: false, sfxLeave: true); } } [HarmonyPatch(typeof(Campfire), "SetFireWoodCount")] [HarmonyPrefix] internal static bool PreCampfireSetFireWoodCount(Campfire __instance, int count, ref PhotonMessageInfo info) { //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Invalid comparison between Unknown and I4 bool flag = IsRpcValid(__instance.view, info.Sender, OwnershipCondition.IsMasterClient, () => (int)__instance.state == 2 && count == 0); if (!flag) { PEAKER.Logger.LogWarning((object)$"{info.Sender.NickName} (#{info.Sender.ActorNumber}) tried to set the log count to {count} for the {__instance.advanceToSegment} campfire!"); if (PhotonNetwork.IsMasterClient) { __instance.view.RPC("SetFireWoodCount", (RpcTarget)0, new object[1] { ((int)__instance.state != 2) ? 3 : 0 }); } } return flag; } [HarmonyPatch(typeof(Campfire), "Extinguish_Rpc")] [HarmonyPrefix] internal static bool PreCampfireExtinguish_Rpc(Campfire __instance, ref PhotonMessageInfo info) { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) bool num = IsRpcValid(__instance.view, info.Sender, OwnershipCondition.IsMasterClient); if (!num) { PEAKER.Logger.LogWarning((object)$"{info.Sender.NickName} (#{info.Sender.ActorNumber}) tried to extinguish the {__instance.advanceToSegment} campfire!"); PEAKER.LogVisually($"{{userColor}} {info.Sender.NickName}</color>{{leftColor}} tried to extinguish the {__instance.advanceToSegment} campfire!</color>", onlySendOnce: false, sfxJoin: false, sfxLeave: true); } return num; } [HarmonyPatch(typeof(Character), "RPCEndGame")] [HarmonyPatch(typeof(Character), "RPCEndGame_ForceWin")] [HarmonyPostfix] internal static void PostCharacterRPCEndGame(Character __instance, ref PhotonMessageInfo info) { if (!IsRpcValid(__instance.view, info.Sender, OwnershipCondition.IsMasterClient)) { PEAKER.Logger.LogWarning((object)$"{info.Sender.NickName} (#{info.Sender.ActorNumber}) forcefully won!</color>"); PEAKER.LogVisually("{userColor} " + info.Sender.NickName + "</color>{leftColor} forcefully won!</color>", onlySendOnce: false, sfxJoin: false, sfxLeave: true); } } [HarmonyPatch(typeof(Character), "RPCA_Die")] [HarmonyPostfix] internal static void PostCharacterRPCA_Die(Character __instance, ref PhotonMessageInfo info) { if (!IsRpcValid(__instance.view, info.Sender, OwnershipCondition.IsMasterClientOrViewOwner)) { PEAKER.Logger.LogWarning((object)$"{info.Sender.NickName} (#{info.Sender.ActorNumber}) killed {__instance.view.Owner.NickName} (#{__instance.view.Owner.ActorNumber})!"); PEAKER.LogVisually("{userColor} " + info.Sender.NickName + "</color>{leftColor} killed</color>{userColor} " + __instance.view.Owner.NickName + "!</color>", onlySendOnce: false, sfxJoin: false, sfxLeave: true); } } [HarmonyPatch(typeof(Character), "RPCA_Revive")] [HarmonyPatch(typeof(Character), "RPCA_ReviveAtPosition")] [HarmonyPostfix] internal static void PostCharacterRPCA_ReviveAtPosition(Character __instance, ref PhotonMessageInfo info) { if (!IsRpcValid(__instance.view, info.Sender, OwnershipCondition.IsMasterClient)) { PEAKER.Logger.LogWarning((object)$"{info.Sender.NickName} (#{info.Sender.ActorNumber}) revived {__instance.view.Owner.NickName} (#{__instance.view.Owner.ActorNumber})!"); PEAKER.LogVisually("{userColor} " + info.Sender.NickName + "</color>{leftColor} revived</color>{userColor} " + __instance.view.Owner.NickName + "!</color>", onlySendOnce: false, sfxJoin: false, sfxLeave: true); } } [HarmonyPatch(typeof(Character), "WarpPlayerRPC")] [HarmonyPostfix] internal static void PostCharacterWarpPlayerRPC(Character __instance, ref PhotonMessageInfo info) { if (!IsRpcValid(__instance.view, info.Sender, OwnershipCondition.IsMasterClientOrViewOwner)) { PEAKER.Logger.LogWarning((object)$"{info.Sender.NickName} (#{info.Sender.ActorNumber}) warped {__instance.view.Owner.NickName} (#{__instance.view.Owner.ActorNumber})!"); PEAKER.LogVisually("{userColor} " + info.Sender.NickName + "</color>{leftColor} warped</color>{userColor} " + __instance.view.Owner.NickName + "!</color>", onlySendOnce: false, sfxJoin: false, sfxLeave: true); } } [HarmonyPatch(typeof(PlayerGhost), "RPCA_InitGhost")] [HarmonyPostfix] internal static void PostPlayerGhostRPCA_InitGhost(PlayerGhost __instance, ref PhotonMessageInfo info) { if (!IsRpcValid(__instance.m_view, info.Sender, OwnershipCondition.IsViewOwner)) { PEAKER.Logger.LogWarning((object)$"{info.Sender.NickName} (#{info.Sender.ActorNumber}) inited the ghost of {__instance.m_view.Owner.NickName} (#{__instance.m_view.Owner.ActorNumber})!"); PEAKER.LogVisually("{userColor} " + info.Sender.NickName + "</color>{leftColor} inited the ghost of</color>{userColor} " + __instance.m_view.Owner.NickName + "!</color>", onlySendOnce: false, sfxJoin: false, sfxLeave: true); } } [HarmonyPatch(typeof(PlayerGhost), "RPCA_SetTarget")] [HarmonyPostfix] internal static void PostPlayerGhostRPCA_SetTarget(PlayerGhost __instance, ref PhotonMessageInfo info) { if (!IsRpcValid(__instance.m_view, info.Sender, OwnershipCondition.IsViewOwner)) { PEAKER.Logger.LogWarning((object)$"{info.Sender.NickName} (#{info.Sender.ActorNumber}) controlled the ghost of {__instance.m_view.Owner.NickName} (#{__instance.m_view.Owner.ActorNumber})!"); PEAKER.LogVisually("{userColor} " + info.Sender.NickName + "</color>{leftColor} controlled the ghost of</color>{userColor} " + __instance.m_view.Owner.NickName + "!</color>", onlySendOnce: false, sfxJoin: false, sfxLeave: true); } } [HarmonyPatch(typeof(EruptionSpawner), "RPCA_SpawnEruption")] [HarmonyPostfix] internal static void PostEruptionSpawnerRPCA_SpawnEruption(EruptionSpawner __instance, ref PhotonMessageInfo info) { if (!IsRpcValid(__instance.photonView, info.Sender, OwnershipCondition.IsMasterClient)) { PEAKER.Logger.LogWarning((object)$"{info.Sender.NickName} (#{info.Sender.ActorNumber}) spawned an eruption!"); PEAKER.LogVisually("{userColor} " + info.Sender.NickName + "</color>{leftColor} spawned an eruption!</color>", onlySendOnce: false, sfxJoin: false, sfxLeave: true); } } [HarmonyPatch(typeof(MagicBean), "GrowVineRPC")] [HarmonyPostfix] internal static void PostMagicBeanGrowVineRPC(MagicBean __instance, ref PhotonMessageInfo info) { if (!IsRpcValid(((ItemComponent)__instance).photonView, info.Sender, OwnershipCondition.IsMasterClient)) { PEAKER.Logger.LogWarning((object)$"{info.Sender.NickName} (#{info.Sender.ActorNumber}) grew a magic bean!"); PEAKER.LogVisually("{userColor} " + info.Sender.NickName + "</color>{leftColor} grew a magic bean!</color>", onlySendOnce: false, sfxJoin: false, sfxLeave: true); } } [HarmonyPatch(typeof(OrbFogHandler), "StartMovingRPC")] [HarmonyPostfix] internal static void PostOrbFogHandlerStartMovingRPC(OrbFogHandler __instance, ref PhotonMessageInfo info) { if (!IsRpcValid(__instance.photonView, info.Sender, OwnershipCondition.IsMasterClient)) { PEAKER.Logger.LogWarning((object)$"{info.Sender.NickName} (#{info.Sender.ActorNumber}) started the fog!"); PEAKER.LogVisually("{userColor} " + info.Sender.NickName + "</color>{leftColor} started the fog!</color>", onlySendOnce: false, sfxJoin: false, sfxLeave: true); } } [HarmonyPatch(typeof(OrbFogHandler), "RPCA_SyncFog")] [HarmonyPostfix] internal static void PostOrbFogHandlerRPCA_SyncFog(OrbFogHandler __instance, ref PhotonMessageInfo info) { if (!IsRpcValid(__instance.photonView, info.Sender, OwnershipCondition.IsMasterClient)) { PEAKER.Logger.LogWarning((object)$"{info.Sender.NickName} (#{info.Sender.ActorNumber}) synced the fog!"); PEAKER.LogVisually("{userColor} " + info.Sender.NickName + "</color>{leftColor} synced the fog!</color>", onlySendOnce: false, sfxJoin: false, sfxLeave: true); } } [HarmonyPatch(typeof(AirportCheckInKiosk), "BeginIslandLoadRPC")] [HarmonyPostfix] internal static void PostAirportCheckInKioskBeginIslandLoadRPC(AirportCheckInKiosk __instance, ref PhotonMessageInfo info) { if (!IsRpcValid(((MonoBehaviourPun)__instance).photonView, info.Sender, OwnershipCondition.IsMasterClient)) { PEAKER.Logger.LogWarning((object)$"{info.Sender.NickName} (#{info.Sender.ActorNumber}) started the game!"); PEAKER.LogVisually("{userColor} " + info.Sender.NickName + "</color>{leftColor} started the game!</color>", onlySendOnce: false, sfxJoin: false, sfxLeave: true); } } [HarmonyPatch(typeof(GameOverHandler), "BeginIslandLoadRPC")] [HarmonyPostfix] internal static void PostGameOverHandlerBeginIslandLoadRPC(AirportCheckInKiosk __instance, ref PhotonMessageInfo info) { if (!IsRpcValid(((MonoBehaviourPun)__instance).photonView, info.Sender, OwnershipCondition.IsMasterClient)) { PEAKER.Logger.LogWarning((object)$"{info.Sender.NickName} (#{info.Sender.ActorNumber}) loaded the airport!"); PEAKER.LogVisually("{userColor} " + info.Sender.NickName + "</color>{leftColor} loaded the airport!</color>", onlySendOnce: false, sfxJoin: false, sfxLeave: true); } } [HarmonyPatch(typeof(BreakableBridge), "ShakeBridge_Rpc")] [HarmonyPostfix] internal static void PostBreakableBridgeShakeBridge_Rpc(BreakableBridge __instance, ref PhotonMessageInfo info) { if (!IsRpcValid(__instance.photonView, info.Sender, OwnershipCondition.IsMasterClient)) { PEAKER.Logger.LogWarning((object)$"{info.Sender.NickName} (#{info.Sender.ActorNumber}) shook a bridge!"); PEAKER.LogVisually("{userColor} " + info.Sender.NickName + "</color>{leftColor} shook a bridge!</color>", onlySendOnce: false, sfxJoin: false, sfxLeave: true); } } [HarmonyPatch(typeof(BreakableBridge), "Fall_Rpc")] [HarmonyPostfix] internal static void PostBreakableBridgeFall_Rpc(BreakableBridge __instance, ref PhotonMessageInfo info) { if (!IsRpcValid(__instance.photonView, info.Sender, OwnershipCondition.IsMasterClient)) { PEAKER.Logger.LogWarning((object)$"{info.Sender.NickName} (#{info.Sender.ActorNumber}) made a bridge fall!"); PEAKER.LogVisually("{userColor} " + info.Sender.NickName + "</color>{leftColor} made a bridge fall!</color>", onlySendOnce: false, sfxJoin: false, sfxLeave: true); } } [HarmonyPatch(typeof(Rope), "Detach_Rpc")] [HarmonyPostfix] internal static void PostRopeDetach_Rpc(Rope __instance, ref PhotonMessageInfo info) { if (!IsRpcValid(__instance.view, info.Sender, OwnershipCondition.IsMasterClient)) { PEAKER.Logger.LogWarning((object)$"{info.Sender.NickName} (#{info.Sender.ActorNumber}) detached a rope!"); PEAKER.LogVisually("{userColor} " + info.Sender.NickName + "</color>{leftColor} detached a rope!</color>", onlySendOnce: false, sfxJoin: false, sfxLeave: true); } } [HarmonyPatch(typeof(ShakyIcicleIce2), "ShakeRock_Rpc")] [HarmonyPostfix] internal static void PostShakyIcicleIce2ShakeRock_Rpc(ShakyIcicleIce2 __instance, ref PhotonMessageInfo info) { if (!IsRpcValid(__instance.photonView, info.Sender, OwnershipCondition.IsMasterClient)) { PEAKER.Logger.LogWarning((object)$"{info.Sender.NickName} (#{info.Sender.ActorNumber}) shook an icicle!"); PEAKER.LogVisually("{userColor} " + info.Sender.NickName + "</color>{leftColor} shook an icicle!</color>", onlySendOnce: false, sfxJoin: false, sfxLeave: true); } } [HarmonyPatch(typeof(ShakyIcicleIce2), "Fall_Rpc")] [HarmonyPostfix] internal static void PostShakyIcicleIce2Fall_Rpc(ShakyIcicleIce2 __instance, ref PhotonMessageInfo info) { if (!IsRpcValid(__instance.photonView, info.Sender, OwnershipCondition.IsMasterClient)) { PEAKER.Logger.LogWarning((object)$"{info.Sender.NickName} (#{info.Sender.ActorNumber}) made an icicle fall!"); PEAKER.LogVisually("{userColor} " + info.Sender.NickName + "</color>{leftColor} made an icicle fall!</color>", onlySendOnce: false, sfxJoin: false, sfxLeave: true); } } [HarmonyPatch(typeof(ShittyPiton), "RPCA_StartBreaking")] [HarmonyPostfix] internal static void PostShittyPitonRPCA_StartBreaking(ShittyPiton __instance, ref PhotonMessageInfo info) { if (!IsRpcValid(__instance.view, info.Sender, OwnershipCondition.IsMasterClient)) { PEAKER.Logger.LogWarning((object)$"{info.Sender.NickName} (#{info.Sender.ActorNumber}) started breaking a pitton!"); PEAKER.LogVisually("{userColor} " + info.Sender.NickName + "</color>{leftColor} started breaking a pitton!</color>", onlySendOnce: false, sfxJoin: false, sfxLeave: true); } } [HarmonyPatch(typeof(ShittyPiton), "RPCA_Break")] [HarmonyPostfix] internal static void PostShittyPitonRPCA_Break(ShittyPiton __instance, ref PhotonMessageInfo info) { if (!IsRpcValid(__instance.view, info.Sender, OwnershipCondition.IsMasterClient)) { PEAKER.Logger.LogWarning((object)$"{info.Sender.NickName} (#{info.Sender.ActorNumber}) broke a pitton!"); PEAKER.LogVisually("{userColor} " + info.Sender.NickName + "</color>{leftColor} broke a pitton!</color>", onlySendOnce: false, sfxJoin: false, sfxLeave: true); } } [HarmonyPatch(typeof(PhotonNetwork), "NetworkInstantiate", new Type[] { typeof(InstantiateParameters), typeof(bool), typeof(bool) })] [HarmonyPostfix] internal static void PostPhotonNetworkNetworkInstantiate(ref InstantiateParameters parameters, ref GameObject __result, bool instantiateEvent) { if (!instantiateEvent || (Object)(object)__result == (Object)null) { return; } PEAKER.Logger.LogInfo((object)$"{parameters.creator.NickName} (#{parameters.creator.ActorNumber}) instantiated the '{parameters.prefabName}' prefab."); string name = ((Object)__result).name; int num = ((Object)__result).name.LastIndexOf('/') + 1; string text = name.Substring(num, name.Length - num); if (text == null) { return; } switch (text.Length) { case 13: switch (text[9]) { default: return; case 'B': if (!(text == "Bingbong_Blow")) { return; } break; case 'G': if (!(text == "Bingbong_Grab")) { return; } break; case 'P': if (!(text == "Bingbong_Push")) { return; } break; case 'S': if (!(text == "Bingbong_Suck")) { return; } break; } goto IL_0119; case 8: if (!(text == "BeeSwarm")) { break; } goto IL_0119; case 20: if (!(text == "Bingbong_Push_Gentle")) { break; } goto IL_0119; case 7: { if (!(text == "Tornado")) { break; } goto IL_0119; } IL_0119: PEAKER.LogVisually("{userColor} " + parameters.creator.NickName + "</color>{leftColor} instantiated the '" + parameters.prefabName + "' prefab!</color>", onlySendOnce: false, sfxJoin: false, sfxLeave: true); break; } } } public enum CharacterPhysicsOptimizationMode { None, DisableCollidersWhenDead } public class ClientImprovements : MonoBehaviour, IInRoomCallbacks { internal static ConfigEntry<CharacterPhysicsOptimizationMode> characterPhysicsOptimizationMode; internal void Awake() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Expected O, but got Unknown //IL_002a: Expected O, but got Unknown characterPhysicsOptimizationMode = PEAKER.Config.Bind<CharacterPhysicsOptimizationMode>(new ConfigDefinition("Client Improvements", "CharacterPhysicsOptimizationMode"), CharacterPhysicsOptimizationMode.DisableCollidersWhenDead, new ConfigDescription("Decides how to optimize the physics of scout's characters. DisableCollidersWhenDead will prevent the lag caused by every dead character's colliders overlapping at one point in the void.", (AcceptableValueBase)null, Array.Empty<object>())); PEAKER.Patches.PatchAll(typeof(ClientImprovements)); } internal void OnEnable() { PhotonNetwork.AddCallbackTarget((object)this); } internal void OnDisable() { PhotonNetwork.RemoveCallbackTarget((object)this); } public void OnPlayerEnteredRoom(Player newPlayer) { } public void OnPlayerLeftRoom(Player otherPlayer) { } public void OnRoomPropertiesUpdate(Hashtable propertiesThatChanged) { } public void OnPlayerPropertiesUpdate(Player targetPlayer, Hashtable changedProps) { } public void OnMasterClientSwitched(Player newMasterClient) { } [HarmonyPatch(typeof(Character), "RPCA_Die")] [HarmonyPostfix] internal static void PostCharacterRPCA_Die(Character __instance) { if (characterPhysicsOptimizationMode.Value == CharacterPhysicsOptimizationMode.DisableCollidersWhenDead) { __instance.refs.ragdoll.ToggleCollision(false); } } [HarmonyPatch(typeof(Character), "RPCA_Revive")] [HarmonyPrefix] internal static void PreCharacterRPCA_Revive(Character __instance) { if (characterPhysicsOptimizationMode.Value == CharacterPhysicsOptimizationMode.DisableCollidersWhenDead) { __instance.refs.ragdoll.ToggleCollision(true); } } [HarmonyPatch(typeof(CharacterCustomization), "OnPlayerDataChange")] [HarmonyPrefix] internal static void PreCharacterCustomizationOnPlayerDataChange(CharacterCustomization __instance, PersistentPlayerData playerData) { CharacterCustomizationData customizationData = playerData.customizationData; customizationData.currentSkin %= Singleton<Customization>.Instance.skins.Length; CharacterCustomizationData customizationData2 = playerData.customizationData; customizationData2.currentAccessory %= Singleton<Customization>.Instance.accessories.Length; CharacterCustomizationData customizationData3 = playerData.customizationData; customizationData3.currentEyes %= Singleton<Customization>.Instance.eyes.Length; CharacterCustomizationData customizationData4 = playerData.customizationData; customizationData4.currentMouth %= Singleton<Customization>.Instance.mouths.Length; CharacterCustomizationData customizationData5 = playerData.customizationData; customizationData5.currentOutfit %= Singleton<Customization>.Instance.fits.Length; CharacterCustomizationData customizationData6 = playerData.customizationData; customizationData6.currentHat %= Singleton<Customization>.Instance.hats.Length; CharacterCustomizationData customizationData7 = playerData.customizationData; customizationData7.currentSash %= __instance.refs.sashAscentMaterials.Length; } [HarmonyPatch(typeof(PhotonNetwork), "RPC", new Type[] { typeof(PhotonView), typeof(string), typeof(RpcTarget), typeof(Player), typeof(bool), typeof(object[]) })] [HarmonyPrefix] internal static void PrePhotonNetworkRPC(PhotonView view, string methodName, ref RpcTarget target) { if ((int)target == 3 || (int)target == 4 || (int)target == 6) { if (methodName == "RemoveSkeletonRPC" && (int)target == 3) { target = (RpcTarget)0; PEAKER.Logger.LogInfo((object)$"Changed Buffering of RPC: '{((Component)view).gameObject}'-'{methodName}' {target}"); } else { PEAKER.Logger.LogInfo((object)$"Buffering RPC: '{((Component)view).gameObject}'-'{methodName}' {target}"); } } } [HarmonyPatch(typeof(GameHandler), "Initialize")] [HarmonyPostfix] internal static void PostGameHandlerInitialize() { ((Setting)GameHandler.Instance.SettingsHandler.GetSetting<LobbyTypeSetting>()).RegisterListener((Action<Setting>)OnLobbyTypeSettingChanged); ((Setting)GameHandler.Instance.SettingsHandler.GetSetting<LobbyTypeSetting>()).RegisterExternalListener((Action<Setting>)OnLobbyTypeSettingChanged); } private static void OnLobbyTypeSettingChanged(Setting setting) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: 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_002a: Unknown result type (might be due to invalid IL or missing references) LobbyTypeSetting val = (LobbyTypeSetting)(object)((setting is LobbyTypeSetting) ? setting : null); if (val != null) { CSteamID currentLobby = GameHandler.GetService<SteamLobbyHandler>().m_currentLobby; if (SteamMatchmaking.GetLobbyOwner(currentLobby) == SteamUser.GetSteamID()) { SteamMatchmaking.SetLobbyType(currentLobby, (ELobbyType)(((int)((EnumSetting<LobbyType>)(object)val).Value == 0) ? 1 : 0)); } } } [HarmonyPatch(typeof(LobbyTypeSetting), "ShouldShow")] [HarmonyPrefix] internal static bool PreLobbyTypeSettingShouldShow(ref bool __result) { __result = true; return false; } } public sealed class Gui : MonoBehaviour { private enum Guis { None, Actions, Scouts, No_Fly_List, Config } private static class ActionsGui { public static Rect rect = new Rect(0f, 0f, 220f, -1f); public static void DrawGui(int _) { //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Invalid comparison between Unknown and I4 //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) GUILayout.BeginVertical(Array.Empty<GUILayoutOption>()); GUI.enabled = PhotonNetwork.IsMasterClient; if (GUILayout.Button((StartKioskLock.StartKioskLocked ? "Unlock" : "Lock") + " Start Kiosk", Array.Empty<GUILayoutOption>())) { StartKioskLock.TryToggle(); } if (GUILayout.Button("Light Nearby Campfire", Array.Empty<GUILayoutOption>())) { Vector3 center = Character.localCharacter.Center; Campfire[] array = Object.FindObjectsByType<Campfire>((FindObjectsSortMode)0); foreach (Campfire val in array) { if (!val.Lit) { Vector3 position = ((Component)val).transform.position; if (Vector3.Distance(center, position) <= 10f) { PEAKER.Logger.LogInfo((object)"Forcibly lighting campfire."); val.view.RPC("SetFireWoodCount", (RpcTarget)0, new object[1] { 3 }); val.view.RPC("Light_Rpc", (RpcTarget)3, Array.Empty<object>()); break; } } } PEAKER.Logger.LogInfo((object)"No campfire nearby to forcibly light."); } if (GUILayout.Button("Spawn Backpack", Array.Empty<GUILayoutOption>())) { PEAKER.Logger.LogInfo((object)"Giving backpack to self."); ItemDatabase.Add(ObjectDatabaseAsset<ItemDatabase, Item>.GetObjectFromString("Backpack")); } GUI.enabled = PhotonNetwork.IsMasterClient && Object.op_Implicit((Object)(object)Singleton<GameOverHandler>.Instance) && ((MenuWindow)GUIManager.instance.endScreen).isOpen; if (GUILayout.Button("Skip End Screen", Array.Empty<GUILayoutOption>())) { PEAKER.Logger.LogInfo((object)"Forcing all scouts to be done with the end screen."); Singleton<GameOverHandler>.Instance.ForceEveryPlayerDoneWithEndScreen(); } GUI.enabled = PhotonNetwork.IsMasterClient; if (GUILayout.Button((SteamLobbyLock.SteamLobbyLocked ? "Unlock" : "Lock") + " Steam Lobby", Array.Empty<GUILayoutOption>())) { SteamLobbyLock.TryToggle(); } GUI.enabled = true; GUILayout.EndVertical(); if (((Rect)(ref rect)).height == -1f && (int)Event.current.type == 7) { Rect lastRect = GUILayoutUtility.GetLastRect(); ((Rect)(ref rect)).height = ((Rect)(ref lastRect)).yMax + 10f; } GUI.DragWindow(); } } private static class ScoutsGui { [CompilerGenerated] private static class <>O { public static WindowFunction <0>__DrawPhotonWindow; public static WindowFunction <1>__DrawSteamWindow; } public static Rect rect = new Rect(0f, 0f, 320f, -1f); private static Rect _photonRect = new Rect(0f, 0f, 400f, 600f); private static Rect _steamRect = new Rect(0f, 0f, 400f, 600f); private static bool _resizingPhoton = false; private static Vector2 _resizePhotonStartPos = Vector2.zero; private static Vector2 _resizePhotonStartSize = Vector2.zero; private static bool _resizingSteam = false; private static Vector2 _resizeSteamStartPos = Vector2.zero; private static Vector2 _resizeSteamStartSize = Vector2.zero; private static Vector2 _scroll = new Vector2(0f, 0f); private static int _photonActorNumber = -1; private static CSteamID _steamId = CSteamID.Nil; private static string _banReason = "No reason specified."; public static void DrawGui(int _) { //IL_0301: Unknown result type (might be due to invalid IL or missing references) //IL_0306: Unknown result type (might be due to invalid IL or missing references) //IL_0326: Unknown result type (might be due to invalid IL or missing references) //IL_0382: Unknown result type (might be due to invalid IL or missing references) //IL_0387: Unknown result type (might be due to invalid IL or missing references) //IL_0393: Unknown result type (might be due to invalid IL or missing references) //IL_0398: Unknown result type (might be due to invalid IL or missing references) //IL_040c: Unknown result type (might be due to invalid IL or missing references) //IL_0411: Unknown result type (might be due to invalid IL or missing references) //IL_03a4: Unknown result type (might be due to invalid IL or missing references) //IL_041d: Unknown result type (might be due to invalid IL or missing references) //IL_049b: Unknown result type (might be due to invalid IL or missing references) //IL_04a1: Invalid comparison between Unknown and I4 //IL_0429: Unknown result type (might be due to invalid IL or missing references) //IL_03df: Unknown result type (might be due to invalid IL or missing references) //IL_04a8: Unknown result type (might be due to invalid IL or missing references) //IL_04ad: Unknown result type (might be due to invalid IL or missing references) //IL_0464: Unknown result type (might be due to invalid IL or missing references) GUILayout.BeginVertical(Array.Empty<GUILayoutOption>()); Player player = default(Player); if (PhotonNetwork.TryGetPlayer(_photonActorNumber, ref player)) { GUILayout.Label($"Photon Scout: #{player.ActorNumber}: {player.NickName}", Array.Empty<GUILayoutOption>()); } else { GUILayout.Label("Photon Scout: None", Array.Empty<GUILayoutOption>()); } GUILayout.Label("Is this scout glitching out for you? Try decreasing their max velocity!", Array.Empty<GUILayoutOption>()); GUI.enabled = player != null && player.ActorNumber != PhotonNetwork.LocalPlayer.ActorNumber; GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); if (GUILayout.Button("Decrease Max Velocity", Array.Empty<GUILayoutOption>())) { PEAKER.Logger.LogInfo((object)("Slowing down " + player.NickName + "...")); Scoutmaster val4 = default(Scoutmaster); Character val = Character.AllCharacters.FindLast((Character character) => character.view.Owner.ActorNumber == player.ActorNumber && !((Component)character).TryGetComponent<Scoutmaster>(ref val4)); if ((Object)(object)val != (Object)null) { foreach (Bodypart part in val.refs.ragdoll.partList) { Rigidbody rig = part.rig; rig.maxLinearVelocity *= 0.1f; if (part.rig.maxLinearVelocity < 0.1f) { part.rig.maxLinearVelocity = 0.1f; } } PEAKER.Logger.LogInfo((object)val.refs.ragdoll.partList[0].rig.maxLinearVelocity); } } if (GUILayout.Button("Increase Max Velocity", Array.Empty<GUILayoutOption>())) { PEAKER.Logger.LogInfo((object)("Speeding up " + player.NickName + "...")); Scoutmaster val3 = default(Scoutmaster); Character val2 = Character.AllCharacters.FindLast((Character character) => character.view.Owner.ActorNumber == player.ActorNumber && !((Component)character).TryGetComponent<Scoutmaster>(ref val3)); if ((Object)(object)val2 != (Object)null) { foreach (Bodypart part2 in val2.refs.ragdoll.partList) { Rigidbody rig2 = part2.rig; rig2.maxLinearVelocity *= 10f; if (part2.rig.maxLinearVelocity > 1E+16f) { part2.rig.maxLinearVelocity = 1E+16f; } } PEAKER.Logger.LogInfo((object)val2.refs.ragdoll.partList[0].rig.maxLinearVelocity); } } GUILayout.EndHorizontal(); if (CheatDetections.IsIgnored(player)) { if (GUILayout.Button("Unignored Detections", Array.Empty<GUILayoutOption>())) { CheatDetections.UnignorePlayer(player); } } else if (GUILayout.Button("Ignore Detections", Array.Empty<GUILayoutOption>())) { CheatDetections.IgnorePlayer(player); } GUI.enabled = true; GUILayout.Space(8f); if (_steamId != CSteamID.Nil) { GUILayout.Label($"Steam Scout: {_steamId.m_SteamID}: {SteamFriends.GetFriendPersonaName(_steamId)}", Array.Empty<GUILayoutOption>()); } else { GUILayout.Label("Steam Scout: None", Array.Empty<GUILayoutOption>()); } GUILayout.Label("Ban Reason:", Array.Empty<GUILayoutOption>()); _banReason = GUILayout.TextField(_banReason, Array.Empty<GUILayoutOption>()).Replace("\n", " "); if (_steamId != CSteamID.Nil && _steamId != SteamUser.GetSteamID()) { if (BannedScouts.IsBanned(_steamId)) { GUI.enabled = false; GUILayout.Button("Banned", Array.Empty<GUILayoutOption>()); GUI.enabled = true; } else if (GUILayout.Button("Ban", Array.Empty<GUILayoutOption>())) { BannedScouts.BanScout(_steamId, _banReason); } } else { GUI.enabled = false; GUILayout.Button("Ban", Array.Empty<GUILayoutOption>()); GUI.enabled = true; } if (_steamId != CSteamID.Nil && BannedScouts.IsBanned(_steamId)) { if (BannedScouts.IsIgnored(_steamId)) { GUI.enabled = false; GUILayout.Button("Temp Ignored Ban", Array.Empty<GUILayoutOption>()); GUI.enabled = true; } else if (GUILayout.Button("Temp Ignore Ban", Array.Empty<GUILayoutOption>())) { BannedScouts.BanScout(_steamId, _banReason); } } else { GUI.enabled = false; GUILayout.Button("Temp Ignore Ban", Array.Empty<GUILayoutOption>()); GUI.enabled = true; } GUILayout.EndVertical(); if ((int)Event.current.type == 7) { Rect lastRect = GUILayoutUtility.GetLastRect(); ((Rect)(ref rect)).height = ((Rect)(ref lastRect)).yMax + 10f; } GUI.DragWindow(); } public static void SubWindows() { //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Expected O, but got Unknown ((Rect)(ref _photonRect)).x = ((Rect)(ref rect)).x + ((Rect)(ref rect)).width; ((Rect)(ref _photonRect)).y = ((Rect)(ref rect)).y; ((Rect)(ref _steamRect)).x = ((Rect)(ref _photonRect)).x + ((Rect)(ref _photonRect)).width; ((Rect)(ref _steamRect)).y = ((Rect)(ref _photonRect)).y; int controlID = GUIUtility.GetControlID((FocusType)2); Rect photonRect = _photonRect; object obj = <>O.<0>__DrawPhotonWindow; if (obj == null) { WindowFunction val = DrawPhotonWindow; <>O.<0>__DrawPhotonWindow = val; obj = (object)val; } _photonRect = GUI.Window(controlID, photonRect, (WindowFunction)obj, "Photon Scouts"); ((Rect)(ref rect)).x = ((Rect)(ref _photonRect)).x - ((Rect)(ref rect)).width; ((Rect)(ref rect)).y = ((Rect)(ref _photonRect)).y; ((Rect)(ref _steamRect)).x = ((Rect)(ref _photonRect)).x + ((Rect)(ref _photonRect)).width; ((Rect)(ref _steamRect)).y = ((Rect)(ref _photonRect)).y; int controlID2 = GUIUtility.GetControlID((FocusType)2); Rect steamRect = _steamRect; object obj2 = <>O.<1>__DrawSteamWindow; if (obj2 == null) { WindowFunction val2 = DrawSteamWindow; <>O.<1>__DrawSteamWindow = val2; obj2 = (object)val2; } _steamRect = GUI.Window(controlID2, steamRect, (WindowFunction)obj2, "Steam Scouts"); ((Rect)(ref _photonRect)).x = ((Rect)(ref _steamRect)).x - ((Rect)(ref _photonRect)).width; ((Rect)(ref _photonRect)).y = ((Rect)(ref _steamRect)).y; ((Rect)(ref rect)).x = ((Rect)(ref _photonRect)).x - ((Rect)(ref rect)).width; ((Rect)(ref rect)).y = ((Rect)(ref _photonRect)).y; } private static void DrawPhotonWindow(int _) { //IL_0029: 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_0175: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_035c: Unknown result type (might be due to invalid IL or missing references) //IL_0368: Unknown result type (might be due to invalid IL or missing references) //IL_036d: Unknown result type (might be due to invalid IL or missing references) //IL_0371: Unknown result type (might be due to invalid IL or missing references) //IL_033d: Unknown result type (might be due to invalid IL or missing references) //IL_0343: Invalid comparison between Unknown and I4 //IL_0269: Unknown result type (might be due to invalid IL or missing references) //IL_026e: Unknown result type (might be due to invalid IL or missing references) //IL_0278: Unknown result type (might be due to invalid IL or missing references) //IL_0285: Unknown result type (might be due to invalid IL or missing references) //IL_0287: Unknown result type (might be due to invalid IL or missing references) //IL_028c: Unknown result type (might be due to invalid IL or missing references) //IL_0291: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: Unknown result type (might be due to invalid IL or missing references) //IL_02c8: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_038a: Unknown result type (might be due to invalid IL or missing references) //IL_038f: Unknown result type (might be due to invalid IL or missing references) //IL_03c3: Unknown result type (might be due to invalid IL or missing references) //IL_03c8: Unknown result type (might be due to invalid IL or missing references) //IL_02f0: Unknown result type (might be due to invalid IL or missing references) //IL_02f6: Invalid comparison between Unknown and I4 GUILayout.BeginVertical((GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(((Rect)(ref _photonRect)).height - 28f - 25f) }); _scroll = GUILayout.BeginScrollView(_scroll, false, true, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(((Rect)(ref _photonRect)).height - 28f - 25f) }); if (!PhotonNetwork.InRoom) { GUILayout.Label("Not in a Photon Room.", Array.Empty<GUILayoutOption>()); } else { Player[] playerList = PhotonNetwork.PlayerList; foreach (Player val in playerList) { GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); if (PhotonNetwork.LocalPlayer.ActorNumber == val.ActorNumber) { GUILayout.Label("YOU", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(30f) }); } if (GUILayout.Button($"#{val.ActorNumber}: {val.NickName}", Array.Empty<GUILayoutOption>())) { _photonActorNumber = val.ActorNumber; } GUILayout.EndHorizontal(); } } GUILayout.EndScrollView(); GUILayout.EndVertical(); Rect val2 = default(Rect); ((Rect)(ref val2))..ctor(((Rect)(ref _photonRect)).width - 30f, ((Rect)(ref _photonRect)).height - 30f, 25f, 25f); Rect val3 = default(Rect); ((Rect)(ref val3))..ctor(((Rect)(ref _photonRect)).width - 27f, ((Rect)(ref _photonRect)).height - 27f, 19f, 19f); GUI.Box(val3, string.Empty); Color color = GUI.color; GUI.color = new Color(1f, 1f, 1f, 0.6f); GUI.DrawTexture(new Rect(((Rect)(ref val3)).x + 3f, ((Rect)(ref val3)).y + 4f, 13f, 1f), (Texture)(object)Texture2D.whiteTexture); GUI.DrawTexture(new Rect(((Rect)(ref val3)).x + 3f, ((Rect)(ref val3)).y + 9f, 13f, 1f), (Texture)(object)Texture2D.whiteTexture); GUI.DrawTexture(new Rect(((Rect)(ref val3)).x + 3f, ((Rect)(ref val3)).y + 14f, 13f, 1f), (Texture)(object)Texture2D.whiteTexture); GUI.color = color; if (_resizingPhoton) { if (Mouse.current.leftButton.isPressed) { Vector2 val4 = ((InputControl<Vector2>)(object)((Pointer)Mouse.current).position).ReadValue(); val4.y = (float)Screen.height - val4.y; Vector2 val5 = val4 - _resizePhotonStartPos; ((Rect)(ref _photonRect)).width = Mathf.Max(_resizePhotonStartSize.x + val5.x, 300f); ((Rect)(ref _photonRect)).height = Mathf.Max(_resizePhotonStartSize.y + val5.y, 200f); if ((int)Event.current.type == 0 || (int)Event.current.type == 3) { Event.current.Use(); } } else { _resizingPhoton = false; ((Rect)(ref _steamRect)).width = ((Rect)(ref _photonRect)).width; ((Rect)(ref _steamRect)).height = ((Rect)(ref _photonRect)).height; if ((int)Event.current.type == 1) { Event.current.Use(); } } } else if ((int)Event.current.type == 0) { Vector2 mousePosition = Event.current.mousePosition; if (((Rect)(ref val2)).Contains(mousePosition)) { _resizingPhoton = true; _resizePhotonStartPos = ((InputControl<Vector2>)(object)((Pointer)Mouse.current).position).ReadValue(); _resizePhotonStartPos.y = (float)Screen.height - _resizePhotonStartPos.y; _resizePhotonStartSize = new Vector2(((Rect)(ref _photonRect)).width, ((Rect)(ref _photonRect)).height); Event.current.Use(); } } GUI.DragWindow(); } private static void DrawSteamWindow(int _) { //IL_0029: 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_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: 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_0206: Unknown result type (might be due to invalid IL or missing references) //IL_0239: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_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_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_0368: 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_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_0374: Unknown result type (might be due to invalid IL or missing references) //IL_0379: Unknown result type (might be due to invalid IL or missing references) //IL_037d: Unknown result type (might be due to invalid IL or missing references) //IL_0349: Unknown result type (might be due to invalid IL or missing references) //IL_034f: Invalid comparison between Unknown and I4 //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_027a: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Unknown result type (might be due to invalid IL or missing references) //IL_0291: Unknown result type (might be due to invalid IL or missing references) //IL_0293: Unknown result type (might be due to invalid IL or missing references) //IL_0298: Unknown result type (might be due to invalid IL or missing references) //IL_029d: Unknown result type (might be due to invalid IL or missing references) //IL_02ae: Unknown result type (might be due to invalid IL or missing references) //IL_02d4: Unknown result type (might be due to invalid IL or missing references) //IL_02f0: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0396: Unknown result type (might be due to invalid IL or missing references) //IL_039b: Unknown result type (might be due to invalid IL or missing references) //IL_03cf: Unknown result type (might be due to invalid IL or missing references) //IL_03d4: Unknown result type (might be due to invalid IL or missing references) //IL_02fc: Unknown result type (might be due to invalid IL or missing references) //IL_0302: Invalid comparison between Unknown and I4 GUILayout.BeginVertical((GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(((Rect)(ref _steamRect)).height - 28f - 25f) }); _scroll = GUILayout.BeginScrollView(_scroll, false, true, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(((Rect)(ref _steamRect)).height - 28f - 25f) }); CSteamID currentLobby = GameHandler.GetService<SteamLobbyHandler>().m_currentLobby; if (currentLobby == CSteamID.Nil) { GUILayout.Label("Not in a Steam Lobby.", Array.Empty<GUILayoutOption>()); } else { int numLobbyMembers = SteamMatchmaking.GetNumLobbyMembers(currentLobby); for (int i = 0; i < numLobbyMembers; i++) { CSteamID lobbyMemberByIndex = SteamMatchmaking.GetLobbyMemberByIndex(currentLobby, i); GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>()); if (SteamUser.GetSteamID() == lobbyMemberByIndex) { GUILayout.Label("YOU", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(30f) }); } if (GUILayout.Button($"{lobbyMemberByIndex.m_SteamID}: {SteamFriends.GetFriendPersonaName(lobbyMemberByIndex)}", Array.Empty<GUILayoutOption>())) { _steamId = lobbyMemberByIndex; } GUILayout.EndHorizontal(); } } GUILayout.EndScrollView(); GUILayout.EndVertical(); Rect val = default(Rect); ((Rect)(ref val))..ctor(((Rect)(ref _steamRect)).width - 30f, ((Rect)(ref _steamRect)).height - 30f, 25f, 25f); Rect val2 = default(Rect); ((Rect)(ref val2))..ctor(((Rect)(ref _steamRect)).width - 27f, ((Rect)(ref _steamRect)).height - 27f, 19f, 19f); GUI.Box(val2, string.Empty); Color color = GUI.color; GUI.color = new Color(1f, 1f, 1f, 0.6f); GUI.DrawTexture(new Rect(((Rect)(ref val2)).x + 3f, ((Rect)(ref val2)).y + 4f, 13f, 1f), (Texture)(object)Texture2D.whiteTexture); GUI.DrawTexture(new Rect(((Rect)(ref val2)).x + 3f, ((Rect)(ref val2)).y + 9f, 13f, 1f), (Texture)(object)Texture2D.whiteTexture); GUI.DrawTexture(new Rect(((Rect)(ref val2)).x + 3f, ((Rect)(ref val2)).y + 14f, 13f, 1f), (Texture)(object)Texture2D.whiteTexture); GUI.color = color; if (_resizingSteam) { if (Mouse.current.leftButton.isPressed) { Vector2 val3 = ((InputControl<Vector2>)(object)((Pointer)Mouse.current).position).ReadValue(); val3.y = (float)Screen.height - val3.y; Vector2 val4 = val3 - _resizeSteamStartPos; ((Rect)(ref _steamRect)).width = Mathf.Max(_resizeSteamStartSize.x + val4.x, 300f); ((Rect)(ref _steamRect)).height = Mathf.Max(_resizeSteamStartSize.y + val4.y, 200f); if ((int)Event.current.type == 0 || (int)Event.current.type == 3) { Event.current.Use(); } } else { _resizingSteam = false; ((Rect)(ref _photonRect)).width = ((Rect)(ref _steamRect)).width; ((Rect)(ref _photonRect)).height = ((Rect)(ref _steamRect)).height; if ((int)Event.current.type == 1) { Event.current.Use(); } } } else if ((int)Event.current.type == 0) { Vector2 mousePosition = Event.current.mousePosition; if (((Rect)(ref val)).Contains(mousePosition)) { _resizingSteam = true; _resizeSteamStartPos = ((InputControl<Vector2>)(object)((Pointer)Mouse.current).position).ReadValue(); _resizeSteamStartPos.y = (float)Screen.height - _resizeSteamStartPos.y; _resizeSteamStartSize = new Vector2(((Rect)(ref _steamRect)).width, ((Rect)(ref _steamRect)).height); Event.current.Use(); } } GUI.DragWindow(); } } private static class NoFlyListGui { [CompilerGenerated] private static class <>O { public static WindowFunction <0>__DrawListWindow; } public static Rect rect = new Rect(0f, 0f, 320f, -1f); private static Rect _listRect = new Rect(0f, 0f, 400f, 600f); private static bool _resizing = false; private static Vector2 _resizeStartPos = Vector2.zero; private static Vector2 _resizeStartSize = Vector2.zero; private static Vector2 _scroll = new Vector2(0f, 0f); private static ulong _steamId = 0uL; public static void DrawGui(int _) { //IL_0016: 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_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Invalid comparison between Unknown and I4 //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) GUILayout.BeginVertical(Array.Empty<GUILayoutOption>()); if (_steamId != 0L && !BannedScouts.IsBanned(new CSteamID(_steamId))) { _steamId = 0uL; } if (_steamId != 0L) { GUILayout.Label($"Banned Scout: {_steamId}", Array.Empty<GUILayoutOption>()); } else { GUILayout.Label("Banned Scout: None", Array.Empty<GUILayoutOption>()); } GUILayout.Label((_steamId != 0L) ? BannedScouts.bannedScouts[_steamId] : "None", Array.Empty<GUILayoutOption>()); if (_steamId != 0L) { if (GUILayout.Button("Unban", Array.Empty<GUILayoutOption>())) { BannedScouts.UnbanScout(new CSteamID(_steamId)); } } else { GUI.enabled = false; GUILayout.Button("Unban", Array.Empty<GUILayoutOption>()); GUI.enabled = true; } GUILayout.Space(8f); if (GUILayout.Button("Open banned.txt", Array.Empty<GUILayoutOption>())) { Process.Start("explorer.exe", "/select," + Path.Combine(Paths.BepInExRootPath, "banned.txt").Replace("/", "\\")); } GUILayout.EndVertical(); if ((int)Event.current.type == 7) { Rect lastRect = GUILayoutUtility.GetLastRect(); ((Rect)(ref rect)).height = ((Rect)(ref lastRect)).yMax + 10f; } GUI.DragWindow(); } public static void SubWindow() { //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: 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_0059: Expected O, but got Unknown ((Rect)(ref _listRect)).x = ((Rect)(ref rect)).x + ((Rect)(ref rect)).width; ((Rect)(ref _listRect)).y = ((Rect)(ref rect)).y; int controlID = GUIUtility.GetControlID((FocusType)2); Rect listRect = _listRect; object obj = <>O.<0>__DrawListWindow; if (obj == null) { WindowFunction val = DrawListWindow; <>O.<0>__DrawListWindow = val; obj = (object)val; } _listRect = GUI.Window(controlID, listRect, (WindowFunction)obj, "The No Fly List"); ((Rect)(ref rect)).x = ((Rect)(ref _listRect)).x - ((Rect)(ref rect)).width; ((Rect)(ref rect)).y = ((Rect)(ref _listRect)).y; } private static void DrawListWindow(int _) { //IL_0029: 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_013f: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_02fe: Unknown result type (might be due to invalid IL or missing references) //IL_030a: Unknown result type (might be due to invalid IL or missing references) //IL_030f: Unknown result type (might be due to invalid IL or missing references) //IL_0313: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: Invalid comparison between Unknown and I4 //IL_0233: Unknown result type (might be due to invalid IL or missing references) //IL_0238: Unknown result type (might be due to invalid IL or missing references) //IL_0242: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_0256: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0292: Unknown result type (might be due to invalid IL or missing references) //IL_02ae: Unknown result type (might be due to invalid IL or missing references) //IL_032c: Unknown result type (might be due to invalid IL or missing references) //IL_0331: Unknown result type (might be due to invalid IL or missing references) //IL_0365: Unknown result type (might be due to invalid IL or missing references) //IL_036a: Unknown result type (might be due to invalid IL or missing references) //IL_02ba: Unknown result type (might be due to invalid IL or missing references) //IL_02c0: Invalid comparison between Unknown and I4 GUILayout.BeginVertical((GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(((Rect)(ref _listRect)).height - 28f - 25f) }); _scroll = GUILayout.BeginScrollView(_scroll, false, true, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(((Rect)(ref _listRect)).height - 28f - 25f) }); bool flag = false; foreach (ulong key in BannedScouts.bannedScouts.Keys) { if (flag) { GUILayout.Space(8f); } flag = true; if (GUILayout.Button(key.ToString(), Array.Empty<GUILayoutOption>())) { _steamId = key; } GUILayout.Label(BannedScouts.bannedScouts[key], Array.Empty<GUILayoutOption>()); } GUILayout.EndScrollView(); GUILayout.EndVertical(); Rect val = default(Rect); ((Rect)(ref val))..ctor(((Rect)(ref _listRect)).width - 30f, ((Rect)(ref _listRect)).height - 30f, 25f, 25f); Rect val2 = default(Rect); ((Rect)(ref val2))..ctor(((Rect)(ref _listRect)).width - 27f, ((Rect)(ref _listRect)).height - 27f, 19f, 19f); GUI.Box(val2, string.Empty); Color color = GUI.color; GUI.color = new Color(1f, 1f, 1f, 0.6f); GUI.DrawTexture(new Rect(((Rect)(ref val2)).x + 3f, ((Rect)(ref val2)).y + 4f, 13f, 1f), (Texture)(object)Texture2D.whiteTexture); GUI.DrawTexture(new Rect(((Rect)(ref val2)).x + 3f, ((Rect)(ref val2)).y + 9f, 13f, 1f), (Texture)(object)Texture2D.whiteTexture); GUI.DrawTexture(new Rect(((Rect)(ref val2)).x + 3f, ((Rect)(ref val2)).y + 14f, 13f, 1f), (Texture)(object)Texture2D.whiteTexture); GUI.color = color; if (_resizing) { if (Mouse.current.leftButton.isPressed) { Vector2 val3 = ((InputControl<Vector2>)(object)((Pointer)Mouse.current).position).ReadValue(); val3.y = (float)Screen.height - val3.y; Vector2 val4 = val3 - _resizeStartPos; ((Rect)(ref _listRect)).width = Mathf.Max(_resizeStartSize.x + val4.x, 300f); ((Rect)(ref _listRect)).height = Mathf.Max(_resizeStartSize.y + val4.y, 200f); if ((int)Event.current.type == 0 || (int)Event.current.type == 3) { Event.current.Use(); } } else { _resizing = false; if ((int)Event.current.type == 1) { Event.current.Use(); } } } else if ((int)Event.current.type == 0) { Vector2 mousePosition = Event.current.mousePosition; if (((Rect)(ref val)).Contains(mousePosition)) { _resizing = true; _resizeStartPos = ((InputControl<Vector2>)(object)((Pointer)Mouse.current).position).ReadValue(); _resizeStartPos.y = (float)Screen.height - _resizeStartPos.y; _resizeStartSize = new Vector2(((Rect)(ref _listRect)).width, ((Rect)(ref _listRect)).height); Event.current.Use(); } } GUI.DragWindow(); } } private static class ConfigGui { public static Rect rect = new Rect(0f, 0f, 320f, -1f); public static void DrawGui(int _) { //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Expected O, but got Unknown //IL_0206: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Invalid comparison between Unknown and I4 //IL_0213: Unknown result type (might be due to invalid IL or missing references) //IL_0218: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) GUILayout.BeginVertical(Array.Empty<GUILayoutOption>()); GUILayout.Label("Character Physics Optimization Mode", Array.Empty<GUILayoutOption>()); GUILayout.BeginHorizontal((GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); CharacterPhysicsOptimizationMode[] array = (CharacterPhysicsOptimizationMode[])Enum.GetValues(typeof(CharacterPhysicsOptimizationMode)); int num = Array.IndexOf(array, ClientImprovements.characterPhysicsOptimizationMode.Value); if (GUILayout.Button("<", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(40f) })) { num = (num - 1 + array.Length) % array.Length; } GUIStyle val = new GUIStyle(GUI.skin.label) { alignment = (TextAnchor)4 }; GUILayout.Label(ClientImprovements.characterPhysicsOptimizationMode.Value.ToString(), val, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); if (GUILayout.Button(">", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(40f) })) { num = (num + 1) % array.Length; } ClientImprovements.characterPhysicsOptimizationMode.Value = array[num]; foreach (Character allCharacter in Character.AllCharacters) { if ((Object)(object)allCharacter == (Object)(object)Character.localCharacter || allCharacter.view.IsMine || (ClientImprovements.characterPhysicsOptimizationMode.Value == CharacterPhysicsOptimizationMode.DisableCollidersWhenDead && allCharacter.data.dead) || allCharacter.data.isCarried) { continue; } foreach (BodypartType key in allCharacter.refs.ragdoll.partDict.Keys) { ((Collider)allCharacter.refs.ragdoll.partDict[key].colliders[0].col).enabled = true; } } GUILayout.EndHorizontal(); GUILayout.EndVertical(); if (((Rect)(ref rect)).height == -1f && (int)Event.current.type == 7) { Rect lastRect = GUILayoutUtility.GetLastRect(); ((Rect)(ref rect)).height = ((Rect)(ref lastRect)).yMax + 10f; } GUI.DragWindow(); } } [CompilerGenerated] private static class <>O { public static WindowFunction <0>__DrawGui; public static WindowFunction <1>__DrawGui; public static WindowFunction <2>__DrawGui; public static WindowFunction <3>__DrawGui; } private Key _key; private static bool _open; private Rect _rect = new Rect(20f, 20f, 140f, -1f); private Guis _current; internal void Awake() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Expected O, but got Unknown //IL_002c: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) _key = PEAKER.Config.Bind<Key>(new ConfigDefinition("Keybinds", "GUIKey"), (Key)102, new ConfigDescription("The key used to toggle the PEAKER GUI. (Client)", (AcceptableValueBase)null, Array.Empty<object>())).Value; PEAKER.Patches.PatchAll(typeof(Gui)); } internal void Update() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) if ((int)_key != 0 && ((ButtonControl)Keyboard.current[_key]).wasPressedThisFrame) { _open = !_open; if (_open) { BannedScouts.UpdateBannedScouts(); } } } internal void OnGUI() { //IL_0010: 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_002b: Expected O, but got Unknown //IL_0026: Unknown result type (migh