Decompiled source of Atlas v1.11.2
BepInEx/plugins/AtlasPeak.dll
Decompiled 2 months ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using Atlas.Menu; using Atlas.Menu.Tabs; using Atlas.Mods; using Atlas.Patches; using Atlas.Utils; using BepInEx; using ExitGames.Client.Photon; using HarmonyLib; using POpusCodec.Enums; using Photon.Pun; using Photon.Realtime; using Photon.Voice.Unity; using Steamworks; using TMPro; using UnityEngine; using UnityEngine.SceneManagement; using Zorro.Core; using Zorro.Core.CLI; using Zorro.Core.Serizalization; using Zorro.UI.Modal; using pworld.Scripts.Extensions; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("AtlasPeak")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("AtlasPeak")] [assembly: AssemblyCopyright("Copyright © 2025")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("a303c1fa-a390-4071-aa0f-029d1658075a")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: AssemblyVersion("1.0.0.0")] namespace Atlas { [BepInPlugin("synq.peak.atlas", "Atlas Peak", "1.11.2")] public class Plugin : BaseUnityPlugin { public KeyCode MenuBind = (KeyCode)277; public KeyCode FlyBind = (KeyCode)102; public KeyCode UnlockBind = (KeyCode)92; public static Plugin instance { get; private set; } private void Awake() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Expected O, but got Unknown //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Expected O, but got Unknown //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: 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_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Expected O, but got Unknown //IL_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Expected O, but got Unknown //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Expected O, but got Unknown //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Expected O, but got Unknown //IL_0232: Expected O, but got Unknown instance = this; Harmony val = new Harmony("synq.peak.atlas"); val.PatchAll(Assembly.GetExecutingAssembly()); GameObject val2 = new GameObject("AtlasPeak"); val2.AddComponent<UI>(); val2.AddComponent<ModManager>(); val2.AddComponent<PhotonCallbacks>(); Object.DontDestroyOnLoad((Object)(object)val2); MenuManager.Tabs.Add(new Self()); MenuManager.Tabs.Add(new Lobby()); MenuManager.Tabs.Add(new Spawn()); MenuManager.Tabs.Add(new Visual()); MenuManager.Tabs.Add(new Players()); MenuManager.Tabs.Add(new Settings()); MenuManager.LoadPlugins(); KeyCode val3 = (KeyCode)277; if (Enum.TryParse<KeyCode>(PlayerPrefs.GetString("atlasmenubind", ((object)(KeyCode)(ref val3)).ToString()), out KeyCode result)) { MenuBind = result; LogInfo($"Menu Bind Bind: {MenuBind}"); } val3 = (KeyCode)102; if (Enum.TryParse<KeyCode>(PlayerPrefs.GetString("atlasflightbind", ((object)(KeyCode)(ref val3)).ToString()), out KeyCode result2)) { FlyBind = result2; LogInfo($"Flight Bind: {result2}"); } val3 = (KeyCode)92; if (Enum.TryParse<KeyCode>(PlayerPrefs.GetString("atlasunlockbind", ((object)(KeyCode)(ref val3)).ToString()), out KeyCode result3)) { UnlockBind = result3; LogInfo($"Unlock Bind: {result3}"); } if (PlayerPrefs.GetString("seenvers") != "1.11.2") { Modal.OpenModal((HeaderModalOption)new DefaultHeaderModalOption("<color=#FF70C2>Atlas</color> 1.11.2", "Would you like to join the <color=#2457e5>discord</color>?"), (ModalContentOption)new ModalButtonsOption((Option[])(object)new Option[3] { new Option("Join", (Action)delegate { Application.OpenURL("https://discord.gg/YG9KPA7j2m"); }), new Option("Not Now", (Action)null), new Option("Dont Show Again", (Action)delegate { PlayerPrefs.SetString("seenvers", "1.11.2"); }) }), (Action)null); } PhotonNetwork.NetworkingClient.EventReceived += Recieved; LogInfo("Loaded"); } private void Update() { HandleInputs(); } private void FixedUpdate() { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown if (PhotonNetwork.InRoom) { Hashtable val = new Hashtable(); val[(object)"AtlUser"] = PhotonNetwork.GetPing(); PhotonNetwork.LocalPlayer.SetCustomProperties(val, (Hashtable)null, (WebFlags)null); } } private void Recieved(EventData eventData) { //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Expected O, but got Unknown //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Expected O, but got Unknown //IL_00fb: Expected O, but got Unknown if (eventData.Code != 18) { return; } if (eventData.Sender != PhotonNetwork.MasterClient.ActorNumber) { LogWarn("sum1 just tried to kick us... ts so smart"); NewDebugNotif($"Blocked fake kick event from non-master client (Actor #{eventData.Sender})"); } else { if (!(eventData.CustomData is object[] array) || array.Length < 1) { return; } int num = (int)array[0]; string text = (string)array[1]; if (num == PhotonNetwork.LocalPlayer.ActorNumber) { LogWarn("Recieved Kick from master client, leaving room"); GameHandler.GetService<SteamLobbyHandler>().LeaveLobby(); if (PhotonNetwork.InRoom) { PhotonNetwork.Disconnect(); } Modal.OpenModal((HeaderModalOption)new DefaultHeaderModalOption("<color=#FF70C2>Atlas</color>", text), (ModalContentOption)new ModalButtonsOption((Option[])(object)new Option[1] { new Option("Okay", (Action)null) }), (Action)null); } } } public void LogInfo(object msg) { ((BaseUnityPlugin)this).Logger.LogInfo(msg); } public void LogWarn(object msg) { ((BaseUnityPlugin)this).Logger.LogWarning(msg); } public void LogError(object msg) { ((BaseUnityPlugin)this).Logger.LogError(msg); } public void LogDebug(object msg) { ((BaseUnityPlugin)this).Logger.LogDebug(msg); } public void LogFatal(object msg) { ((BaseUnityPlugin)this).Logger.LogFatal(msg); } private void HandleInputs() { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Invalid comparison between Unknown and I4 //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) if (!Input.anyKey || !Input.anyKeyDown) { return; } if (!Settings.menurec) { if ((int)MenuBind == 277) { if (Input.GetKeyDown((KeyCode)277) || Input.GetKeyDown((KeyCode)256)) { MenuManager.MenuOpen = !MenuManager.MenuOpen; } } else if (Input.GetKeyDown(MenuBind)) { MenuManager.MenuOpen = !MenuManager.MenuOpen; } } if (!Settings.unlockrec && Input.GetKeyDown(UnlockBind)) { Singleton<CursorHandler>.Instance.isMenuScene = !Singleton<CursorHandler>.Instance.isMenuScene; } if (Input.GetKeyDown((KeyCode)32) && (Object)(object)Character.localCharacter != (Object)null && Self.IJump) { ((MonoBehaviourPun)Character.localCharacter).photonView.RPC("JumpRpc", (RpcTarget)0, new object[1] { false }); } } public void NewNotification(string the) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) Scene activeScene = SceneManager.GetActiveScene(); if (!(((Scene)(ref activeScene)).name != "Title")) { return; } PlayerConnectionLog val = Object.FindFirstObjectByType<PlayerConnectionLog>(); if ((Object)(object)val == (Object)null) { return; } MethodInfo method = typeof(PlayerConnectionLog).GetMethod("AddMessage", BindingFlags.Instance | BindingFlags.NonPublic); if (method != null) { method.Invoke(val, new object[1] { the }); if (Object.op_Implicit((Object)(object)val.sfxJoin)) { val.sfxJoin.Play(default(Vector3)); } } else { Debug.LogWarning((object)"AddMessage method not found."); } } public void NewDebugNotif(string the) { if (Settings.debugnotifs) { NewNotification("<color=#8765ca>[Atlas] " + the + "</color>"); } } } internal class PluginInfo { public const string Author = "synq.peak.atlas"; public const string Name = "Atlas Peak"; public const string Version = "1.11.2"; } } namespace Atlas.Utils { public class PhotonCallbacks : MonoBehaviourPunCallbacks { public override void OnMasterClientSwitched(Player newMasterClient) { ((MonoBehaviourPunCallbacks)this).OnMasterClientSwitched(newMasterClient); Plugin.instance.NewNotification("<color=#8765ca>[Atlas] Masterclient switched to " + newMasterClient.NickName + "</color>"); } public override void OnJoinedRoom() { ((MonoBehaviourPunCallbacks)this).OnJoinedRoom(); Player[] playerListOthers = PhotonNetwork.PlayerListOthers; foreach (Player val in playerListOthers) { if (((Dictionary<object, object>)(object)val.CustomProperties).ContainsKey((object)"CherryUser")) { Plugin.instance.NewNotification("<color=#8765ca>[Atlas] A Cherry user is in your lobby.</color>"); } if (((Dictionary<object, object>)(object)val.CustomProperties).ContainsKey((object)"AtlUser")) { Plugin.instance.NewNotification("<color=#8765ca>[Atlas] A Atlas user is in your lobby.</color>"); } } } public override void OnPlayerEnteredRoom(Player newPlayer) { ((MonoBehaviourPunCallbacks)this).OnPlayerEnteredRoom(newPlayer); if (((Dictionary<object, object>)(object)newPlayer.CustomProperties).ContainsKey((object)"CherryUser")) { Plugin.instance.NewNotification("<color=#8765ca>[Atlas] An Cherry user joined.</color>"); } if (((Dictionary<object, object>)(object)newPlayer.CustomProperties).ContainsKey((object)"AtlUser")) { Plugin.instance.NewNotification("<color=#8765ca>[Atlas] An Atlas user joined.</color>"); } } public override void OnLeftRoom() { ((MonoBehaviourPunCallbacks)this).OnLeftRoom(); } public override void OnPlayerLeftRoom(Player otherPlayer) { ((MonoBehaviourPunCallbacks)this).OnPlayerLeftRoom(otherPlayer); if (((Dictionary<object, object>)(object)otherPlayer.CustomProperties).ContainsKey((object)"CherryUser")) { Plugin.instance.NewNotification("<color=#8765ca>[Atlas] An Cherry user left.</color>"); } if (((Dictionary<object, object>)(object)otherPlayer.CustomProperties).ContainsKey((object)"AtlUser")) { Plugin.instance.NewNotification("<color=#8765ca>[Atlas] An Atlas user left.</color>"); } } } public class Render { private static Texture2D drawingTex; private static Color lastTexColour; private static Color __color; private static GUIStyle __style = new GUIStyle(); private static Material overlayMaterial = null; private static GUIStyle __outlineStyle = new GUIStyle(); public Texture2D Texture; public Color DefaultColor; public static Font gamefont; public Render() { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Expected O, but got Unknown //IL_0028: Unknown result type (might be due to invalid IL or missing references) Texture = new Texture2D(2, 2); for (int i = 0; i < ((Texture)Texture).width; i++) { for (int j = 0; j < ((Texture)Texture).height; j++) { Texture.SetPixel(i, j, DefaultColor); } } } public void Draw(Rect size, Color color, float r) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < 5; i++) { GUI.DrawTexture(size, (Texture)(object)Texture, (ScaleMode)Type.EmptyTypes.Length, Type.EmptyTypes.Length != 0, 0f, color, 0f, r); } } public void Draw(Rect size, Color color, Vector4 radius) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_0021: 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_0027: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < 5; i++) { GUI.DrawTexture(size, (Texture)(object)Texture, (ScaleMode)Type.EmptyTypes.Length, Type.EmptyTypes.Length != 0, 0f, color, Vector4.zero, radius); } } public void DrawTransparent(Rect size, Color color, float r) { //IL_0001: 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) GUI.DrawTexture(size, (Texture)(object)Texture, (ScaleMode)Type.EmptyTypes.Length, Type.EmptyTypes.Length != 0, 0f, color, 0f, r); } internal static void Init() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown //IL_0090: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)overlayMaterial == (Object)null) { overlayMaterial = new Material(Shader.Find("Hidden/Internal-Colored")) { hideFlags = (HideFlags)5 }; overlayMaterial.SetInt("_SrcBlend", 5); overlayMaterial.SetInt("_DstBlend", 10); overlayMaterial.SetInt("_Cull", 0); overlayMaterial.SetInt("_ZTest", 8); overlayMaterial.SetInt("_ZWrite", 0); overlayMaterial.SetColor("_Color", Color.white); } } internal static Color GetRainbow(float offset = 0f) { //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) float num = (Time.time + offset) * 2f; float num2 = Mathf.Sin(num) * 0.5f + 0.5f; float num3 = Mathf.Sin(num + 2f) * 0.5f + 0.5f; float num4 = Mathf.Sin(num + 4f) * 0.5f + 0.5f; return new Color(num2, num3, num4); } internal static void DrawStringOptimized(Vector2 pos, string text, Color color, bool center = true, int size = 12) { //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Expected O, but got Unknown //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)gamefont == (Object)null) { gamefont = ((TMP_Text)Object.FindObjectOfType<PlayerConnectionLog>().text).font.sourceFontFile; } __style.fontSize = size; __style.richText = true; __style.font = gamefont; __style.normal.textColor = color; __style.fontStyle = (FontStyle)1; GUIContent val = new GUIContent(text); if (center) { pos.x -= __style.CalcSize(val).x / 2f; } GUI.Label(new Rect(pos.x, pos.y, 300f, 25f), val, __style); } internal static void DrawString(Vector2 pos, string text, Color color, bool center = true, int size = 12, FontStyle fontStyle = 1, int depth = 1) { //IL_005e: 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_00b9: 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_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Expected O, but got Unknown //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Expected O, but got Unknown //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0157: 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_0179: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_020b: Unknown result type (might be due to invalid IL or missing references) //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_0254: Unknown result type (might be due to invalid IL or missing references) //IL_026a: Unknown result type (might be due to invalid IL or missing references) //IL_027b: Unknown result type (might be due to invalid IL or missing references) //IL_0287: 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_02b4: Unknown result type (might be due to invalid IL or missing references) //IL_02ca: Unknown result type (might be due to invalid IL or missing references) //IL_02db: Unknown result type (might be due to invalid IL or missing references) //IL_02e1: Unknown result type (might be due to invalid IL or missing references) //IL_02f7: Unknown result type (might be due to invalid IL or missing references) //IL_0308: Unknown result type (might be due to invalid IL or missing references) //IL_030e: Unknown result type (might be due to invalid IL or missing references) //IL_031e: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)gamefont == (Object)null) { gamefont = ((TMP_Text)Object.FindObjectOfType<PlayerConnectionLog>().text).font.sourceFontFile; } __style.fontSize = size; __style.richText = true; __style.font = gamefont; __style.normal.textColor = color; __style.fontStyle = fontStyle; __outlineStyle.fontSize = size; __outlineStyle.richText = true; __outlineStyle.font = gamefont; __outlineStyle.normal.textColor = new Color(0f, 0f, 0f, 1f); __outlineStyle.fontStyle = fontStyle; GUIContent val = new GUIContent(text); GUIContent val2 = new GUIContent(text); if (center) { pos.x -= __style.CalcSize(val).x / 2f; } switch (depth) { case 0: GUI.Label(new Rect(pos.x, pos.y, 300f, 25f), val, __style); break; case 1: GUI.Label(new Rect(pos.x + 1f, pos.y + 1f, 300f, 25f), val2, __outlineStyle); GUI.Label(new Rect(pos.x, pos.y, 300f, 25f), val, __style); break; case 2: GUI.Label(new Rect(pos.x + 1f, pos.y + 1f, 300f, 25f), val2, __outlineStyle); GUI.Label(new Rect(pos.x - 1f, pos.y - 1f, 300f, 25f), val2, __outlineStyle); GUI.Label(new Rect(pos.x, pos.y, 300f, 25f), val, __style); break; case 3: GUI.Label(new Rect(pos.x + 1f, pos.y + 1f, 300f, 25f), val2, __outlineStyle); GUI.Label(new Rect(pos.x - 1f, pos.y - 1f, 300f, 25f), val2, __outlineStyle); GUI.Label(new Rect(pos.x, pos.y - 1f, 300f, 25f), val2, __outlineStyle); GUI.Label(new Rect(pos.x, pos.y + 1f, 300f, 25f), val2, __outlineStyle); GUI.Label(new Rect(pos.x, pos.y, 300f, 25f), val, __style); break; } } internal static void DrawBox(Color color, Vector2 position, float width, float height) { //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005d: 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_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) Init(); width /= 2f; height /= 2f; GL.PushMatrix(); overlayMaterial.SetPass(0); GL.LoadPixelMatrix(0f, (float)Screen.width, (float)Screen.height, 0f); GL.Begin(7); GL.Color(color); GL.TexCoord2(position.x + width, position.y + height); GL.Vertex(new Vector3(position.x + width, position.y + height)); GL.TexCoord2(position.x + width, position.y - height); GL.Vertex(new Vector3(position.x + width, position.y - height)); GL.TexCoord2(position.x - width, position.y - height); GL.Vertex(new Vector3(position.x - width, position.y - height)); GL.TexCoord2(position.x - width, position.y + height); GL.Vertex(new Vector3(position.x - width, position.y + height)); GL.End(); GL.PopMatrix(); } internal static bool IsOnScreen(Vector3 position) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_000e: 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) return position.y > 0.01f && position.y < (float)Screen.height - 5f && position.z > 0.01f; } internal static bool IsBehindCamera(Vector3 screenPosition) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) return screenPosition.z < 0f; } internal static Vector3 ToScreen(Vector3 worldPosition) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: 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_0021: 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_0025: Unknown result type (might be due to invalid IL or missing references) Vector3 val = Camera.main.WorldToScreenPoint(worldPosition); val.y = (float)Screen.height - val.y; return val; } internal static void DrawCircle(Color color, Vector2 position, float radius) { //IL_003c: 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_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) Init(); GL.PushMatrix(); overlayMaterial.SetPass(0); GL.LoadPixelMatrix(0f, (float)Screen.width, (float)Screen.height, 0f); GL.Begin(2); GL.Color(color); for (float num = 0f; num < (float)Math.PI * 2f; num += 0.05f) { GL.Vertex(new Vector3(Mathf.Cos(num) * radius + position.x, Mathf.Sin(num) * radius + position.y)); GL.Vertex(new Vector3(Mathf.Cos(num + 0.05f) * radius + position.x, Mathf.Sin(num + 0.05f) * radius + position.y)); } GL.End(); GL.PopMatrix(); } internal static void DrawFullCircle(Color color, Vector2 position, float width, float height, float radius) { //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005d: 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_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) Init(); width /= 2f; height /= 2f; GL.PushMatrix(); overlayMaterial.SetPass(0); GL.LoadPixelMatrix(0f, (float)Screen.width, (float)Screen.height, 0f); GL.Begin(2); GL.Color(color); GL.TexCoord2(position.x + width, position.y + height); GL.Vertex(new Vector3(position.x + width, position.y + height)); GL.TexCoord2(position.x + width, position.y - height); GL.Vertex(new Vector3(position.x + width, position.y - height)); GL.TexCoord2(position.x - width, position.y - height); GL.Vertex(new Vector3(position.x - width, position.y - height)); GL.TexCoord2(position.x - width, position.y + height); GL.Vertex(new Vector3(position.x - width, position.y + height)); for (float num = 0f; num < (float)Math.PI * 2f; num += 0.05f) { GL.Vertex(new Vector3(Mathf.Cos(num) * radius + position.x, Mathf.Sin(num) * radius + position.y)); GL.Vertex(new Vector3(Mathf.Cos(num + 0.05f) * radius + position.x, Mathf.Sin(num + 0.05f) * radius + position.y)); } GL.End(); GL.PopMatrix(); } internal static void DrawLine(Color color, Vector3 origin, Vector3 destination) { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004f: 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_0066: Unknown result type (might be due to invalid IL or missing references) Init(); GL.PushMatrix(); overlayMaterial.SetPass(0); GL.LoadPixelMatrix(0f, (float)Screen.width, (float)Screen.height, 0f); GL.Begin(2); GL.Color(color); GL.Vertex(new Vector3(origin.x, origin.y)); GL.Vertex(new Vector3(destination.x, destination.y)); GL.End(); GL.PopMatrix(); } internal static void DrawLine1(Vector2 start, Vector2 end, Color color, float width) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000e: 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_0014: 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_001c: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0057: 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_0065: 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_007d: 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_0097: Unknown result type (might be due to invalid IL or missing references) Color color2 = GUI.color; float num = 57.29578f; Vector2 val = end - start; float num2 = num * Mathf.Atan(val.y / val.x); if (val.x < 0f) { num2 += 180f; } int num3 = (int)Mathf.Ceil(width / 2f); GUIUtility.RotateAroundPivot(num2, start); GUI.color = color; GUI.DrawTexture(new Rect(start.x, start.y - (float)num3, ((Vector2)(ref val)).magnitude, width), (Texture)(object)Texture2D.whiteTexture, (ScaleMode)0); GUIUtility.RotateAroundPivot(0f - num2, start); GUI.color = color2; } internal static void CornerBox(Vector2 Head, float Width, float Height, float thickness, Color color, bool outline) { //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: 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_0209: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_022f: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_0252: Unknown result type (might be due to invalid IL or missing references) //IL_025a: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Unknown result type (might be due to invalid IL or missing references) //IL_027d: 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_0293: Unknown result type (might be due to invalid IL or missing references) //IL_02ab: Unknown result type (might be due to invalid IL or missing references) //IL_02b3: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02d9: Unknown result type (might be due to invalid IL or missing references) //IL_02e1: Unknown result type (might be due to invalid IL or missing references) //IL_02ef: Unknown result type (might be due to invalid IL or missing references) //IL_0309: 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_002a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_004a: 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_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0095: 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_00b5: 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_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: 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_011f: 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_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_0191: 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_01bf: Unknown result type (might be due to invalid IL or missing references) int num = (int)(Width / 4f); int num2 = num; if (outline) { RectFilled(Head.x - Width / 2f - 1f, Head.y - 1f, num + 2, 3f, Color.black); RectFilled(Head.x - Width / 2f - 1f, Head.y - 1f, 3f, num2 + 2, Color.black); RectFilled(Head.x + Width / 2f - (float)num - 1f, Head.y - 1f, num + 2, 3f, Color.black); RectFilled(Head.x + Width / 2f - 1f, Head.y - 1f, 3f, num2 + 2, Color.black); RectFilled(Head.x - Width / 2f - 1f, Head.y + Height - 4f, num + 2, 3f, Color.black); RectFilled(Head.x - Width / 2f - 1f, Head.y + Height - (float)num2 - 4f, 3f, num2 + 2, Color.black); RectFilled(Head.x + Width / 2f - (float)num - 1f, Head.y + Height - 4f, num + 2, 3f, Color.black); RectFilled(Head.x + Width / 2f - 1f, Head.y + Height - (float)num2 - 4f, 3f, num2 + 3, Color.black); } RectFilled(Head.x - Width / 2f, Head.y, num, 1f, color); RectFilled(Head.x - Width / 2f, Head.y, 1f, num2, color); RectFilled(Head.x + Width / 2f - (float)num, Head.y, num, 1f, color); RectFilled(Head.x + Width / 2f, Head.y, 1f, num2, color); RectFilled(Head.x - Width / 2f, Head.y + Height - 3f, num, 1f, color); RectFilled(Head.x - Width / 2f, Head.y + Height - (float)num2 - 3f, 1f, num2, color); RectFilled(Head.x + Width / 2f - (float)num, Head.y + Height - 3f, num, 1f, color); RectFilled(Head.x + Width / 2f, Head.y + Height - (float)num2 - 3f, 1f, num2 + 1, color); } internal static void DrawHealth(Vector2 pos, float health, bool center = false) { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_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_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_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_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_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_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) if (center) { pos -= new Vector2(26f, 0f); } pos += new Vector2(0f, 18f); BoxRect(new Rect(pos.x, pos.y, 52f, 5f), Color.black); pos += new Vector2(1f, 1f); Color color = Color.green; if (health <= 50f) { color = Color.yellow; } if (health <= 25f) { color = Color.red; } BoxRect(new Rect(pos.x, pos.y, 0.5f * health, 3f), color); } internal static void BoxRect(Rect rect, Color color) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0031: 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_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) if (color != __color) { drawingTex.SetPixel(0, 0, color); drawingTex.Apply(); __color = color; } GUI.DrawTexture(rect, (Texture)(object)drawingTex); } internal static void RectFilled(float x, float y, float width, float height, Color color) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Expected O, but got Unknown //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)drawingTex)) { drawingTex = new Texture2D(1, 1); } if (color != lastTexColour) { drawingTex.SetPixel(0, 0, color); drawingTex.Apply(); lastTexColour = color; } GUI.DrawTexture(new Rect(x, y, width, height), (Texture)(object)drawingTex); } } public class Watermark { public static void Draw() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Expected O, but got Unknown //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Expected O, but got Unknown //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Expected O, but got Unknown //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) string text = DateTime.Now.ToString("hh:mm:ss tt"); Render render = new Render { DefaultColor = Color.white }; GUIContent val = ((Visual.ActiveModules.Count != 0) ? new GUIContent(string.Format("<b><color=#FF70C2>Atlas</color></b> v{0} | {1} [{2}] [{3}]", "1.11.2", text, PhotonNetwork.LocalPlayer.NickName, Visual.ActiveModules.Count)) : new GUIContent("<b><color=#FF70C2>Atlas</color></b> v1.11.2 | " + text + " [" + PhotonNetwork.LocalPlayer.NickName + "]")); GUIStyle val2 = new GUIStyle(GUIStyle.op_Implicit("Label")) { wordWrap = false, alignment = (TextAnchor)4 }; float num = val2.CalcSize(val).x + 20f; float num2 = 30f; Vector2 val3 = default(Vector2); ((Vector2)(ref val3))..ctor(num / 2f + 20f, num2 / 2f + 20f); render.DrawTransparent(new Rect(30f, 30f, num, 30f), Color.black, 6f); GUI.Label(new Rect(31f, 30f, num, 30f), val, val2); } } } namespace Atlas.Patches { [HarmonyPatch(typeof(Character), "Update")] public class FlyPatch { private static bool isFlying = false; private static Vector3 flyVelocity = Vector3.zero; public static float flySpeed = 100f; private static float acceleration = 300f; private static void Postfix(Character __instance) { //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_017f: 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_0186: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: 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_01c5: 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_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) if (!Self.Flight || !__instance.IsLocal || (Object)(object)__instance.refs?.ragdoll == (Object)null) { return; } if (!Settings.flyrec && Input.GetKeyDown(Plugin.instance.FlyBind)) { isFlying = !isFlying; flyVelocity = Vector3.zero; foreach (Bodypart part in __instance.refs.ragdoll.partList) { if ((Object)(object)(((Object)(object)part != (Object)null) ? part.Rig : null) != (Object)null) { part.Rig.useGravity = !isFlying; } } string text = (isFlying ? "active" : "deactive"); } if (!isFlying) { return; } __instance.data.isGrounded = true; __instance.data.sinceJump = 0f; Vector3 val = Vector2.op_Implicit(__instance.input.movementInput); Vector3 normalized = ((Vector3)(ref __instance.data.lookDirection_Flat)).normalized; Vector3 val2 = Vector3.Cross(Vector3.up, normalized); Vector3 normalized2 = ((Vector3)(ref val2)).normalized; Vector3 val3 = normalized * val.y + normalized2 * val.x; if (__instance.input.jumpIsPressed) { val3 += Vector3.up; } if (__instance.input.crouchIsPressed) { val3 += Vector3.down; } flyVelocity = Vector3.Lerp(flyVelocity, ((Vector3)(ref val3)).normalized * flySpeed, Time.deltaTime * acceleration); foreach (Bodypart part2 in __instance.refs.ragdoll.partList) { if ((Object)(object)(((Object)(object)part2 != (Object)null) ? part2.Rig : null) != (Object)null) { part2.Rig.linearVelocity = flyVelocity; } } } } [HarmonyPatch(typeof(CharacterItems), "DoDropping")] public class ThrowPatch { private static void Prefix() { if (Self.InstantThrow) { Character.localCharacter.refs.items.throwChargeLevel = 1f; Self.CThrowPower = false; } if (Self.CThrowPower) { Character.localCharacter.refs.items.throwChargeLevel = Self.ThrowPower; } } } [HarmonyPatch(typeof(PerlinShake), "AddShake")] [HarmonyPatch(new Type[] { typeof(float), typeof(float), typeof(float) })] public class ShakePatch { private static bool Prefix(float amount, float duration, float scale) { Plugin.instance.NewDebugNotif("Patched PerlinShake.AddShake"); return !Self.NoSS; } } [HarmonyPatch(typeof(CharacterMovement), "CheckFallDamage")] public class FallDamagePatch { private static bool Prefix() { Plugin.instance.NewDebugNotif("Patched CharacterMovement.checkfalldamage"); return !Self.NFD; } } [HarmonyPatch(typeof(CharacterAfflictions), "AddStatus")] public class AfflictionPatch1 { private static bool Prefix() { return !Self.NoA; } } [HarmonyPatch(typeof(CharacterAnimations), "RPCA_PlayRemove")] public class PlayEmotePatch { private static bool Prefix(string emoteName, bool succeeded) { bool flag = false; if (flag) { Plugin.instance.LogInfo($"{emoteName}, {succeeded}"); } return !flag; } } [HarmonyPatch(typeof(AchievementManager), "AddToRunBasedFloat")] public class AfflictionPatch2 { private static bool Prefix() { Plugin.instance.NewDebugNotif("Patched AchievementManager.addtorunbasedfloat"); return !Self.NoA; } } [HarmonyPatch(typeof(CharacterAnimations), "RPCA_PlayRemove")] public class EmotePatch { private static void Prefix(string emoteName) { Debug.Log((object)("current emoteeee: " + emoteName)); } } [HarmonyPatch(typeof(CharacterAfflictions), "AddAffliction")] public class AfflictionPatch3 { private static bool Prefix() { Plugin.instance.NewDebugNotif("Patched CharacterAfflictions.addaffliction"); return !Self.NoA; } } [HarmonyPatch(typeof(Character), "RPCA_Fall")] public class FallPatch { private static bool Prefix() { Plugin.instance.NewDebugNotif("Patched Character.rpca_fall"); return !Self.NoR; } } [HarmonyPatch(typeof(Character), "RPCA_PassOut")] public class PassOutPatch { private static bool Prefix() { Plugin.instance.NewDebugNotif("Patched Character.rpca_passout"); return !Self.NoP; } } [HarmonyPatch(typeof(Character), "PassOut")] public class PassOutPatch1 { private static bool Prefix() { Plugin.instance.NewDebugNotif("Patched Character.passout"); return !Self.NoP; } } [HarmonyPatch(typeof(Character), "RPCA_Die")] public class DiePatch1 { private static bool Prefix() { Plugin.instance.NewDebugNotif("Patched Character.rpca_die"); return !Self.NoD; } } [HarmonyPatch(typeof(Character), "Die")] public class DiePatch2 { private static bool Prefix() { Plugin.instance.NewDebugNotif("Patched Character.die"); return !Self.NoD; } } [HarmonyPatch(typeof(SlipperyJellyfish), "Trigger")] public class SlipPatch1 { private static bool Prefix() { Plugin.instance.NewDebugNotif("Patched SlipperyJellyfish.trigger"); return !Self.NoS; } } [HarmonyPatch(typeof(BananaPeel), "RPCA_TriggerBanana")] public class SlipPatch2 { private static bool Prefix() { Plugin.instance.NewDebugNotif("Patched BananaPeel.rpca_triggerbanana"); return !Self.NoS; } } [HarmonyPatch(typeof(CharacterAfflictions), "UpdateWeight")] public class WeightPatch1 { private static void Postfix(CharacterAfflictions __instance) { if (Self.NoW) { __instance.SetStatus((STATUSTYPE)7, 0f, true); Plugin.instance.NewDebugNotif("Patched CharacterAfflictions.updateweight"); } } } [HarmonyPatch(typeof(Item), "Consume")] public class ConsumePatch { private static bool Prefix(Item __instance) { if (Self.AntiConsume && ((MonoBehaviourPun)__instance.holderCharacter).photonView.IsMine) { return false; } return true; } } [HarmonyPatch(typeof(Action_ReduceUses), "ReduceUsesRPC")] public class ReduceUsesPatch { private static bool Prefix() { if (Self.ICharge) { return false; } if (Self.AntiConsume) { return false; } return true; } } [HarmonyPatch(typeof(MagicBugle), "StartToot")] public class BuglePatch { private static bool Prefix(MagicBugle __instance) { if (Self.ICharge) { Debug.Log((object)"Started toot infmod"); FieldInfo field = ((object)__instance).GetType().GetField("tooting", BindingFlags.Instance | BindingFlags.NonPublic); field.SetValue(((object)__instance).GetType(), true); return false; } return true; } } [HarmonyPatch(typeof(RopeShooter), "get_Ammo")] public class GetRopeAmmoPatch { private static bool Prefix(ref int __result) { if (Self.ICharge) { __result = int.MaxValue; return false; } return true; } } [HarmonyPatch(typeof(RopeShooter), "GetNew")] public class GetNewRopeAmmoPatch { private static bool Prefix(ref IntItemData __result) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Expected O, but got Unknown if (Self.ICharge) { __result = new IntItemData { Value = int.MaxValue }; return false; } return true; } } [HarmonyPatch(typeof(RopeSpool), "get_IsOutOfRope")] public class OutOfRopePatch { private static bool Prefix(ref bool __result) { if (Self.IRope) { __result = false; return false; } return true; } } [HarmonyPatch(typeof(RopeSpool), "get_RopeFuel")] public class GetRopeFuelPatch { private static bool Prefix(ref float __result) { if (Self.IRope) { __result = float.MaxValue; return false; } return true; } } [HarmonyPatch(typeof(RopeSpool), "set_RopeFuel")] public class SetRopeFuelPatch { private static bool Prefix(float value) { if (Self.IRope) { return false; } return true; } } [HarmonyPatch(typeof(RopeSpool), "DefaultFuel")] public class RopeFuelPatch { private static bool Prefix(ref FloatItemData __result) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Expected O, but got Unknown if (Self.IRope) { __result = new FloatItemData { Value = float.MaxValue }; return false; } return true; } } [HarmonyPatch(typeof(Lantern), "UpdateFuel")] public class UpdateFuelPatch { private static bool Prefix(Lantern __instance) { return !Self.ICharge; } } [HarmonyPatch(typeof(Item), "ContinueUsePrimary")] public class CUsePrimaryPatch { private static bool Prefix(Item __instance) { //IL_009c: Unknown result type (might be due to invalid IL or missing references) if (Self.InstantItemUse) { if (__instance.isUsingSecondary) { __instance.CancelUseSecondary(); } if (__instance.isUsingPrimary) { if (!__instance.finishedCast) { if (Object.op_Implicit((Object)(object)((Component)__instance).GetComponent<ItemUseFeedback>())) { __instance.holderCharacter.refs.animator.SetBool(((Component)__instance).GetComponent<ItemUseFeedback>().useAnimation, false); if (Object.op_Implicit((Object)(object)((Component)__instance).GetComponent<ItemUseFeedback>().sfxUsed)) { ((Component)__instance).GetComponent<ItemUseFeedback>().sfxUsed.Play(((Component)__instance).transform.position); } } __instance.finishedCast = true; __instance.lastFinishedCast = Time.time; if (__instance.OnPrimaryFinishedCast != null) { __instance.OnPrimaryFinishedCast(); } } if (__instance.OnPrimaryHeld != null) { __instance.OnPrimaryHeld(); } } return false; } return true; } } [HarmonyPatch(typeof(Item), "ContinueUseSecondary")] public class CUseSecondaryPatch { private static bool Prefix(Item __instance) { if (Self.InstantItemUse) { if (__instance.isUsingPrimary) { return false; } if (__instance.isUsingSecondary) { if (__instance.OnSecondaryHeld != null) { __instance.OnSecondaryHeld(); } if (!__instance.finishedCast) { __instance.FinishCastSecondary(); return false; } } return false; } return true; } } } namespace Atlas.Mods { internal struct ItemCache { public Item item; public string name; public Vector2 screenPos; public bool visible; } public class OldFields { public static bool SetFog; } public class ModManager : MonoBehaviour { public class Self { public static void Slip() { //IL_001d: 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) BananaPeel val = Object.FindFirstObjectByType<BananaPeel>(); if ((Object)(object)val == (Object)null) { val = PhotonNetwork.Instantiate("0_Items/Berrynana Peel Pink Variant", Character.localCharacter.Head, Quaternion.identity, (byte)0, (object[])null).GetComponent<BananaPeel>(); Plugin.instance.NewDebugNotif("Spawned banana peel"); } ((Component)val).GetComponent<PhotonView>().RPC("RPCA_TriggerBanana", (RpcTarget)0, new object[1] { Character.localCharacter.refs.view.ViewID }); } public static void Fall() { ((MonoBehaviourPun)Character.localCharacter).photonView.RPC("RPCA_Fall", (RpcTarget)0, new object[1] { 7f }); } public static void Revive(bool status) { ((MonoBehaviourPun)Character.localCharacter).photonView.RPC("RPCA_Revive", (RpcTarget)0, new object[1] { status }); } public static void UnpassOut() { ((MonoBehaviourPun)Character.localCharacter).photonView.RPC("RPCA_UnPassOut", (RpcTarget)0, new object[0]); } public static void FullStamWithMorl() { ((MonoBehaviourPun)Character.localCharacter).photonView.RPC("MoraleBoost", (RpcTarget)0, new object[2] { 1f, 20 }); } public static void EndGameFWin() { ((MonoBehaviourPun)Character.localCharacter).photonView.RPC("RPCEndGame_ForceWin", (RpcTarget)0, new object[0]); } public static void EndGame() { ((MonoBehaviourPun)Character.localCharacter).photonView.RPC("RPCEndGame", (RpcTarget)0, new object[0]); } public static void ToggleDebug(bool v) { if (v) { DebugUIHandler[] array = Object.FindObjectsOfType<DebugUIHandler>(); for (int i = 0; i < array.Length; i++) { array[i].Show(); } } else { DebugUIHandler[] array2 = Object.FindObjectsOfType<DebugUIHandler>(); for (int j = 0; j < array2.Length; j++) { array2[j].Hide(); } } } public static void RemoveItemRestrictions() { Item[] array = Object.FindObjectsOfType<Item>(); foreach (Item val in array) { val.UIData.canDrop = true; val.UIData.canThrow = true; } } public static void JoinLobby(string link) { //IL_0064: Unknown result type (might be due to invalid IL or missing references) string[] array = link.Split(new char[1] { '/' }); string s = array[4]; ulong num = ulong.Parse(s); MethodInfo method = typeof(SteamLobbyHandler).GetMethod("JoinLobby", BindingFlags.Instance | BindingFlags.NonPublic); if (method == null) { Debug.Log((object)"couldnt get it"); return; } method.Invoke(GameHandler.GetService<SteamLobbyHandler>(), new object[1] { (object)new CSteamID(num) }); } public static void SetUsernameAndReset(string name) { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) PhotonNetwork.LocalPlayer.NickName = name; PhotonNetwork.Instantiate("Character", Character.localCharacter.Head, ((Component)Character.localCharacter).transform.rotation, (byte)0, (object[])null); } public static void RemoveAfflictions() { for (int i = 0; i < Character.localCharacter.refs.afflictions.currentStatuses.Length; i++) { Character.localCharacter.refs.afflictions.currentStatuses[i] = 0f; } } public static void ThrowAch(ACHIEVEMENTTYPE type) { SteamUserStats.SetAchievement(((object)(ACHIEVEMENTTYPE)(ref type)).ToString()); SteamUserStats.StoreStats(); } public static void FixVoice() { ((Component)((Component)Character.localCharacter).transform.GetChild(2)).GetComponent<Recorder>().UserData = ((MonoBehaviourPun)Character.localCharacter).photonView.ViewID; } public static void ReturnToMenu() { GameHandler.GetService<SteamLobbyHandler>().LeaveLobby(); PhotonNetwork.Disconnect(); SceneManager.LoadScene("Title"); } } public class Lobby { public static void RemoveAffl(int type) { //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) if (Atlas.Menu.Tabs.Lobby.IncludeSelf) { foreach (Character allCharacter in Character.AllCharacters) { float[] currentStatuses = allCharacter.refs.afflictions.currentStatuses; float[] array = new float[currentStatuses.Length]; Array.Copy(currentStatuses, array, currentStatuses.Length); if (type >= 0 && type < array.Length) { array[type] -= 0.1f; } if (((MonoBehaviourPun)allCharacter).photonView.IsMine) { ((object)allCharacter.refs.afflictions).GetType().GetMethod("SetAll", BindingFlags.Instance | BindingFlags.NonPublic).Invoke(allCharacter.refs.afflictions, new object[1] { array }); } StatusSyncData val = default(StatusSyncData); val.statusList = new List<float>(array); byte[] array2 = IBinarySerializable.ToManagedArray<StatusSyncData>(val); ((MonoBehaviourPun)allCharacter).photonView.RPC("SyncStatusesRPC", (RpcTarget)0, new object[1] { array2 }); } return; } foreach (Character allCharacter2 in Character.AllCharacters) { if (!((MonoBehaviourPun)allCharacter2).photonView.IsMine) { float[] currentStatuses2 = allCharacter2.refs.afflictions.currentStatuses; float[] array3 = new float[currentStatuses2.Length]; Array.Copy(currentStatuses2, array3, currentStatuses2.Length); if (type >= 0 && type < array3.Length) { array3[type] -= 0.1f; } StatusSyncData val = default(StatusSyncData); val.statusList = new List<float>(array3); byte[] array4 = IBinarySerializable.ToManagedArray<StatusSyncData>(val); ((MonoBehaviourPun)allCharacter2).photonView.RPC("SyncStatusesRPC", (RpcTarget)0, new object[1] { array4 }); } } } public static void AddAffl(int type) { //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) if (Atlas.Menu.Tabs.Lobby.IncludeSelf) { foreach (Character allCharacter in Character.AllCharacters) { float[] currentStatuses = allCharacter.refs.afflictions.currentStatuses; float[] array = new float[currentStatuses.Length]; Array.Copy(currentStatuses, array, currentStatuses.Length); if (type >= 0 && type < array.Length) { array[type] += 0.1f; } if (((MonoBehaviourPun)allCharacter).photonView.IsMine) { ((object)allCharacter.refs.afflictions).GetType().GetMethod("SetAll", BindingFlags.Instance | BindingFlags.NonPublic).Invoke(allCharacter.refs.afflictions, new object[1] { array }); } StatusSyncData val = default(StatusSyncData); val.statusList = new List<float>(array); byte[] array2 = IBinarySerializable.ToManagedArray<StatusSyncData>(val); ((MonoBehaviourPun)allCharacter).photonView.RPC("SyncStatusesRPC", (RpcTarget)0, new object[1] { array2 }); } return; } foreach (Character allCharacter2 in Character.AllCharacters) { if (!((MonoBehaviourPun)allCharacter2).photonView.IsMine) { float[] currentStatuses2 = allCharacter2.refs.afflictions.currentStatuses; float[] array3 = new float[currentStatuses2.Length]; Array.Copy(currentStatuses2, array3, currentStatuses2.Length); if (type >= 0 && type < array3.Length) { array3[type] += 0.1f; } StatusSyncData val = default(StatusSyncData); val.statusList = new List<float>(array3); byte[] array4 = IBinarySerializable.ToManagedArray<StatusSyncData>(val); ((MonoBehaviourPun)allCharacter2).photonView.RPC("SyncStatusesRPC", (RpcTarget)0, new object[1] { array4 }); } } } public static void ClearAffl() { //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) if (Atlas.Menu.Tabs.Lobby.IncludeSelf) { foreach (Character allCharacter in Character.AllCharacters) { float[] currentStatuses = allCharacter.refs.afflictions.currentStatuses; float[] array = new float[currentStatuses.Length]; Array.Copy(currentStatuses, array, currentStatuses.Length); for (int i = 0; i < array.Length; i++) { array[i] = 0f; } if (((MonoBehaviourPun)allCharacter).photonView.IsMine) { ((object)allCharacter.refs.afflictions).GetType().GetMethod("SetAll", BindingFlags.Instance | BindingFlags.NonPublic).Invoke(allCharacter.refs.afflictions, new object[1] { array }); } StatusSyncData val = default(StatusSyncData); val.statusList = new List<float>(array); byte[] array2 = IBinarySerializable.ToManagedArray<StatusSyncData>(val); ((MonoBehaviourPun)allCharacter).photonView.RPC("SyncStatusesRPC", (RpcTarget)0, new object[1] { array2 }); } return; } foreach (Character allCharacter2 in Character.AllCharacters) { if (!((MonoBehaviourPun)allCharacter2).photonView.IsMine) { float[] currentStatuses2 = allCharacter2.refs.afflictions.currentStatuses; float[] array3 = new float[currentStatuses2.Length]; Array.Copy(currentStatuses2, array3, currentStatuses2.Length); for (int j = 0; j < array3.Length; j++) { array3[j] = 0f; } StatusSyncData val = default(StatusSyncData); val.statusList = new List<float>(array3); byte[] array4 = IBinarySerializable.ToManagedArray<StatusSyncData>(val); ((MonoBehaviourPun)allCharacter2).photonView.RPC("SyncStatusesRPC", (RpcTarget)0, new object[1] { array4 }); } } } public static void ToggleWind(bool t) { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: 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_005f: 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) WindChillZone[] array = Object.FindObjectsOfType<WindChillZone>(); foreach (WindChillZone val in array) { PhotonView component = ((Component)val).GetComponent<PhotonView>(); object[] obj = new object[2] { t, null }; Vector3 val2 = Vector3.Lerp(Vector3.right * ((Random.value > 0.5f) ? 1f : (-1f)), Vector3.forward, 0.2f); obj[1] = ((Vector3)(ref val2)).normalized; component.RPC("RPCA_ToggleWind", (RpcTarget)0, obj); } } public static void StartLavaRise() { MovingLava[] array = Object.FindObjectsOfType<MovingLava>(); foreach (MovingLava val in array) { ((Component)val).GetComponent<PhotonView>().RPC("RPCA_StartLavaRise", (RpcTarget)0, new object[0]); } } public static void BlowdartHitAll() { //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) if (Atlas.Menu.Tabs.Lobby.IncludeSelf) { foreach (Character allCharacter in Character.AllCharacters) { Action_RaycastDart val = Object.FindFirstObjectByType<Action_RaycastDart>(); if ((Object)(object)val == (Object)null) { val = PhotonNetwork.Instantiate("0_Items/HealingDart Variant", Vector3.zero, Quaternion.identity, (byte)0, (object[])null).GetComponent<Action_RaycastDart>(); Plugin.instance.NewDebugNotif("Spawned healingdart at 0,0,0"); } ((Component)val).GetComponent<PhotonView>().RPC("RPC_DartImpact", (RpcTarget)0, new object[3] { ((MonoBehaviourPun)allCharacter).photonView.ViewID, allCharacter.Center, allCharacter.Center }); } return; } foreach (Character allCharacter2 in Character.AllCharacters) { if (!((MonoBehaviourPun)allCharacter2).photonView.IsMine) { Action_RaycastDart val2 = Object.FindFirstObjectByType<Action_RaycastDart>(); if ((Object)(object)val2 == (Object)null) { val2 = PhotonNetwork.Instantiate("0_Items/HealingDart Variant", Vector3.zero, Quaternion.identity, (byte)0, (object[])null).GetComponent<Action_RaycastDart>(); Plugin.instance.NewDebugNotif("Spawned healingdart at 0,0,0"); } ((Component)val2).GetComponent<PhotonView>().RPC("RPC_DartImpact", (RpcTarget)0, new object[3] { ((MonoBehaviourPun)allCharacter2).photonView.ViewID, allCharacter2.Center, allCharacter2.Center }); } } } public static void ShakeAllScreen() { if (Atlas.Menu.Tabs.Lobby.IncludeSelf) { foreach (Character allCharacter in Character.AllCharacters) { ((MonoBehaviourPun)allCharacter).photonView.RPC("RPCA_FallWithScreenShake", (RpcTarget)0, new object[2] { 0f, 5f }); } return; } foreach (Character allCharacter2 in Character.AllCharacters) { if (!((MonoBehaviourPun)allCharacter2).photonView.IsMine) { ((MonoBehaviourPun)allCharacter2).photonView.RPC("RPCA_FallWithScreenShake", (RpcTarget)0, new object[2] { 0f, 5f }); } } } public static void ExplodeAll() { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: 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) if (Atlas.Menu.Tabs.Lobby.IncludeSelf) { foreach (Character allCharacter in Character.AllCharacters) { Dynamite component = PhotonNetwork.Instantiate("0_Items/Dynamite", allCharacter.Head, Quaternion.identity, (byte)0, (object[])null).GetComponent<Dynamite>(); ((MonoBehaviourPun)component).photonView.RPC("RPC_Explode", (RpcTarget)0, new object[0]); PhotonNetwork.Destroy(((MonoBehaviourPun)component).photonView); } return; } foreach (Character allCharacter2 in Character.AllCharacters) { if (!((MonoBehaviourPun)allCharacter2).photonView.IsMine) { Dynamite component2 = PhotonNetwork.Instantiate("0_Items/Dynamite", allCharacter2.Head, Quaternion.identity, (byte)0, (object[])null).GetComponent<Dynamite>(); ((MonoBehaviourPun)component2).photonView.RPC("RPC_Explode", (RpcTarget)0, new object[0]); PhotonNetwork.Destroy(((MonoBehaviourPun)component2).photonView); } } } public static void ThrowScoutMasters() { Scoutmaster[] array = Object.FindObjectsOfType<Scoutmaster>(); foreach (Scoutmaster val in array) { ((Component)val).GetComponent<PhotonView>().RPC("RPCA_Throw", (RpcTarget)0, new object[0]); } } public static void SetJoinVers(string version) { //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) PhotonNetwork.SetMasterClient(PhotonNetwork.LocalPlayer); object service = GameHandler.GetService<SteamLobbyHandler>(); if (service == null) { Debug.LogError((object)"slh is null ?"); return; } FieldInfo field = service.GetType().GetField("m_currentLobby", BindingFlags.Instance | BindingFlags.NonPublic); if (field == null) { Debug.LogError((object)"cant find cl field"); return; } object value = field.GetValue(service); if (value is CSteamID) { CSteamID val = (CSteamID)value; if (true) { SteamMatchmaking.SetLobbyData(val, "PeakVersion", version); } } } public static void SetJoinScene(string scene) { //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) PhotonNetwork.SetMasterClient(PhotonNetwork.LocalPlayer); object service = GameHandler.GetService<SteamLobbyHandler>(); if (service == null) { Plugin.instance.LogWarn("slh is null ?"); return; } FieldInfo field = service.GetType().GetField("m_currentLobby", BindingFlags.Instance | BindingFlags.NonPublic); if (field == null) { Plugin.instance.LogWarn("cant find cl field"); return; } object value = field.GetValue(service); if (value is CSteamID) { CSteamID val = (CSteamID)value; if (true) { SteamMatchmaking.SetLobbyData(val, "CurrentScene", scene); } } } public static void ShakeAllIcecicles() { ShakyIcicleIce2[] array = Object.FindObjectsOfType<ShakyIcicleIce2>(); foreach (ShakyIcicleIce2 val in array) { ((Component)val).GetComponent<PhotonView>().RPC("ShakeRock_Rpc", (RpcTarget)0, new object[0]); } } public static void ShakeAllBridges() { BreakableBridge[] array = Object.FindObjectsOfType<BreakableBridge>(); foreach (BreakableBridge val in array) { ((MonoBehaviourPun)val).photonView.RPC("ShakeBridge_Rpc", (RpcTarget)0, new object[0]); } } public static void LightAllFlares() { Flare[] array = Object.FindObjectsOfType<Flare>(); foreach (Flare val in array) { ((MonoBehaviourPun)val).photonView.RPC("SetFlareLitRPC", (RpcTarget)0, new object[0]); } } public static void SetTimerTime(int time) { PeakSequence[] array = Object.FindObjectsOfType<PeakSequence>(); foreach (PeakSequence val in array) { ((Component)val).GetComponent<PhotonView>().RPC("RPCUpdateTimer", (RpcTarget)0, new object[1] { time }); } } public static void PlayEmote(string emote) { if (Atlas.Menu.Tabs.Lobby.IncludeSelf) { foreach (Character allCharacter in Character.AllCharacters) { ((MonoBehaviourPun)allCharacter).photonView.RPC("RPCA_PlayRemove", (RpcTarget)0, new object[2] { emote, false }); } return; } foreach (Character allCharacter2 in Character.AllCharacters) { if (!((MonoBehaviourPun)allCharacter2).photonView.IsMine) { ((MonoBehaviourPun)allCharacter2).photonView.RPC("RPCA_PlayRemove", (RpcTarget)0, new object[2] { emote, false }); } } } public static void UnHangAll() { if (Atlas.Menu.Tabs.Lobby.IncludeSelf) { foreach (Character allCharacter in Character.AllCharacters) { ClimbHandle[] array = Object.FindObjectsOfType<ClimbHandle>(); foreach (ClimbHandle val in array) { ((Component)val).GetComponent<PhotonView>().RPC("RPCA_UnHang", (RpcTarget)0, new object[1] { ((MonoBehaviourPun)allCharacter).photonView }); } } return; } foreach (Character allCharacter2 in Character.AllCharacters) { if (!((MonoBehaviourPun)allCharacter2).photonView.IsMine) { ClimbHandle[] array2 = Object.FindObjectsOfType<ClimbHandle>(); foreach (ClimbHandle val2 in array2) { ((Component)val2).GetComponent<PhotonView>().RPC("RPCA_UnHang", (RpcTarget)0, new object[1] { ((MonoBehaviourPun)allCharacter2).photonView }); } } } } public static void StopClimbingAll() { if (Atlas.Menu.Tabs.Lobby.IncludeSelf) { foreach (Character allCharacter in Character.AllCharacters) { ((MonoBehaviourPun)allCharacter).photonView.RPC("StopClimbingRpc", (RpcTarget)0, new object[1] { true }); ((MonoBehaviourPun)allCharacter).photonView.RPC("StopRopeClimbingRpc", (RpcTarget)0, new object[0]); ((MonoBehaviourPun)allCharacter).photonView.RPC("StopVineClimbingRpc", (RpcTarget)0, new object[0]); } return; } foreach (Character allCharacter2 in Character.AllCharacters) { if (!((MonoBehaviourPun)allCharacter2).photonView.IsMine) { ((MonoBehaviourPun)allCharacter2).photonView.RPC("StopClimbingRpc", (RpcTarget)0, new object[1] { true }); ((MonoBehaviourPun)allCharacter2).photonView.RPC("StopRopeClimbingRpc", (RpcTarget)0, new object[0]); ((MonoBehaviourPun)allCharacter2).photonView.RPC("StopVineClimbingRpc", (RpcTarget)0, new object[0]); } } } public static void SetTimeScale() { BingBongTimeControl[] array = Object.FindObjectsOfType<BingBongTimeControl>(); foreach (BingBongTimeControl val in array) { ((Component)val).GetComponent<PhotonView>().RPC("RPCA_SyncTime", (RpcTarget)0, new object[1] { 0f }); } } public static void SetTimeOfDay(float time) { DayNightManager[] array = Object.FindObjectsOfType<DayNightManager>(); foreach (DayNightManager val in array) { ((Component)val).GetComponent<PhotonView>().RPC("RPCA_SyncTime", (RpcTarget)0, new object[1] { time }); } } public static void Break() { ShittyPiton[] array = Object.FindObjectsOfType<ShittyPiton>(); foreach (ShittyPiton val in array) { ((Component)val).GetComponent<PhotonView>().RPC("RPCA_Break", (RpcTarget)0, new object[0]); } } public static void StartBreak() { ShittyPiton[] array = Object.FindObjectsOfType<ShittyPiton>(); foreach (ShittyPiton val in array) { ((Component)val).GetComponent<PhotonView>().RPC("RPCA_StartBreaking", (RpcTarget)0, new object[0]); } } public static void ForceME() { PlayerGhost[] array = Object.FindObjectsOfType<PlayerGhost>(); foreach (PlayerGhost val in array) { val.m_view.RPC("RPCA_SetTarget", (RpcTarget)0, new object[1] { ((MonoBehaviourPun)Character.localCharacter).photonView }); } } public static void InitFog() { OrbFogHandler[] array = Object.FindObjectsOfType<OrbFogHandler>(); foreach (OrbFogHandler val in array) { ((Component)val).GetComponent<PhotonView>().RPC("StartMovingRPC", (RpcTarget)0, new object[0]); } } public static void DAll() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) PhotonNetwork.SetMasterClient(PhotonNetwork.LocalPlayer); PhotonView[] array = Object.FindObjectsOfType<PhotonView>(); foreach (PhotonView val in array) { val.OwnershipTransfer = (OwnershipOption)2; val.OwnerActorNr = PhotonNetwork.LocalPlayer.ActorNumber; val.ControllerActorNr = PhotonNetwork.LocalPlayer.ActorNumber; val.RequestOwnership(); val.TransferOwnership(PhotonNetwork.LocalPlayer); PhotonNetwork.Destroy(val); } PhotonNetwork.DestroyAll(); } public static void LightLanterns(bool v) { Lantern[] array = Object.FindObjectsOfType<Lantern>(); foreach (Lantern val in array) { ((MonoBehaviourPun)val).photonView.RPC("LightLanternRPC", (RpcTarget)0, new object[1] { v }); } } public static void GrowVine() { //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) if (Atlas.Menu.Tabs.Lobby.IncludeSelf) { foreach (Character allCharacter in Character.AllCharacters) { ((MonoBehaviourPun)Object.FindObjectOfType<MagicBean>()).photonView.RPC("GrowVineRPC", (RpcTarget)0, new object[3] { allCharacter.Head, Random.onUnitSphere, 10f }); } return; } foreach (Character allCharacter2 in Character.AllCharacters) { if (!((MonoBehaviourPun)allCharacter2).photonView.IsMine) { ((MonoBehaviourPun)Object.FindObjectOfType<MagicBean>()).photonView.RPC("GrowVineRPC", (RpcTarget)0, new object[3] { allCharacter2.Head, Random.onUnitSphere, 10f }); } } } public static void FireAllArrows() { ArrowShooter[] array = Object.FindObjectsOfType<ArrowShooter>(); foreach (ArrowShooter val in array) { ((MonoBehaviourPun)val).photonView.RPC("FireArrow_RPC", (RpcTarget)0, new object[0]); } } public static void SoftLockPlayers() { ((MonoBehaviourPun)Object.FindObjectOfType<AirportCheckInKiosk>()).photonView.RPC("BeginIslandLoadRPC", (RpcTarget)0, new object[2] { "Pretitle", 7 }); } public static void beezall() { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) if (Atlas.Menu.Tabs.Lobby.IncludeSelf) { foreach (Character allCharacter in Character.AllCharacters) { BeeSwarm component = PhotonNetwork.Instantiate("BeeSwarm", allCharacter.Head, Quaternion.identity, (byte)0, (object[])null).GetComponent<BeeSwarm>(); ((MonoBehaviourPun)component).photonView.RPC("SetBeesAngryRPC", (RpcTarget)0, new object[1] { true }); } return; } foreach (Character allCharacter2 in Character.AllCharacters) { if (!((MonoBehaviourPun)allCharacter2).photonView.IsMine) { BeeSwarm component2 = PhotonNetwork.Instantiate("BeeSwarm", allCharacter2.Head, Quaternion.identity, (byte)0, (object[])null).GetComponent<BeeSwarm>(); ((MonoBehaviourPun)component2).photonView.RPC("SetBeesAngryRPC", (RpcTarget)0, new object[1] { true }); } } } public static void openluggages(bool v) { Luggage[] array = Object.FindObjectsOfType<Luggage>(); foreach (Luggage val in array) { ((MonoBehaviourPun)val).photonView.RPC("OpenLuggageRPC", (RpcTarget)0, new object[1] { v }); } } public static void RevAllAndTPToMe() { //IL_005a: 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_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) foreach (Character allCharacter in Character.AllCharacters) { ((MonoBehaviourPun)allCharacter).photonView.RPC("RPCA_Revive", (RpcTarget)0, new object[1] { false }); ((MonoBehaviourPun)allCharacter).photonView.RPC("WarpPlayerRPC", (RpcTarget)0, new object[2] { ((Component)Camera.main).transform.position + ((Component)Camera.main).transform.forward * 2f, true }); } } public static void ThrowAchievement(int v) { if (v == 1) { ((MonoBehaviourPun)GameUtils.instance).photonView.RPC("ThrowBingBongAchievementRpc", (RpcTarget)0, new object[0]); } if (v == 2) { ((MonoBehaviourPun)GameUtils.instance).photonView.RPC("ThrowEmergencyPreparednessAchievementRpc", (RpcTarget)0, new object[0]); } } public static void FlipgbPageLeft() { Guidebook[] array = Object.FindObjectsOfType<Guidebook>(); foreach (Guidebook val in array) { ((MonoBehaviourPun)val).photonView.RPC("FlipPageLeft_RPC", (RpcTarget)0, new object[1] { Random.Range(0, 5) }); } } public static void FlipgbPageRight() { Guidebook[] array = Object.FindObjectsOfType<Guidebook>(); foreach (Guidebook val in array) { ((MonoBehaviourPun)val).photonView.RPC("FlipPageRight_RPC", (RpcTarget)0, new object[1] { Random.Range(0, 5) }); } } public static void IcecicleFall() { ShakyIcicleIce2[] array = Object.FindObjectsOfType<ShakyIcicleIce2>(); foreach (ShakyIcicleIce2 val in array) { ((Component)val).GetComponent<PhotonView>().RPC("Fall_Rpc", (RpcTarget)0, new object[0]); } } public static void Bridge() { BreakableBridge[] array = Object.FindObjectsOfType<BreakableBridge>(); foreach (BreakableBridge val in array) { ((MonoBehaviourPun)val).photonView.RPC("Fall_Rpc", (RpcTarget)0, new object[0]); } } public static void SetWoodAmt(int amount) { Campfire[] array = Object.FindObjectsOfType<Campfire>(); foreach (Campfire val in array) { ((Component)val).GetComponent<PhotonView>().RPC("SetFireWoodCount", (RpcTarget)0, new object[1] { amount }); } } public static void ToglCampfir(bool v) { if (v) { Campfire[] array = Object.FindObjectsOfType<Campfire>(); foreach (Campfire val in array) { ((Component)val).GetComponent<PhotonView>().RPC("Light_Rpc", (RpcTarget)0, new object[0]); } } else { Campfire[] array2 = Object.FindObjectsOfType<Campfire>(); foreach (Campfire val2 in array2) { ((Component)val2).GetComponent<PhotonView>().RPC("Extinguish_Rpc", (RpcTarget)0, new object[0]); } } } public static void RefrshAll() { foreach (Character allCharacter in Character.AllCharacters) { ((MonoBehaviourPun)allCharacter.refs.items).photonView.RPC("RefreshAllCharacterCarryWeightRPC", (RpcTarget)0, new object[0]); } } public static void DetachRopes() { Rope[] array = Object.FindObjectsOfType<Rope>(); foreach (Rope val in array) { ((MonoBehaviourPun)val).photonView.RPC("Detach_Rpc", (RpcTarget)0, new object[0]); } } public static void RequestAllItems() { if (Atlas.Menu.Tabs.Lobby.IncludeSelf) { Item[] array = Object.FindObjectsOfType<Item>(); foreach (Item val in array) { if (!((Object)(object)((MonoBehaviourPun)val).photonView != (Object)null)) { continue; } foreach (Character allCharacter in Character.AllCharacters) { ((MonoBehaviourPun)val).photonView.RPC("RequestPickup", (RpcTarget)0, new object[1] { ((MonoBehaviourPun)allCharacter).photonView }); } } return; } Item[] array2 = Object.FindObjectsOfType<Item>(); foreach (Item val2 in array2) { if (!((Object)(object)((MonoBehaviourPun)val2).photonView != (Object)null)) { continue; } foreach (Character allCharacter2 in Character.AllCharacters) { if (!((MonoBehaviourPun)allCharacter2).photonView.IsMine) { ((MonoBehaviourPun)val2).photonView.RPC("RequestPickup", (RpcTarget)0, new object[1] { ((MonoBehaviourPun)allCharacter2).photonView }); } } } } public static void ForceAllDone() { GameOverHandler val = Object.FindFirstObjectByType<GameOverHandler>(); if ((Object)(object)val != (Object)null) { ((Component)val).GetComponent<PhotonView>().RPC("ForceEveryPlayerDoneWithEndScreenRPC", (RpcTarget)0, new object[0]); } } public static void BlackScreenAll() { //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) if (Atlas.Menu.Tabs.Lobby.IncludeSelf) { foreach (Character allCharacter in Character.AllCharacters) { ((MonoBehaviourPun)allCharacter).photonView.RPC("WarpPlayerRPC", (RpcTarget)0, new object[2] { (object)new Vector3(float.NegativeInfinity, float.NegativeInfinity, float.NegativeInfinity), true }); } return; } foreach (Character allCharacter2 in Character.AllCharacters) { if (!((MonoBehaviourPun)allCharacter2).photonView.IsMine) { ((MonoBehaviourPun)allCharacter2).photonView.RPC("WarpPlayerRPC", (RpcTarget)0, new object[2] { (object)new Vector3(float.NegativeInfinity, float.NegativeInfinity, float.NegativeInfinity), true }); } } } public static void SlipAll() { //IL_003f: 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_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) if (Atlas.Menu.Tabs.Lobby.IncludeSelf) { foreach (Character allCharacter in Character.AllCharacters) { BananaPeel val = Object.FindFirstObjectByType<BananaPeel>(); if ((Object)(object)val == (Object)null) { val = PhotonNetwork.Instantiate("0_Items/Berrynana Peel Pink Variant", allCharacter.Head, Quaternion.identity, (byte)0, (object[])null).GetComponent<BananaPeel>(); Plugin.instance.NewDebugNotif("Spawned banana peel"); } ((Component)val).GetComponent<PhotonView>().RPC("RPCA_TriggerBanana", (RpcTarget)0, new object[1] { allCharacter.refs.view.ViewID }); } return; } foreach (Character allCharacter2 in Character.AllCharacters) { if (!((MonoBehaviourPun)allCharacter2).photonView.IsMine) { BananaPeel val2 = Object.FindFirstObjectByType<BananaPeel>(); if ((Object)(object)val2 == (Object)null) { val2 = PhotonNetwork.Instantiate("0_Items/Berrynana Peel Pink Variant", allCharacter2.Head, Quaternion.identity, (byte)0, (object[])null).GetComponent<BananaPeel>(); Plugin.instance.NewDebugNotif("Spawned banana peel"); } ((Component)val2).GetComponent<PhotonView>().RPC("RPCA_TriggerBanana", (RpcTarget)0, new object[1] { allCharacter2.refs.view.ViewID }); } } } public static void FlingAll() { if (Atlas.Menu.Tabs.Lobby.IncludeSelf) { foreach (Character allCharacter in Character.AllCharacters) { ((MonoBehaviourPun)allCharacter).photonView.RPC("RPCA_Fall", (RpcTarget)0, new object[1] { 7f }); ((MonoBehaviourPun)allCharacter).photonView.RPC("JumpRpc", (RpcTarget)0, new object[1] { false }); ((MonoBehaviourPun)allCharacter).photonView.RPC("JumpRpc", (RpcTarget)0, new object[1] { false }); ((MonoBehaviourPun)allCharacter).photonView.RPC("JumpRpc", (RpcTarget)0, new object[1] { false }); ((MonoBehaviourPun)allCharacter).photonView.RPC("JumpRpc", (RpcTarget)0, new object[1] { false }); ((MonoBehaviourPun)allCharacter).photonView.RPC("JumpRpc", (RpcTarget)0, new object[1] { false }); ((MonoBehaviourPun)allCharacter).photonView.RPC("JumpRpc", (RpcTarget)0, new object[1] { false }); ((MonoBehaviourPun)allCharacter).photonView.RPC("JumpRpc", (RpcTarget)0, new object[1] { false }); ((MonoBehaviourPun)allCharacter).photonView.RPC("JumpRpc", (RpcTarget)0, new object[1] { false }); } return; } foreach (Character allCharacter2 in Character.AllCharacters) { if (!((MonoBehaviourPun)allCharacter2).photonView.IsMine) { ((MonoBehaviourPun)allCharacter2).photonView.RPC("RPCA_Fall", (RpcTarget)0, new object[1] { 7f }); ((MonoBehaviourPun)allCharacter2).photonView.RPC("JumpRpc", (RpcTarget)0, new object[1] { false }); ((MonoBehaviourPun)allCharacter2).photonView.RPC("JumpRpc", (RpcTarget)0, new object[1] { false }); ((MonoBehaviourPun)allCharacter2).photonView.RPC("JumpRpc", (RpcTarget)0, new object[1] { false }); ((MonoBehaviourPun)allCharacter2).photonView.RPC("JumpRpc", (RpcTarget)0, new object[1] { false }); ((MonoBehaviourPun)allCharacter2).photonView.RPC("JumpRpc", (RpcTarget)0, new object[1] { false }); ((MonoBehaviourPun)allCharacter2).photonView.RPC("JumpRpc", (RpcTarget)0, new object[1] { false }); ((MonoBehaviourPun)allCharacter2).photonView.RPC("JumpRpc", (RpcTarget)0, new object[1] { false }); ((MonoBehaviourPun)allCharacter2).photonView.RPC("JumpRpc", (RpcTarget)0, new object[1] { false }); } } } public static void RenderAllPassedOut() { if (Atlas.Menu.Tabs.Lobby.IncludeSelf) { foreach (Character allCharacter in Character.AllCharacters) { ((Component)allCharacter.refs.customization).GetComponent<PhotonView>().RPC("CharacterPassedOut", (RpcTarget)0, new object[0]); } return; } foreach (Character allCharacter2 in Character.AllCharacters) { if (!((MonoBehaviourPun)allCharacter2).photonView.IsMine) { ((Component)allCharacter2.refs.customization).GetComponent<PhotonView>().RPC("CharacterPassedOut", (RpcTarget)0, new object[0]); } } } public static void RenderAllDead() { if (Atlas.Menu.Tabs.Lobby.IncludeSelf) { foreach (Character allCharacter in Character.AllCharacters) { ((Component)allCharacter.refs.customization).GetComponent<PhotonView>().RPC("CharacterDied", (RpcTarget)0, new object[0]); } return; } foreach (Character allCharacter2 in Character.AllCharacters) { if (!((MonoBehaviourPun)allCharacter2).photonView.IsMine) { ((Component)allCharacter2.refs.customization).GetComponent<PhotonView>().RPC("CharacterDied", (RpcTarget)0, new object[0]); } } } public static void DropAllSlots() { DropSlot(0); DropSlot(1); DropSlot(2); DropSlot(250); } public static void EmptyAllSlots() { EmptySlot(0); EmptySlot(1); EmptySlot(2); EmptySlot(250); } public static void DropAllHeldItems() { PhotonNetwork.SetMasterClient(PhotonNetwork.LocalPlayer); if (Atlas.Menu.Tabs.Lobby.IncludeSelf) { foreach (Character allCharacter in Character.AllCharacters) { ((MonoBehaviourPun)allCharacter.refs.items).photonView.RPC("DestroyHeldItemRpc", (RpcTarget)0, new object[0]); } return; } foreach (Character allCharacter2 in Character.AllCharacters) { if (!((MonoBehaviourPun)allCharacter2).photonView.IsMine) { ((MonoBehaviourPun)allCharacter2.refs.items).photonView.RPC("DestroyHeldItemRpc", (RpcTarget)0, new object[0]); } } } public static void DropSlot(int slot) { //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) PhotonNetwork.SetMasterClient(PhotonNetwork.LocalPlayer); if (Atlas.Menu.Tabs.Lobby.IncludeSelf) { foreach (Character allCharacter in Character.AllCharacters) { ((MonoBehaviourPun)allCharacter.refs.items).photonView.RPC("DropItemFromSlotRPC", (RpcTarget)0, new object[2] { (byte)slot, allCharacter.Head }); } return; } foreach (Character allCharacter2 in Character.AllCharacters) { if (!((MonoBehaviourPun)allCharacter2).photonView.IsMine) { ((MonoBehaviourPun)allCharacter2.refs.items).photonView.RPC("DropItemFromSlotRPC", (RpcTarget)0, new object[2] { (byte)slot, allCharacter2.Head }); } } } public static void EmptySlot(int slot) { if (Atlas.Menu.Tabs.Lobby.IncludeSelf) { foreach (Character allCharacter in Character.AllCharacters) { ((MonoBehaviourPun)allCharacter.player).photonView.RPC("RPCRemoveItemFromSlot", (RpcTarget)0, new object[1] { (byte)slot }); } return; } foreach (Character allCharacter2 in Character.AllCharacters) { if (!((MonoBehaviourPun)allCharacter2).photonView.IsMine) { ((MonoBehaviourPun)allCharacter2.player).photonView.RPC("RPCRemoveItemFromSlot", (RpcTarget)0, new object[1] { (byte)slot }); } } } public static void DestroyAll() { //IL_002c: 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) if (Atlas.Menu.Tabs.Lobby.IncludeSelf) { foreach (Character allCharacter in Character.AllCharacters) { ((MonoBehaviourPun)allCharacter).photonView.OwnershipTransfer = (OwnershipOption)2; ((MonoBehaviourPun)allCharacter).photonView.OwnerActorNr = PhotonNetwork.LocalPlayer.ActorNumber; ((MonoBehaviourPun)allCharacter).photonView.ControllerActorNr = PhotonNetwork.LocalPlayer.ActorNumber; ((MonoBehaviourPun)allCharacter).photonView.RequestOwnership(); ((MonoBehaviourPun)allCharacter).photonView.TransferOwnership(PhotonNetwork.LocalPlayer);