Decompiled source of Jaket v1.3.42
Jaket.dll
Decompiled 4 months ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Text; using System.Text.RegularExpressions; using System.Threading.Tasks; using BepInEx; using BepInEx.Bootstrap; using Discord; using GameConsole; using HarmonyLib; using Jaket.Assets; using Jaket.Commands; using Jaket.Content; using Jaket.IO; using Jaket.Net; using Jaket.Net.Endpoints; using Jaket.Net.Types; using Jaket.Sam; using Jaket.Sprays; using Jaket.UI; using Jaket.UI.Dialogs; using Jaket.UI.Elements; using Jaket.UI.Fragments; using Jaket.World; using Microsoft.CodeAnalysis; using Sandbox; using Steamworks; using Steamworks.Data; using TMPro; using ULTRAKILL.Cheats; using UnityEngine; using UnityEngine.AI; using UnityEngine.AddressableAssets; using UnityEngine.Audio; using UnityEngine.EventSystems; using UnityEngine.Events; using UnityEngine.Networking; using UnityEngine.SceneManagement; using UnityEngine.UI; using UnityEngine.UI.Extensions; using plog; using plog.Models; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = "")] [assembly: AssemblyCompany("Jaket")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyDescription("Multikill is still in development, so I created my own multiplayer mod for Ultrakill")] [assembly: AssemblyFileVersion("1.3.42.0")] [assembly: AssemblyInformationalVersion("1.3.42")] [assembly: AssemblyProduct("Jaket")] [assembly: AssemblyTitle("Jaket")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.3.42.0")] [module: UnverifiableCode] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class IsReadOnlyAttribute : Attribute { } } namespace Jaket { public class Events : MonoSingleton<Events> { public static SafeEvent OnLoadingStarted = new SafeEvent(); public static SafeEvent OnLoaded = new SafeEvent(); public static SafeEvent OnMainMenuLoaded = new SafeEvent(); public static SafeEvent OnLobbyAction = new SafeEvent(); public static SafeEvent OnLobbyEntered = new SafeEvent(); public static SafeEvent OnTeamChanged = new SafeEvent(); public static SafeEvent OnWeaponChanged = new SafeEvent(); public static Queue<Action> Tasks = new Queue<Action>(); public static SafeEvent EveryTick = new SafeEvent(); public static SafeEvent EverySecond = new SafeEvent(); public static SafeEvent EveryDozen = new SafeEvent(); public static void Load() { Tools.Create<Events>("Events", (Transform)null); SceneManager.sceneLoaded += delegate { OnLoaded.Fire(); if (Tools.Scene == "Main Menu") { OnMainMenuLoaded.Fire(); } }; SteamMatchmaking.OnLobbyMemberLeave += delegate { Post(OnTeamChanged.Fire); }; SteamMatchmaking.OnLobbyDataChanged += delegate { OnLobbyAction.Fire(); }; SteamMatchmaking.OnLobbyEntered += delegate { OnLobbyEntered.Fire(); }; OnLobbyAction += new Action(OnTeamChanged.Fire); OnLobbyAction += new Action(OnWeaponChanged.Fire); OnLobbyAction += (Action)delegate { DiscordController.Instance.FetchSceneActivity(Tools.Scene); SteamController.Instance.FetchSceneActivity(Tools.Scene); Application.runInBackground = LobbyController.Online; }; } public static void Post(Action task) { Tasks.Enqueue(task); } public static void Post2(Action task) { Post(delegate { Post(task); }); } private void Dozen() { EveryDozen.Fire(); } private void Second() { EverySecond.Fire(); } private void Tick() { EveryTick.Fire(); } private void Start() { ((MonoBehaviour)this).InvokeRepeating("Dozen", 1f, 12f); ((MonoBehaviour)this).InvokeRepeating("Second", 1f, 1f); ((MonoBehaviour)this).InvokeRepeating("Tick", 1f, 0.0625f); } private void LateUpdate() { int count = Tasks.Count; for (int i = 0; i < count; i++) { Tasks.Dequeue()?.Invoke(); } } } public class SafeEvent { private List<Action> listeners = new List<Action>(); public void Fire() { for (int i = 0; i < listeners.Count; i++) { try { listeners[i](); } catch (Exception ex) { Log.Error(ex); } } } public static SafeEvent operator +(SafeEvent e, Action listener) { e.listeners.Add(listener); return e; } public static SafeEvent operator -(SafeEvent e, Action listener) { e.listeners.Remove(listener); return e; } } public class Log { public enum Level { Debug, Info, Warning, Error } public const string TIME_FORMAT = "yyyy.MM.dd HH:mm:ss"; public const int STORAGE_CAPACITY = 32; public static List<string> ToWrite = new List<string>(); public static Logger Logger; public static string LogPath; public static string Time => DateTime.Now.ToString("yyyy.MM.dd HH:mm:ss"); public static void Load() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Expected O, but got Unknown Logger = new Logger("Jaket"); LogPath = Path.Combine(Path.GetDirectoryName(Plugin.Instance.Location), "logs", "Log " + Time.Replace(':', '.') + ".txt"); Events.OnLobbyAction += (Action)delegate { //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) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_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_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) Lobby val; object obj; if (!LobbyController.Offline) { object arg; if (!LobbyController.Lobby.HasValue) { arg = null; } else { val = LobbyController.Lobby.GetValueOrDefault(); arg = ((Lobby)(ref val)).GetData("name"); } val = LobbyController.Lobby.Value; obj = $"{arg} ({((Lobby)(ref val)).Id})"; } else { obj = "null"; } string text = (string)obj; object obj2; if (!LobbyController.Lobby.HasValue) { obj2 = null; } else { val = LobbyController.Lobby.GetValueOrDefault(); Friend owner = ((Lobby)(ref val)).Owner; obj2 = ((object)(Friend)(ref owner)).ToString(); } if (obj2 == null) { obj2 = "null"; } string text2 = (string)obj2; Debug("Lobby status updated: cl is " + text + ", owner is " + text2); }; Events.OnLobbyEntered += (Action)delegate { Debug("Entered the new lobby"); }; } public static void LogLevel(Level level, string msg) { //IL_0029: 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_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) Logger logger = Logger; string text = ((level == Level.Debug) ? ("<color=#BBBBBB>" + msg + "</color>") : msg); Level val; switch (level) { case Level.Debug: case Level.Info: val = (Level)10; break; case Level.Warning: val = (Level)20; break; default: val = (Level)30; break; } logger.Log(text, val, (IEnumerable<Tag>)null, (string)null); ToWrite.Add($"[{Time}] [{(new char[4] { 'D', 'I', 'W', 'E' })[(int)level]}] {msg}"); if (ToWrite.Count > 32) { Flush(); } } public static void Flush() { if (ToWrite.Count != 0) { Directory.CreateDirectory(Path.GetDirectoryName(LogPath)); File.AppendAllLines(LogPath, ToWrite); ToWrite.Clear(); } } public static void Debug(string msg) { LogLevel(Level.Debug, msg); } public static void Info(string msg) { LogLevel(Level.Info, msg); } public static void Warning(string msg) { LogLevel(Level.Warning, msg); } public static void Error(string msg) { LogLevel(Level.Error, msg); } public static void Error(Exception ex) { LogLevel(Level.Error, ex.ToString() + "\nOuter:\n" + StackTraceUtility.ExtractStackTrace()); } } [BepInPlugin("xzxADIxzx.Jaket", "Jaket", "1.3.42")] public class PluginLoader : BaseUnityPlugin { private void Awake() { SceneManager.sceneLoaded += delegate { if ((Object)(object)Plugin.Instance == (Object)null) { Tools.Create<Plugin>("Jaket", (Transform)null).Location = ((BaseUnityPlugin)this).Info.Location; } }; } } public class Plugin : MonoBehaviour { public static Plugin Instance; public bool Initialized; public string Location; public static readonly string[] Compatible = new string[7] { "Jaket", "CrosshairColorFixer", "IntroSkip", "Healthbars", "RcHud", "PluginConfigurator", "AngryLevelLoader" }; public bool HasIncompatibility; private void Awake() { Object.DontDestroyOnLoad((Object)(object)(Instance = this)); } private void Start() { Log.Load(); Log.Info("Loading jaket..."); Events.Load(); Events.OnMainMenuLoaded += new Action(Init); } private void OnApplicationQuit() { Log.Flush(); } private void Init() { //IL_0077: Unknown result type (might be due to invalid IL or missing references) if (!Initialized) { Version.Check4Update(); Pointers.Allocate(); Stats.StartRecord(); Tools.CacheAccId(); Jaket.Commands.Commands.Load(); Bundle.Load(); Enemies.Load(); Weapons.Load(); Bullets.Load(); Items.Load(); DollAssets.Load(); Administration.Load(); LobbyController.Load(); Networking.Load(); Entities.Load(); Jaket.World.World.Load(); WorldActionsList.Load(); Movement.Load(); SprayManager.Load(); UIB.Load(); Jaket.UI.UI.Load(); new Harmony("Should I write something here?").PatchAll(); HasIncompatibility = Chainloader.PluginInfos.Values.Any((PluginInfo info) => !Compatible.Contains(info.Metadata.Name)); Initialized = true; Log.Info("Jaket initialized!"); } } } public class Tools { public static uint AccId; public static SteamId Id => SteamClient.SteamId; public static string Scene => SceneHelper.CurrentScene; public static string Pending => SceneHelper.PendingScene; public static void CacheAccId() { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) SteamId id = Id; AccId = ((SteamId)(ref id)).AccountId; } public static string Name(uint id) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) Friend val = new Friend(SteamId.op_Implicit(id | 0x110000100000000uL)); return ((Friend)(ref val)).Name; } public static void Send(Connection? con, IntPtr data, int size) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) if (!con.HasValue) { Log.Warning("An attempt to send data to the connection equal to null."); return; } Connection value = con.Value; ((Connection)(ref value)).SendMessage(data, size, (SendType)8, (ushort)0); Stats.Write += size; } public static void Load(string scene) { SceneHelper.LoadScene(scene, false); } public static bool IsReal(GameObject obj) { //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) Scene scene = obj.scene; return ((Scene)(ref scene)).name != null; } public static bool IsReal(Component comp) { return IsReal(comp.gameObject); } public static GameObject Create(string name, Transform parent = null) { //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_0029: Expected O, but got Unknown GameObject val = new GameObject(name); Transform transform = val.transform; object obj = parent; if (obj == null) { Plugin instance = Plugin.Instance; obj = ((instance != null) ? ((Component)instance).transform : null); } transform.SetParent((Transform)obj, false); return val; } public static T Create<T>(string name, Transform parent = null) where T : Component { return Create(name, parent).AddComponent<T>(); } public static GameObject Instantiate(GameObject obj, Transform parent) { return Object.Instantiate<GameObject>(obj, parent); } public static GameObject Instantiate(GameObject obj, Vector3 position, Quaternion? rotation = null) { //IL_0001: 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_000d: Unknown result type (might be due to invalid IL or missing references) return Object.Instantiate<GameObject>(obj, position, (Quaternion)(((??)rotation) ?? Quaternion.identity)); } public static void Destroy(Object obj) { Object.Destroy(obj); } public static void DestroyImmediate(Object obj) { Object.DestroyImmediate(obj); } public static T[] ResFind<T>() where T : Object { return Resources.FindObjectsOfTypeAll<T>(); } public static void ResFind<T>(Predicate<T> pred, Action<T> cons) where T : Object { T[] array = ResFind<T>(); foreach (T obj in array) { if (pred(obj)) { cons(obj); } } } public static T ObjFind<T>() where T : Object { return Object.FindObjectOfType<T>(); } public static GameObject ObjFind(string name) { return GameObject.Find(name); } public static UnityEvent GetClick(GameObject btn) { MonoBehaviour val = btn.GetComponents<MonoBehaviour>()[2]; object? value = AccessTools.Property(((object)val).GetType(), "OnPressed").GetValue(val); return (UnityEvent)((value is UnityEvent) ? value : null); } public static FieldInfo Field<T>(string name) { return AccessTools.Field(typeof(T), name); } public static object Get<T>(string name, T t) { return Field<T>(name).GetValue(t); } public static void Set<T>(string name, T t, object value) { Field<T>(name).SetValue(t, value); } public static void Invoke<T>(string name, T t, params object[] args) { AccessTools.Method(typeof(T), name, (Type[])null, (Type[])null).Invoke(t, args); } public static void Invoke<T>(string name, T t, bool arg) { AccessTools.Method(typeof(T), name, new Type[1] { typeof(bool) }, (Type[])null).Invoke(t, new object[1] { arg }); } public static bool Within(Vector3 a, Vector3 b, float dst = 1f) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: 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) Vector3 val = a - b; return ((Vector3)(ref val)).sqrMagnitude < dst * dst; } public static bool Within(Transform a, Vector3 b, float dst = 1f) { //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) return Within(a.position, b, dst); } public static bool Within(Transform a, Transform b, float dst = 1f) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) return Within(a.position, b.position, dst); } public static bool Within(GameObject a, Vector3 b, float dst = 1f) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) return Within(a.transform.position, b, dst); } public static bool Within(GameObject a, GameObject b, float dst = 1f) { //IL_0006: 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) return Within(a.transform.position, b.transform.position, dst); } } public class Version { public const string CURRENT = "1.3.42"; public const string REPO = "xzxADIxzx/Join-and-kill-em-together"; public const string GITHUB_API = "https://api.github.com"; public const string TAG = "\"tag_name\": \"V"; public const string NAME = "\"name\": \""; public static void Notify() { Bundle.Hud2NS("version.host-outdated"); } public static void Check4Update() { Fetch(delegate(bool done, string result) { if (done && Parse(result, out var latest, out var name) && latest != "1.3.42") { Bundle.Hud("version.outdated", false, "1.3.42", latest, name); } }); } public static void Fetch(Action<bool, string> result) { Log.Info("Checking for updates..."); UnityWebRequest request = UnityWebRequest.Get("https://api.github.com/repos/xzxADIxzx/Join-and-kill-em-together/releases"); ((AsyncOperation)request.SendWebRequest()).completed += delegate { result(request.isDone, request.downloadHandler.text); }; } public static bool Parse(string result, out string latest, out string name) { latest = (name = "Failed to parse data ;("); int num = result.IndexOf("\"tag_name\": \"V"); int num2 = result.IndexOf("\"name\": \""); if (num == -1 || num2 == -1) { return false; } latest = result.Substring(num += "\"tag_name\": \"V".Length, result.IndexOf('"', num) - num); name = result.Substring(num2 += "\"name\": \"".Length, result.IndexOf('"', num2) - num2); return true; } public static void Label(Transform parent) { Rect r = Rect.Blw(36f, 40f); UIB.Table("Version", parent, r, delegate(Transform table) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) UIB.Text("Jaket version is 1.3.42", table, r.Text, Color.grey, 24, (TextAnchor)4); }); } } } namespace Jaket.World { public class WorldAction { public readonly string Level; public readonly Action Action; public WorldAction(string level, Action action) { Level = level; Action = action; World.Actions.Add(this); } public void Run() { if (Tools.Scene == Level) { Action(); } } } public class StaticAction : WorldAction { public StaticAction(string level, Action action) : base(level, action) { } public static void PlaceTorches(string level, Vector3 pos, float radius) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) new StaticAction(level, delegate { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) GameObject obj = GameAssets.Torch(); for (float num = 308.57144f; num >= 0f; num -= 51.42857f) { float num2 = num * (MathF.PI / 180f); Tools.Instantiate(obj, pos + new Vector3(Mathf.Cos(num2), 0f, Mathf.Sin(num2)) * radius, Quaternion.Euler(0f, num / 7f, 0f)); } }); } public static void Find(string level, string name, Vector3 position, Action<GameObject> action) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) new StaticAction(level, delegate { Tools.ResFind<GameObject>((Predicate<GameObject>)((GameObject obj) => Tools.IsReal(obj) && obj.transform.position == position && ((Object)obj).name == name), action); }); } public static void Patch(string level, string name, Vector3 position) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) Find(level, name, position, delegate(GameObject obj) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown obj.AddComponent<ObjectActivator>().events = new UltrakillEvent(); }); } public static void Enable(string level, string name, Vector3 position) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) Find(level, name, position, delegate(GameObject obj) { obj.SetActive(true); }); } public static void Destroy(string level, string name, Vector3 position) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) Find(level, name, position, Tools.Destroy); } } public class NetAction : WorldAction { public string Name; public Vector3 Position; public NetAction(string level, string name, Vector3 position, Action action) : base(level, action) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) Name = name; Position = position; } public static void Sync(string level, string name, Vector3 position, Action<Transform> action = null) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) new NetAction(level, name, position, delegate { Tools.ResFind<ObjectActivator>((Predicate<ObjectActivator>)((ObjectActivator obj) => Tools.IsReal((Component)(object)obj) && Tools.Within(((Component)obj).transform, position) && ((Object)obj).name == name), (Action<ObjectActivator>)delegate(ObjectActivator obj) { ((Component)obj).gameObject.SetActive(true); obj.ActivateDelayed(obj.delay); action?.Invoke(((Component)obj).transform); }); }); } public static void SyncLimbo(string level, Vector3 position) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) Sync(level, "GameObject", position, delegate(Transform obj) { ((Component)obj).GetComponentInParent<LimboSwitch>().Pressed(); }); } public static void SyncButton(string level, string name, Vector3 position, Action<RectTransform> action = null) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0023: 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) StaticAction.Find(level, name, position, delegate(GameObject obj) { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Expected O, but got Unknown Tools.GetClick(obj).AddListener((UnityAction)delegate { if (LobbyController.Online) { World.SyncAction(obj); } }); }); new NetAction(level, name, position, delegate { Tools.ResFind<RectTransform>((Predicate<RectTransform>)((RectTransform obj) => Tools.IsReal((Component)(object)obj) && Tools.Within((Transform)(object)obj, position) && ((Object)obj).name == name), (Action<RectTransform>)delegate(RectTransform obj) { Tools.GetClick(((Component)obj).gameObject).Invoke(); action?.Invoke(obj); }); }); } } public class CyberGrind { public static int CurrentWave; public static ArenaPattern CurrentPattern; private static EndlessGrid grid => MonoSingleton<EndlessGrid>.Instance; private static NewMovement nm => MonoSingleton<NewMovement>.Instance; public static int PlayersAlive() { int amount = ((!nm.dead) ? 1 : 0); Networking.EachPlayer(delegate(RemotePlayer p) { amount += ((p.Health != 0) ? 1 : 0); }); return amount; } public static void SyncPattern(ArenaPattern pattern) { Networking.Send(PacketType.CyberGrindAction, delegate(Writer w) { w.Int(grid.currentWave); w.String(pattern.heights); w.String(pattern.prefabs); }, null, 4096); } public static void LoadPattern(Reader r) { //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_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Expected O, but got Unknown CurrentWave = r.Int(); ((Component)((Component)grid.waveNumberText).transform.parent.parent).gameObject.SetActive(true); CurrentPattern = new ArenaPattern { heights = r.String(), prefabs = r.String() }; LoadPattern(CurrentPattern); } public static void LoadPattern(ArenaPattern pattern) { Tools.Invoke<EndlessGrid>("NextWave", grid, Array.Empty<object>()); Collider component = ((Component)grid).GetComponent<Collider>(); if (component.enabled) { component.enabled = false; ((Component)Tools.ObjFind("Everything").transform.Find("Timer")).gameObject.SetActive(true); return; } CrowdReactions instance = MonoSingleton<CrowdReactions>.Instance; instance.React(instance.cheerLong); if (nm.hp > 0) { MonoSingleton<WeaponCharges>.Instance.MaxCharges(); nm.ResetHardDamage(); nm.exploded = false; nm.GetHealth(999, true, false); nm.FullStamina(); } else { MonoSingleton<Movement>.Instance.CyberRespawn(); } } } public class Movement : MonoSingleton<Movement> { private readonly int mask = LayerMask.op_Implicit(LayerMaskDefaults.Get((LMD)1)); private readonly float[] emojiLength = new float[12] { 2.458f, 4.708f, 1.833f, 2.875f, 0f, 9.083f, -1f, 11.022f, -1f, 3.292f, 0f, -1f }; public GameObject EmojiPreview; public float EmojiStart; public float HoldTime; public byte Emoji = byte.MaxValue; public byte Rps; public float SkateboardSpeed; public bool SlowsDown; public GameObject FallParticle; private readonly Vector3 start = new Vector3(0f, 6f, 0f); private readonly Vector3 end = new Vector3(0f, 0.1f, 0f); private Vector3 position; private Vector2 rotation; private int targetPlayer; public Jaket.UI.Elements.Pointer Pointer; public Spray Spray; private static NewMovement nm => MonoSingleton<NewMovement>.Instance; private static FistControl fc => MonoSingleton<FistControl>.Instance; private static GunControl gc => MonoSingleton<GunControl>.Instance; private static CameraController cc => MonoSingleton<CameraController>.Instance; private static PlayerInput pi => MonoSingleton<InputManager>.Instance.InputSource; private static CheatsManager cm => MonoSingleton<CheatsManager>.Instance; private static bool fakeDeath { get { if (!nm.endlessMode) { return Tools.Scene == "Level 0-S"; } return true; } } public static void Load() { Tools.Create<Movement>("Movement", (Transform)null); Events.OnLoaded += (Action)delegate { MonoSingleton<Movement>.Instance.StartEmoji(byte.MaxValue, updateState: false); if (Tools.Scene == "Level 0-S") { nm.modNoJump = LobbyController.Online; ((Component)MonoSingleton<HookArm>.Instance).gameObject.SetActive(LobbyController.Offline); } if (fakeDeath) { ((Selectable)((Component)((Component)MonoSingleton<CanvasController>.Instance).transform.Find("PauseMenu/Restart Mission")).GetComponent<Button>()).interactable = LobbyController.Offline || LobbyController.IsOwner; ((Behaviour)((Component)nm.youDiedText).GetComponents<MonoBehaviour>()[1]).enabled = false; } }; ((MonoBehaviour)MonoSingleton<Movement>.Instance).InvokeRepeating("GridUpdate", 0f, 1f); } private void Update() { //IL_0018: 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_005a: 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_0086: 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_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_010e: 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_018b: Unknown result type (might be due to invalid IL or missing references) //IL_026b: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_0239: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_033e: Unknown result type (might be due to invalid IL or missing references) //IL_0343: Unknown result type (might be due to invalid IL or missing references) //IL_030a: Unknown result type (might be due to invalid IL or missing references) //IL_030f: Unknown result type (might be due to invalid IL or missing references) if (Tools.Scene == "Main Menu") { return; } if (Input.GetKeyDown(Settings.ScrollUp)) { MonoSingleton<Chat>.Instance.ScrollMessages(up: true); } if (Input.GetKeyDown(Settings.ScrollDown)) { MonoSingleton<Chat>.Instance.ScrollMessages(up: false); } if (Jaket.UI.UI.Focused || MonoSingleton<Settings>.Instance.Rebinding) { return; } if (Input.GetKeyDown(Settings.Chat)) { MonoSingleton<Chat>.Instance.Toggle(); } if (Input.GetKeyDown(Settings.LobbyTab)) { MonoSingleton<LobbyTab>.Instance.Toggle(); } if (Input.GetKeyDown(Settings.PlayerList)) { MonoSingleton<PlayerList>.Instance.Toggle(); } if (Input.GetKeyDown(Settings.Settingz)) { MonoSingleton<Settings>.Instance.Toggle(); } if (Input.GetKeyDown((KeyCode)285)) { MonoSingleton<Debugging>.Instance.Toggle(); } if (Input.GetKeyDown((KeyCode)99) && CanvasSingleton<Debugging>.Shown) { MonoSingleton<Debugging>.Instance.Clear(); } if (Input.GetKeyDown(Settings.PlayerIndicators)) { MonoSingleton<PlayerIndicators>.Instance.Toggle(); } if (Input.GetKeyDown(Settings.PlayerInfo)) { MonoSingleton<PlayerInfo>.Instance.Toggle(); } if (Input.GetKey(Settings.EmojiWheel) && !CanvasSingleton<LobbyList>.Shown && !((Component)MonoSingleton<WeaponWheel>.Instance).gameObject.activeSelf) { HoldTime += Time.deltaTime; if (!CanvasSingleton<EmojiWheel>.Shown && HoldTime > 0.25f) { MonoSingleton<EmojiWheel>.Instance.Show(); } } else { HoldTime = 0f; if (CanvasSingleton<EmojiWheel>.Shown) { MonoSingleton<EmojiWheel>.Instance.Hide(); } } bool keyDown = Input.GetKeyDown(Settings.Pointer); bool keyDown2 = Input.GetKeyDown(Settings.Spray); RaycastHit hit = default(RaycastHit); if ((keyDown || keyDown2) && Physics.Raycast(((Component)cc).transform.position, ((Component)cc).transform.forward, ref hit, float.MaxValue, mask)) { if (keyDown) { if ((Object)(object)Pointer != (Object)null) { Pointer.Lifetime = 4.5f; } Pointer = Jaket.UI.Elements.Pointer.Spawn(Networking.LocalPlayer.Team, ((RaycastHit)(ref hit)).point, ((RaycastHit)(ref hit)).normal); } if (keyDown2) { Spray = SprayManager.Spawn(((RaycastHit)(ref hit)).point, ((RaycastHit)(ref hit)).normal); } if (LobbyController.Online) { Networking.Send(keyDown ? PacketType.Point : PacketType.Spray, delegate(Writer w) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) w.Id(Tools.AccId); w.Vector(((RaycastHit)(ref hit)).point); w.Vector(((RaycastHit)(ref hit)).normal); }, null, 32); } } if (Input.GetKeyDown(Settings.SelfDestruction) && !Jaket.UI.UI.AnyDialog) { nm.GetHurt(4200, false, 0f, false, false, 0.35f, false); } if (Input.GetKeyDown((KeyCode)292)) { MonoSingleton<InteractiveGuide>.Instance.Launch(); } if (pi.Fire1.WasPerformedThisFrame) { targetPlayer--; } if (pi.Fire2.WasPerformedThisFrame) { targetPlayer++; } Lobby valueOrDefault; if (targetPlayer < 0) { int num; if (!LobbyController.Lobby.HasValue) { num = 0; } else { valueOrDefault = LobbyController.Lobby.GetValueOrDefault(); num = ((Lobby)(ref valueOrDefault)).MemberCount - 1; } targetPlayer = num; } int num2 = targetPlayer; int? obj; if (!LobbyController.Lobby.HasValue) { obj = null; } else { valueOrDefault = LobbyController.Lobby.GetValueOrDefault(); obj = ((Lobby)(ref valueOrDefault)).MemberCount; } if (num2 >= obj) { targetPlayer = 0; } } private void LateUpdate() { //IL_02f7: Unknown result type (might be due to invalid IL or missing references) //IL_0306: Unknown result type (might be due to invalid IL or missing references) //IL_0315: Unknown result type (might be due to invalid IL or missing references) //IL_031f: Unknown result type (might be due to invalid IL or missing references) //IL_0324: Unknown result type (might be due to invalid IL or missing references) //IL_0329: Unknown result type (might be due to invalid IL or missing references) //IL_03e8: Unknown result type (might be due to invalid IL or missing references) //IL_03ed: Unknown result type (might be due to invalid IL or missing references) //IL_03f2: Unknown result type (might be due to invalid IL or missing references) //IL_0419: Unknown result type (might be due to invalid IL or missing references) //IL_03b4: Unknown result type (might be due to invalid IL or missing references) //IL_03b9: Unknown result type (might be due to invalid IL or missing references) //IL_045f: 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_0200: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_0212: Unknown result type (might be due to invalid IL or missing references) //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_0239: Unknown result type (might be due to invalid IL or missing references) //IL_0243: 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_025b: Unknown result type (might be due to invalid IL or missing references) //IL_0266: Unknown result type (might be due to invalid IL or missing references) //IL_0270: Unknown result type (might be due to invalid IL or missing references) //IL_0275: 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_0296: Unknown result type (might be due to invalid IL or missing references) //IL_02a0: Unknown result type (might be due to invalid IL or missing references) //IL_02aa: 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_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_0471: Unknown result type (might be due to invalid IL or missing references) //IL_0469: Unknown result type (might be due to invalid IL or missing references) //IL_0400: Unknown result type (might be due to invalid IL or missing references) //IL_0405: Unknown result type (might be due to invalid IL or missing references) //IL_040f: Unknown result type (might be due to invalid IL or missing references) //IL_0414: Unknown result type (might be due to invalid IL or missing references) //IL_0481: Unknown result type (might be due to invalid IL or missing references) //IL_0486: Unknown result type (might be due to invalid IL or missing references) //IL_048c: Unknown result type (might be due to invalid IL or missing references) //IL_048e: Unknown result type (might be due to invalid IL or missing references) //IL_0493: Unknown result type (might be due to invalid IL or missing references) //IL_049e: Unknown result type (might be due to invalid IL or missing references) //IL_049f: Unknown result type (might be due to invalid IL or missing references) //IL_04b5: Unknown result type (might be due to invalid IL or missing references) //IL_04b6: Unknown result type (might be due to invalid IL or missing references) //IL_04cc: Unknown result type (might be due to invalid IL or missing references) //IL_04d2: Unknown result type (might be due to invalid IL or missing references) //IL_04d9: Unknown result type (might be due to invalid IL or missing references) //IL_04de: Unknown result type (might be due to invalid IL or missing references) //IL_04df: Unknown result type (might be due to invalid IL or missing references) //IL_0501: Unknown result type (might be due to invalid IL or missing references) //IL_050d: Unknown result type (might be due to invalid IL or missing references) //IL_0512: Unknown result type (might be due to invalid IL or missing references) //IL_0517: Unknown result type (might be due to invalid IL or missing references) //IL_065f: Unknown result type (might be due to invalid IL or missing references) //IL_0691: Unknown result type (might be due to invalid IL or missing references) //IL_0696: Unknown result type (might be due to invalid IL or missing references) //IL_06a4: Unknown result type (might be due to invalid IL or missing references) //IL_06bf: Unknown result type (might be due to invalid IL or missing references) //IL_06da: Unknown result type (might be due to invalid IL or missing references) //IL_06df: Unknown result type (might be due to invalid IL or missing references) //IL_06ed: Unknown result type (might be due to invalid IL or missing references) //IL_0702: Unknown result type (might be due to invalid IL or missing references) ((Component)MonoSingleton<Skateboard>.Instance).gameObject.SetActive(Emoji == 11); Transform player; if (Emoji == 11 && !Jaket.UI.UI.AnyDialog) { SkateboardSpeed = Mathf.MoveTowards(SkateboardSpeed, 20f, (SlowsDown ? 28f : 12f) * Time.deltaTime); nm.boostCharge = Mathf.MoveTowards(nm.boostCharge, 300f, 70f * Time.deltaTime); if (pi.Dodge.WasPerformedThisFrame) { if (nm.boostCharge >= 100f || (MonoSingleton<AssistController>.Instance.majorEnabled && MonoSingleton<AssistController>.Instance.infiniteStamina)) { SkateboardSpeed += 20f; NewMovement obj = nm; obj.boostCharge -= 100f; if (nm.boostCharge < 0f) { nm.boostCharge = 0f; } Object.Instantiate<GameObject>(nm.dodgeParticle, ((Component)nm).transform.position, ((Component)nm).transform.rotation); AudioSource.PlayClipAtPoint(nm.dodgeSound, ((Component)nm).transform.position); } else { Object.Instantiate<GameObject>(nm.staminaFailSound); } } if (SkateboardSpeed >= 70f && !SlowsDown) { SlowsDown = true; FallParticle = Object.Instantiate<GameObject>(nm.fallParticle, ((Component)nm).transform); } if (SkateboardSpeed <= 40f && SlowsDown) { SlowsDown = false; Object.Destroy((Object)(object)FallParticle); } player = ((Component)nm).transform; Rigidbody rb = nm.rb; Vector3 velocity = player.forward * SkateboardSpeed; velocity.y = nm.rb.velocity.y; rb.velocity = velocity; Check(player.position + player.forward * 1.2f); Check(player.position - player.forward * 1.2f); player.Rotate(Vector3.up * pi.Move.ReadValue<Vector2>().x * 120f * Time.deltaTime); } Transform transform; Vector3 val2; if (Emoji != byte.MaxValue || (LobbyController.Online && nm.dead && fakeDeath)) { if (!Jaket.UI.UI.AnyDialog) { rotation += pi.Look.ReadValue<Vector2>() * MonoSingleton<OptionsManager>.Instance.mouseSensitivity / 10f; rotation.y = Mathf.Clamp(rotation.y, 5f, 170f); if (Input.GetKey((KeyCode)32)) { StartEmoji(byte.MaxValue); } } nm.rb.useGravity = true; transform = ((Component)cc.cam).transform; if (nm.dead) { Dictionary<uint, Entity> entities = Networking.Entities; Friend? val = LobbyController.At(targetPlayer); int key; if (!val.HasValue) { key = 0; } else { Friend valueOrDefault = val.GetValueOrDefault(); key = (int)((SteamId)(ref valueOrDefault.Id)).AccountId; } if (entities.TryGetValue((uint)key, out var value) && (Object)(object)value != (Object)(object)Networking.LocalPlayer) { val2 = ((Component)value).transform.position + Vector3.up * 2.5f; goto IL_0419; } } val2 = ((Component)nm).transform.position + Vector3.up; goto IL_0419; } goto IL_0521; IL_0419: Vector3 val3 = val2; bool flag = !nm.dead && Time.time - EmojiStart > emojiLength[Emoji] && emojiLength[Emoji] != -1f; position = Vector3.MoveTowards(position, flag ? end : start, 12f * Time.deltaTime); transform.position = val3 + position; transform.RotateAround(val3, Vector3.left, rotation.y); transform.RotateAround(val3, Vector3.up, rotation.x); transform.LookAt(val3); RaycastHit val4 = default(RaycastHit); if (Physics.SphereCast(val3, 0.25f, transform.position - val3, ref val4, ((Vector3)(ref position)).magnitude, mask)) { transform.position = ((RaycastHit)(ref val4)).point + 0.5f * ((RaycastHit)(ref val4)).normal; } goto IL_0521; IL_0521: if (Tools.Scene != "Main Menu" && !nm.dead) { nm.rb.constraints = (RigidbodyConstraints)(Jaket.UI.UI.AnyDialog ? 126 : ((MonoSingleton<Movement>.Instance.Emoji == byte.MaxValue || MonoSingleton<Movement>.Instance.Emoji == 11) ? 112 : 122)); } if (!LobbyController.Offline) { if (Settings.DisableFreezeFrames || Jaket.UI.UI.AnyDialog) { Time.timeScale = 1f; } if (MonoSingleton<CheatsController>.Instance.cheatsEnabled && !LobbyController.IsOwner && !LobbyController.CheatsAllowed) { MonoSingleton<CheatsController>.Instance.cheatsEnabled = false; ((Component)((Component)cm).transform.GetChild(0).GetChild(0)).gameObject.SetActive(false); CollectionExtensions.Do<ICheat>((IEnumerable<ICheat>)(Tools.Get<CheatsManager>("idToCheat", cm) as Dictionary<string, ICheat>).Values, (Action<ICheat>)cm.DisableCheat); Bundle.Hud("lobby.cheats"); } if (Plugin.Instance.HasIncompatibility && !LobbyController.IsOwner && !LobbyController.ModsAllowed) { LobbyController.LeaveLobby(); Bundle.Hud2NS("lobby.mods"); } if (nm.dead && ((Graphic)nm.blackScreen).color.a < 0.4f && fakeDeath) { Image blackScreen = nm.blackScreen; Color color = ((Graphic)nm.blackScreen).color; color.a = ((Graphic)nm.blackScreen).color.a + 0.75f * Time.deltaTime; ((Graphic)blackScreen).color = color; Text youDiedText = nm.youDiedText; color = ((Graphic)nm.youDiedText).color; color.a = ((Graphic)nm.blackScreen).color.a * 1.25f; ((Graphic)youDiedText).color = color; } } void Check(Vector3 pos) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) RaycastHit val5 = default(RaycastHit); if (Physics.Raycast(pos, Vector3.down, ref val5, 1.5f, mask) && ((RaycastHit)(ref val5)).distance > 0.8f) { Transform obj2 = player; Vector3 val6 = player.position; val6.y = ((RaycastHit)(ref val5)).point.y + 1.5f; obj2.position = val6; } } } private void GridUpdate() { if (LobbyController.Offline || !fakeDeath) { return; } int num = CyberGrind.PlayersAlive(); nm.youDiedText.text = Bundle.Format("spect", num.ToString(), Object.op_Implicit((Object)(object)MonoSingleton<EndlessGrid>.Instance) ? "#spect.cg" : "#spect.0s"); if (num > 0) { return; } if (Tools.Scene == "Level 0-S") { MonoSingleton<StatsManager>.Instance.Restart(); return; } FinalCyberRank componentInChildren = ((Component)nm).GetComponentInChildren<FinalCyberRank>(); if (componentInChildren.savedTime == 0f) { componentInChildren.GameOver(); Object.Destroy((Object)(object)((Component)nm.blackScreen).gameObject); } } public void OnDied() { StartEmoji(byte.MaxValue); if (LobbyController.Online && fakeDeath) { Events.Post(delegate { StartThirdPerson(); nm.endlessMode = true; ((Component)nm.blackScreen).gameObject.SetActive(true); ((Component)((Component)nm.blackScreen).transform.Find("LaughingSkull")).gameObject.SetActive(false); nm.screenHud.SetActive(false); }); } } public void Teleport(Vector3 position) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) UpdateState(); ((Component)nm).transform.position = position; nm.rb.velocity = Vector3.zero; PlayerActivatorRelay instance = MonoSingleton<PlayerActivatorRelay>.Instance; if (instance != null) { instance.Activate(); } if (GameStateManager.Instance.IsStateActive("pit-falling")) { GameStateManager.Instance.PopState("pit-falling"); } GameObject obj = Tools.ObjFind("Hellmap"); if (obj != null) { obj.SetActive(false); } } public void Respawn(Vector3 position, float rotation) { //IL_0001: 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_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) Teleport(position); if ((int)MonoSingleton<PlayerTracker>.Instance.playerType == 0) { cc.ResetCamera(rotation, 0f); } else { MonoSingleton<PlatformerMovement>.Instance.ResetCamera(rotation, 0f); } nm.Respawn(); nm.GetHealth(0, true, false); cc.StopShake(); nm.ActivatePlayer(); if (Object.op_Implicit((Object)(object)World.TunnelRoomba)) { Transform transform = ((Component)nm).transform; Vector3 val = World.TunnelRoomba.position; val.y = -112.5f; transform.position = val; } if (Object.op_Implicit((Object)(object)World.SecuritySystem[0])) { ((Component)nm).transform.position = new Vector3(0f, 472f, 745f); } if (Object.op_Implicit((Object)(object)World.Brain) && World.Brain.IsFightActive) { ((Component)nm).transform.position = new Vector3(0f, 826.5f, 610f); } } public void CyberRespawn() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) Respawn(new Vector3(0f, 80f, 62.5f), 0f); MonoSingleton<Teleporter>.Instance.Flash(); } public static void UpdateState() { bool anyDialog = Jaket.UI.UI.AnyDialog; bool anyMovementBlocking = Jaket.UI.UI.AnyMovementBlocking; ToggleCursor(anyDialog); ToggleHud(MonoSingleton<Movement>.Instance.Emoji == byte.MaxValue); if (!nm.dead) { NewMovement obj = nm; bool activated = (fc.activated = (gc.activated = !anyMovementBlocking)); obj.activated = activated; cc.activated = !anyMovementBlocking && !CanvasSingleton<EmojiWheel>.Shown; if (anyMovementBlocking) { fc.NoFist(); } else { fc.YesFist(); } MonoSingleton<OptionsManager>.Instance.frozen = MonoSingleton<Movement>.Instance.Emoji != byte.MaxValue || CanvasSingleton<InteractiveGuide>.Shown; ((Behaviour)MonoSingleton<Console>.Instance).enabled = MonoSingleton<Movement>.Instance.Emoji == byte.MaxValue; } } private static void ToggleCursor(bool enable) { Cursor.visible = enable; Cursor.lockState = (CursorLockMode)((!enable) ? 1 : 0); } private static void ToggleHud(bool enable) { ((Component)((Component)MonoSingleton<StyleHUD>.Instance).transform.parent).gameObject.SetActive(enable); ((Component)fc).gameObject.SetActive(enable); ((Component)gc).gameObject.SetActive(enable); } public void StartThirdPerson() { //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_002b: Unknown result type (might be due to invalid IL or missing references) rotation = new Vector2(cc.rotationY, cc.rotationX + 90f); position = default(Vector3); targetPlayer = LobbyController.IndexOfLocal(); } public void StartEmoji(byte id, bool updateState = true) { //IL_0096: Unknown result type (might be due to invalid IL or missing references) EmojiStart = Time.time; Emoji = id; if (updateState) { UpdateState(); } Object.Destroy((Object)(object)EmojiPreview); Object.Destroy((Object)(object)FallParticle); if (id != byte.MaxValue) { EmojiPreview = ((Component)Doll.Spawn(((Component)nm).transform, Networking.LocalPlayer.Team, id, Rps)).gameObject; nm.playerCollider.height = 3.5f; ((Component)nm.gc).transform.localPosition = new Vector3(0f, -1.256f, 0f); StartThirdPerson(); SkateboardSpeed = 0f; Bundle.Hud("emoji", silent: true); ((MonoBehaviour)this).StopCoroutine("ClearEmoji"); if (emojiLength[id] != -1f) { ((MonoBehaviour)this).StartCoroutine("ClearEmoji"); } } } public IEnumerator ClearEmoji() { yield return (object)new WaitForSeconds(emojiLength[Emoji] + 0.5f); if (Emoji == 3) { if (LobbyController.Lobby.HasValue) { Lobby valueOrDefault = LobbyController.Lobby.GetValueOrDefault(); ((Lobby)(ref valueOrDefault)).SendChatString("#/r" + Rps); } } StartEmoji(byte.MaxValue); } } public class World { public static List<WorldAction> Actions = new List<WorldAction>(); public static List<byte> Activated = new List<byte>(); public static List<HookPoint> HookPoints = new List<HookPoint>(); public static HookPoint LastSyncedPoint; public static List<TramControl> Trams = new List<TramControl>(); public static Transform TunnelRoomba; public static Hand Hand; public static Leviathan Leviathan; public static Minotaur Minotaur; public static SecuritySystem[] SecuritySystem = new SecuritySystem[7]; public static Brain Brain; public static void Load() { Events.OnLoadingStarted += (Action)delegate { if (LobbyController.Online && LobbyController.IsOwner && Tools.Pending != "Main Menu") { Activated.Clear(); Networking.Send(PacketType.Level, WriteData, null, 256); } }; Events.OnLoaded += (Action)delegate { if (LobbyController.Online) { Restore(); } }; Events.OnLobbyEntered += new Action(Restore); Events.EveryDozen += new Action(Optimize); } public static void WriteData(Writer w) { w.String(Tools.Pending ?? Tools.Scene); w.String("1.3.42"); w.Byte((byte)MonoSingleton<PrefsManager>.Instance.GetInt("difficulty", 0)); w.Bytes(Activated.ToArray()); } public static void ReadData(Reader r) { Tools.Load(r.String()); if (r.String() != "1.3.42") { Version.Notify(); return; } MonoSingleton<PrefsManager>.Instance.SetInt("difficulty", (int)r.Byte()); Activated.Clear(); Activated.AddRange(r.Bytes(r.Length - r.Position)); } public static void EachStatic(Action<StaticAction> cons) { Actions.ForEach(delegate(WorldAction action) { if (action is StaticAction obj) { cons(obj); } }); } public static void EachNet(Action<NetAction> cons) { Actions.ForEach(delegate(WorldAction action) { if (action is NetAction obj) { cons(obj); } }); } public static void Restore() { //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) Events.Post(delegate { EachStatic(delegate(StaticAction sa) { sa.Run(); }); Activated.ForEach(delegate(byte index) { Actions[index].Run(); }); }); ActivateArena[] array = Tools.ResFind<ActivateArena>(); for (int i = 0; i < array.Length; i++) { ((Component)array[i]).gameObject.layer = 16; } PlayerActivator val = Tools.ObjFind<PlayerActivator>(); if (Object.op_Implicit((Object)(object)val)) { Transform transform = ((Component)val).transform; transform.position += Vector3.up * 6f; } Find<TramControl>(Trams); Find<HookPoint>(HookPoints); HookPoints.ForEach(delegate(HookPoint p) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Expected O, but got Unknown p.onHook.onActivate.AddListener((UnityAction)delegate { Sync(p, hooked: true); }); p.onUnhook.onActivate.AddListener((UnityAction)delegate { Sync(p, hooked: false); }); }); static void Find<T>(List<T> list) where T : Component { list.Clear(); Tools.ResFind<T>((Predicate<T>)Tools.IsReal, (Action<T>)list.Add); list.Sort(delegate(T t1, T t2) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) Vector3 position = ((Component)t1).transform.position; float sqrMagnitude = ((Vector3)(ref position)).sqrMagnitude; position = ((Component)t2).transform.position; return sqrMagnitude.CompareTo(((Vector3)(ref position)).sqrMagnitude); }); } static void Sync(HookPoint point, bool hooked) { //IL_0032: Unknown result type (might be due to invalid IL or missing references) byte b = (byte)HookPoints.IndexOf(point); if (b != byte.MaxValue && (Object)(object)point != (Object)(object)LastSyncedPoint && Tools.Within(((Component)point).transform, MonoSingleton<HookArm>.Instance.hook.position, 9f)) { SyncAction(b, hooked); } } } public static void Optimize() { bool cg; if (!LobbyController.Offline) { cg = Tools.Scene == "Endless"; Tools.ResFind<GoreZone>((Predicate<GoreZone>)((GoreZone zone) => Tools.IsReal((Component)(object)zone) && ((Behaviour)zone).isActiveAndEnabled && FarEnough(((Component)zone).transform)), (Action<GoreZone>)delegate(GoreZone zone) { zone.ResetGibs(); }); CollectionExtensions.DoIf<Entity>((IEnumerable<Entity>)Networking.Entities.Values, (Func<Entity, bool>)((Entity entity) => Object.op_Implicit((Object)(object)entity) && entity.Dead && entity is Enemy && entity.Type != EntityType.MaliciousFace && entity.Type != EntityType.Gutterman && entity.LastUpdate < Time.time - 1f && FarEnough(((Component)entity).transform)), (Action<Entity>)delegate(Entity entity) { ((Component)entity).gameObject.SetActive(false); }); } bool FarEnough(Transform t) { return !Tools.Within(t, ((Component)MonoSingleton<NewMovement>.Instance).transform, 100f) || cg; } } public static void ReadAction(Reader r) { //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Invalid comparison between Unknown and I4 //IL_021d: Unknown result type (might be due to invalid IL or missing references) switch (r.Byte()) { case 0: { byte b3 = r.Byte(); if (Actions[b3] is NetAction netAction) { Log.Debug("[World] Read the activation of the object " + netAction.Name + " in " + netAction.Level); Activated.Add(b3); netAction.Run(); } break; } case 1: { byte b2 = r.Byte(); bool flag = r.Bool(); Log.Debug($"[World] Read the new state of point#{b2}: {flag}"); LastSyncedPoint = HookPoints[b2]; if (flag) { LastSyncedPoint.Hooked(); break; } LastSyncedPoint.Unhooked(); if ((int)LastSyncedPoint.type == 2) { LastSyncedPoint.SwitchPulled(); } break; } case 2: { byte b = r.Byte(); int num = r.Int(); Log.Debug($"[World] Read the new speed of tram#{b}: {num}"); Trams[b].currentSpeedStep = num; break; } case 3: Find<FinalDoor>(r.Vector(), delegate(FinalDoor d) { ((Component)((Component)d).transform.Find("FinalDoorOpener")).gameObject.SetActive(true); }); break; case 4: Find<Door>(r.Vector(), delegate(Door d) { d.Open(false, false); }); break; case 7: Find<Flammable>(r.Vector(), delegate(Flammable d) { d.Burn(4.01f, false); }); break; case 5: Find<StatueActivator>(r.Vector(), delegate(StatueActivator d) { ((Component)d).gameObject.SetActive(true); ((Component)((Component)d).transform.parent).gameObject.SetActive(true); }); break; case 6: Networking.EachEntity((Entity entity) => entity.Type == EntityType.Puppet, delegate(Entity entity) { entity.EnemyId.InstaKill(); }); Find<BloodFiller>(r.Vector(), delegate(BloodFiller f) { f.InstaFill(); }); break; } static void Find<T>(Vector3 pos, Action<T> cons) where T : Component { //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) Tools.ResFind<T>((Predicate<T>)((T t) => ((Component)t).transform.position == pos), cons); } } public static void SyncAction(GameObject obj) { EachNet(delegate(NetAction na) { //IL_0019: Unknown result type (might be due to invalid IL or missing references) if (Tools.Within(obj, na.Position) && !(((Object)obj).name != na.Name)) { byte index = (byte)Actions.IndexOf(na); if (!Activated.Contains(index)) { Networking.Send(PacketType.ActivateObject, delegate(Writer w) { Activated.Add(index); w.Byte(0); w.Byte(index); Log.Debug("[World] Sent the activation of the object " + na.Name + " in " + na.Level); }, null, 2); } } }); } public static void SyncAction(byte index, bool hooked) { Networking.Send(PacketType.ActivateObject, delegate(Writer w) { w.Byte(1); w.Byte(index); w.Bool(hooked); Log.Debug($"[World] Sent the new state of point#{index}: {hooked}"); }, null, 3); } public static void SyncTram(TramControl tram) { if (LobbyController.Offline || Tools.Scene == "Level 7-1") { return; } byte index = (byte)Trams.IndexOf(tram); if (index != byte.MaxValue) { Networking.Send(PacketType.ActivateObject, delegate(Writer w) { w.Byte(2); w.Byte(index); w.Int(tram.currentSpeedStep); Log.Debug($"[World] Sent the new speed of tram#{index} {tram.currentSpeedStep}"); }, null, 6); } } public static void SyncAction(Component t, byte type) { Networking.Send(PacketType.ActivateObject, delegate(Writer w) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) w.Byte(type); w.Vector(t.transform.position); }, null, 13); } } public class WorldActionsList { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static Action<GameObject> <>9__1_0; public static Action<Transform> <>9__1_1; public static Action<GameObject> <>9__1_2; public static Action<GameObject> <>9__1_3; public static Action<GameObject> <>9__1_4; public static Action<HurtZone> <>9__1_55; public static Action<GameObject> <>9__1_5; public static Action<Transform> <>9__1_6; public static Action<GameObject> <>9__1_7; public static Action<GameObject> <>9__1_8; public static UnityAction <>9__1_56; public static Action<GameObject> <>9__1_9; public static Action<Transform> <>9__1_10; public static Action<Transform> <>9__1_11; public static Action<Transform> <>9__1_12; public static Predicate<Entity> <>9__1_58; public static Action<Entity> <>9__1_59; public static UnityAction <>9__1_57; public static Action<GameObject> <>9__1_13; public static Predicate<Entity> <>9__1_60; public static Action<Entity> <>9__1_61; public static Action<Transform> <>9__1_14; public static Action<Transform> <>9__1_15; public static Action<GameObject> <>9__1_16; public static Action<GameObject> <>9__1_17; public static Action<GameObject> <>9__1_18; public static Action<GameObject> <>9__1_19; public static Action<GameObject> <>9__1_63; public static Action<Transform> <>9__1_20; public static Action<GameObject> <>9__1_21; public static Action<GameObject> <>9__1_22; public static Action<GameObject> <>9__1_23; public static Action<GameObject> <>9__1_24; public static Action<Transform> <>9__1_25; public static Action<RectTransform> <>9__1_26; public static Action<GameObject> <>9__1_27; public static Action<GameObject> <>9__1_29; public static Action<GameObject> <>9__1_30; public static Action<GameObject> <>9__1_31; public static Action<GameObject> <>9__1_32; public static Action<GameObject> <>9__1_33; public static Action<GameObject> <>9__1_34; public static Action<GameObject> <>9__1_35; public static Action<GameObject> <>9__1_36; public static Action<GameObject> <>9__1_37; public static Action<GameObject> <>9__1_38; public static UnityAction <>9__1_66; public static Action<GameObject> <>9__1_39; public static Action<GameObject> <>9__1_40; public static Action<Transform> <>9__1_41; public static Action<Transform> <>9__1_42; public static Action<Transform> <>9__1_43; public static Action<GameObject> <>9__1_44; public static Action<Transform> <>9__1_45; public static Action<GameObject> <>9__1_46; public static Action<Transform> <>9__1_47; public static Action<Transform> <>9__1_48; public static Action<Transform> <>9__1_49; public static Action<GameObject> <>9__1_50; public static Action<GameObject> <>9__1_51; public static Action<GameObject> <>9__1_52; public static Action<Transform> <>9__1_53; public static Action<Transform> <>9__1_54; internal void <Load>b__1_0(GameObject obj) { obj.GetComponent<ObjectActivator>().events.toDisActivateObjects = (GameObject[])(object)new GameObject[0]; } internal void <Load>b__1_1(Transform obj) { ((Component)obj.parent.parent).gameObject.SetActive(true); } internal void <Load>b__1_2(GameObject obj) { obj.GetComponent<ObjectActivator>().events.toDisActivateObjects[0] = null; } internal void <Load>b__1_3(GameObject obj) { ItemPlaceZone val = default(ItemPlaceZone); if (obj.TryGetComponent<ItemPlaceZone>(ref val)) { val.deactivateOnSuccess = (GameObject[])(object)new GameObject[1] { val.deactivateOnSuccess[0] }; } } internal void <Load>b__1_4(GameObject obj) { ItemPlaceZone val = default(ItemPlaceZone); if (obj.TryGetComponent<ItemPlaceZone>(ref val)) { val.deactivateOnSuccess = (GameObject[])(object)new GameObject[0]; } } internal void <Load>b__1_5(GameObject obj) { UIB.Component<HurtZone>(obj, (Action<HurtZone>)delegate(HurtZone zone) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) zone.bounceForce = 100f; zone.damageType = (EnviroDamageType)2; zone.setDamage = 20f; zone.trigger = true; }); } internal void <Load>b__1_55(HurtZone zone) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) zone.bounceForce = 100f; zone.damageType = (EnviroDamageType)2; zone.setDamage = 20f; zone.trigger = true; } internal void <Load>b__1_6(Transform obj) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) if (MonoSingleton<NewMovement>.Instance.dead) { MonoSingleton<Movement>.Instance.Respawn(new Vector3(-60f, -8.5f, 30f), 180f); } } internal void <Load>b__1_7(GameObject obj) { obj.GetComponent<ObjectActivator>().events.toDisActivateObjects[0] = null; } internal void <Load>b__1_8(GameObject obj) { Tools.Destroy((Object)(object)obj.GetComponent<DoorController>()); } internal void <Load>b__1_9(GameObject obj) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Expected O, but got Unknown UnityEvent onActivate = obj.GetComponent<ObjectActivator>().events.onActivate; object obj2 = <>9__1_56; if (obj2 == null) { UnityAction val = delegate { //IL_000f: Unknown result type (might be due to invalid IL or missing references) Teleporter.Teleport(new Vector3(500f, 14f, 570f)); }; <>9__1_56 = val; obj2 = (object)val; } onActivate.AddListener((UnityAction)obj2); } internal void <Load>b__1_56() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) Teleporter.Teleport(new Vector3(500f, 14f, 570f)); } internal void <Load>b__1_10(Transform obj) { ((Component)obj.parent.Find("GlobalLights (2)/MetroWall (10)")).gameObject.SetActive(false); ((Component)obj.parent.Find("BossMusic")).gameObject.SetActive(false); } internal void <Load>b__1_11(Transform obj) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) Teleporter.Teleport(new Vector3(-5f, -159.5f, 970f)); } internal void <Load>b__1_12(Transform obj) { MonoSingleton<MusicManager>.Instance.StopMusic(); } internal void <Load>b__1_13(GameObject obj) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Expected O, but got Unknown UnityEvent onActivate = obj.GetComponent<ObjectActivator>().events.onActivate; object obj2 = <>9__1_57; if (obj2 == null) { UnityAction val = delegate { Networking.EachEntity((Entity e) => e.Type == EntityType.V2_GreenArm, delegate(Entity e) { ((Component)e).gameObject.SetActive(true); }); }; <>9__1_57 = val; obj2 = (object)val; } onActivate.AddListener((UnityAction)obj2); } internal void <Load>b__1_57() { Networking.EachEntity((Entity e) => e.Type == EntityType.V2_GreenArm, delegate(Entity e) { ((Component)e).gameObject.SetActive(true); }); } internal bool <Load>b__1_58(Entity e) { return e.Type == EntityType.V2_GreenArm; } internal void <Load>b__1_59(Entity e) { ((Component)e).gameObject.SetActive(true); } internal void <Load>b__1_14(Transform obj) { Networking.EachEntity((Entity e) => e.Type == EntityType.V2_GreenArm, delegate(Entity e) { ((Component)e).gameObject.SetActive(false); }); } internal bool <Load>b__1_60(Entity e) { return e.Type == EntityType.V2_GreenArm; } internal void <Load>b__1_61(Entity e) { ((Component)e).gameObject.SetActive(false); } internal void <Load>b__1_15(Transform obj) { GameObject gameObject = ((Component)Tools.ObjFind("TutorialMessage").transform.Find("DeactivateMessage")).gameObject; if (!gameObject.activeSelf) { gameObject.SetActive(true); Transform obj2 = obj.parent.Find("ExitBuilding"); ((Component)obj2).GetComponent<Door>().Close(false); ((Component)obj2.Find("GrapplePoint (2)")).gameObject.SetActive(true); } } internal void <Load>b__1_16(GameObject obj) { obj.GetComponent<ObjectActivator>().events.toDisActivateObjects[0] = null; } internal void <Load>b__1_17(GameObject obj) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Expected O, but got Unknown //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Expected O, but got Unknown <>c__DisplayClass1_0 CS$<>8__locals0 = new <>c__DisplayClass1_0 { obj = obj }; ImageFadeIn component = CS$<>8__locals0.obj.GetComponent<ImageFadeIn>(); if ((Object)(object)component == (Object)null) { return; } component.onFull = new UnityEvent(); component.onFull.AddListener((UnityAction)delegate { Tools.Destroy((Object)(object)CS$<>8__locals0.obj); Tools.Destroy((Object)(object)Tools.ObjFind("Jakito Huge")); Transform transform = Tools.ObjFind("Sea").transform; ((Component)transform.Find("SeaAmbiance")).gameObject.SetActive(true); ((Component)transform.Find("SeaAmbiance (Waves)")).gameObject.SetActive(true); HudMessageReceiver instance = MonoSingleton<HudMessageReceiver>.Instance; if (instance != null) { instance.SendHudMessage("<size=48>Haha</size>", "", "", 0, true); } }); } internal void <Load>b__1_18(GameObject obj) { ItemPlaceZone val = default(ItemPlaceZone); if (obj.TryGetComponent<ItemPlaceZone>(ref val)) { val.activateOnSuccess = (GameObject[])(object)new GameObject[1] { val.activateOnSuccess[1] }; } } internal void <Load>b__1_19(GameObject obj) { ItemPlaceZone val = default(ItemPlaceZone); if (obj.TryGetComponent<ItemPlaceZone>(ref val)) { val.activateOnSuccess = (GameObject[])(object)new GameObject[1] { val.activateOnSuccess[1] }; } } internal void <Load>b__1_20(Transform obj) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) Scene scene = ((Component)obj).gameObject.scene; CollectionExtensions.Do<GameObject>((IEnumerable<GameObject>)((Scene)(ref scene)).GetRootGameObjects(), (Action<GameObject>)delegate(GameObject o) { if (((Object)o).name == "Underwater") { o.SetActive(false); } if (((Object)o).name == "Surface") { o.SetActive(true); } }); Teleporter.Teleport(new Vector3(641.25f, 691.5f, 522f)); } internal void <Load>b__1_63(GameObject o) { if (((Object)o).name == "Underwater") { o.SetActive(false); } if (((Object)o).name == "Surface") { o.SetActive(true); } } internal void <Load>b__1_21(GameObject obj) { obj.GetComponent<ObjectActivator>().events.toDisActivateObjects[0] = null; } internal void <Load>b__1_22(GameObject obj) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) obj.GetComponent<Door>().closedPos = new Vector3(0f, 13.3751f, -15f); } internal void <Load>b__1_23(GameObject obj) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) obj.transform.position = new Vector3(0f, 7.4f, 582.5f); } internal void <Load>b__1_24(GameObject obj) { if (!LobbyController.IsOwner) { obj.GetComponentInChildren<ItemPlaceZone>().deactivateOnSuccess = (GameObject[])(object)new GameObject[0]; } } internal void <Load>b__1_25(Transform obj) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) if (((Component)MonoSingleton<NewMovement>.Instance).transform.position.z < 470f) { Teleporter.Teleport(new Vector3(0f, 5.5f, 485f)); } } internal void <Load>b__1_26(RectTransform obj) { //IL_0043: Unknown result type (might be due to invalid IL or missing references) ((Component)((Transform)obj).parent.parent.parent.parent.parent.parent.parent.parent).gameObject.SetActive(true); Teleporter.Teleport(new Vector3(-242.5f, -112.5f, 314f)); } internal void <Load>b__1_27(GameObject obj) { obj.GetComponent<ObjectActivator>().events.toDisActivateObjects[2] = null; } internal void <Load>b__1_29(GameObject obj) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown <>c__DisplayClass1_1 CS$<>8__locals0 = new <>c__DisplayClass1_1 { door = obj.GetComponent<Door>() }; Door door = CS$<>8__locals0.door; if (door == null) { return; } door.onFullyOpened.AddListener((UnityAction)delegate { CS$<>8__locals0.door.onFullyOpened = null; HudMessageReceiver instance = MonoSingleton<HudMessageReceiver>.Instance; if (instance != null) { instance.SendHudMessage("<size=48>What?</size>", "", "", 0, true); } }); } internal void <Load>b__1_30(GameObject obj) { if (!(((Object)obj.transform.parent).name == "9 Nonstuff")) { for (int i = 1; i < obj.transform.childCount; i++) { Tools.Destroy((Object)(object)((Component)obj.transform.GetChild(i)).gameObject); } <Load>g__Fill|1_28($"MACHINE ID: V3#{Tools.AccId}\r\nLOCATION: TERMINAL\r\nCURRENT OBJECTIVE: FUN\r\n\r\nAUTHORIZATION... <color=#32CD32>DONE</color>\r\n\r\n> Hello?\r\n<color=#FF341C>UNKNOWN COMMAND</color>\r\n\r\n> Please let me in :3\r\nOPENING ALL DOORS... <color=#32CD32>DONE</color>", 64, (TextAnchor)0, obj.transform.Find("PuzzleScreen/Canvas")); } } internal void <Load>b__1_31(GameObject obj) { <Load>g__Fill|1_28("UwU", 256, (TextAnchor)4, obj.transform.Find("Canvas")); } internal void <Load>b__1_32(GameObject obj) { Tools.Destroy((Object)(object)obj.GetComponent<ObjectActivator>()); } internal void <Load>b__1_33(GameObject obj) { //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Expected O, but got Unknown //IL_006b: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Expected O, but got Unknown <>c__DisplayClass1_2 CS$<>8__locals0 = new <>c__DisplayClass1_2 { obj = obj }; ObjectActivator val; CS$<>8__locals0.obj.GetComponent<Door>().activatedRooms = (GameObject[])(object)new GameObject[1] { ((Component)(val = Tools.Create<ObjectActivator>("Trigger", CS$<>8__locals0.obj.transform))).gameObject }; ((Component)val).gameObject.SetActive(false); val.reactivateOnEnable = true; val.events = new UltrakillEvent { onActivate = new UnityEvent() }; val.events.onActivate.AddListener((UnityAction)delegate { Transform obj2 = CS$<>8__locals0.obj.transform.parent.Find("UsableScreen (1)/PuzzleScreen (1)/Canvas/UsableButtons/"); ((Component)obj2.Find("Button (Closed)")).gameObject.SetActive(false); ((Component)obj2.Find("Button (Open)")).gameObject.SetActive(true); }); val.events.toDisActivateObjects = (GameObject[])(object)new GameObject[1] { ((Component)val).gameObject }; } internal void <Load>b__1_34(GameObject obj) { if (!LobbyController.IsOwner) { CollectionExtensions.Do<MonoBehaviour>((IEnumerable<MonoBehaviour>)obj.GetComponents<MonoBehaviour>(), (Action<MonoBehaviour>)Tools.Destroy); } } internal void <Load>b__1_35(GameObject obj) { Tools.Destroy((Object)(object)((Component)obj.transform.Find("Altar (Torch) Variant/Cube")).gameObject); } internal void <Load>b__1_36(GameObject obj) { obj.GetComponent<Door>().Unlock(); } internal void <Load>b__1_37(GameObject obj) { obj.GetComponent<Door>().Unlock(); } internal void <Load>b__1_38(GameObject obj) { obj.GetComponent<Door>().Unlock(); } internal void <Load>b__1_39(GameObject obj) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Expected O, but got Unknown UnityEvent onActivate = obj.GetComponent<ObjectActivator>().events.onActivate; object obj2 = <>9__1_66; if (obj2 == null) { UnityAction val = delegate { //IL_000f: Unknown result type (might be due to invalid IL or missing references) Teleporter.Teleport(new Vector3(-189f, -33.5f, 483.75f)); }; <>9__1_66 = val; obj2 = (object)val; } onActivate.AddListener((UnityAction)obj2); } internal void <Load>b__1_66() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) Teleporter.Teleport(new Vector3(-189f, -33.5f, 483.75f)); } internal void <Load>b__1_40(GameObject obj) { Tools.Destroy((Object)(object)obj.GetComponent<Collider>()); } internal void <Load>b__1_41(Transform obj) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) Teleporter.Teleport(new Vector3(-131f, -14.5f, 483.75f)); } internal void <Load>b__1_42(Transform obj) { Tools.ObjFind("Outdoors Areas/6 - Interior Garden/NightSkyActivator").SetActive(true); } internal void <Load>b__1_43(Transform obj) { ((Component)((Component)obj).transform.parent).gameObject.SetActive(true); } internal void <Load>b__1_44(GameObject obj) { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown <>c__DisplayClass1_3 CS$<>8__locals0 = new <>c__DisplayClass1_3 { obj = obj }; ObjectActivator component = CS$<>8__locals0.obj.GetComponent<ObjectActivator>(); if (component == null) { return; } component.events.onActivate.AddListener((UnityAction)delegate { CombinedBossBar componentInChildren = ((Component)CS$<>8__locals0.obj.transform.parent).GetComponentInChildren<CombinedBossBar>(true); for (int i = 0; i < componentInChildren.enemies.Length; i++) { (World.SecuritySystem[i] = ((Component)componentInChildren.enemies[i]).gameObject.AddComponent<SecuritySystem>()).Type = (EntityType)(43 + i); } }); } internal void <Load>b__1_45(Transform obj) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) Teleporter.Teleport(new Vector3(0f, 472f, 745f), insideEarthmover: false); } internal void <Load>b__1_46(GameObject obj) { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown <>c__DisplayClass1_4 CS$<>8__locals0 = new <>c__DisplayClass1_4 { obj = obj }; ObjectActivator component = CS$<>8__locals0.obj.GetComponent<ObjectActivator>(); if (component == null) { return; } component.events.onActivate.AddListener((UnityAction)delegate { CollectionExtensions.Do<DestroyOnCheckpointRestart>((IEnumerable<DestroyOnCheckpointRestart>)((Component)CS$<>8__locals0.obj.transform.parent).GetComponentsInChildren<DestroyOnCheckpointRestart>(true), (Action<DestroyOnCheckpointRestart>)Tools.Destroy); if (Object.op_Implicit((Object)(object)World.Brain)) { World.Brain.IsFightActive = true; } }); } internal void <Load>b__1_47(Transform obj) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) Teleporter.Teleport(new Vector3(0f, 460f, 650f)); } internal void <Load>b__1_48(Transform obj) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) Teleporter.Teleport(new Vector3(0f, 826.5f, 610f)); } internal void <Load>b__1_49(Transform obj) { ((Component)((Component)obj).transform.parent).gameObject.SetActive(true); ((Component)((Component)obj).transform.parent.parent).gameObject.SetActive(true); } internal void <Load>b__1_50(GameObject obj) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) obj.transform.position = new Vector3(-40f, -10f, 102.5f); } internal void <Load>b__1_51(GameObject obj) { obj.GetComponent<ObjectActivator>().events.toActivateObjects[4] = null; } internal void <Load>b__1_52(GameObject obj) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Expected O, but got Unknown ObjectActivator component = obj.GetComponent<ObjectActivator>(); component.events.onActivate = new UnityEvent(); component.events.toActivateObjects[2] = null; component.events.toDisActivateObjects[1] = null; component.events.toDisActivateObjects[2] = null; } internal void <Load>b__1_53(Transform obj) { ((Component)((Component)obj).transform.parent.Find("Cube (2)")).gameObject.SetActive(false); Tools.ObjFind("Music 3").SetActive(false); ((Component)((Component)obj).transform.parent.Find("Lights")).gameObject.SetActive(false); MonoSingleton<StatsManager>.Instance.StopTimer(); } internal void <Load>b__1_54(Transform obj) { ((Component)((Component)obj).transform.parent.Find("Backwall")).gameObject.SetActive(false); Tools.ObjFind("BossMusics/Sisyphus").SetActive(false); Tools.ObjFind("IntroObjects/Decorations").SetActive(false); Tools.ObjFind("Rain").SetActive(false); MonoSingleton<StatsManager>.Instance.StopTimer(); } } [CompilerGenerated] private sealed class <>c__DisplayClass1_0 { public GameObject obj; internal void <Load>b__62() { Tools.Destroy((Object)(object)obj); Tools.Destroy((Object)(object)Tools.ObjFind("Jakito Huge")); Transform transform = Tools.ObjFind("Sea").transform; ((Component)transform.Find("SeaAmbiance")).gameObject.SetActive(true); ((Component)transform.Find("SeaAmbiance (Waves)")).gameObject.SetActive(true); HudMessageReceiver instance = MonoSingleton<HudMessageReceiver>.Instance; if (instance != null) { instance.SendHudMessage("<size=48>Haha</size>", "", "", 0, true); } } } [CompilerGenerated] private sealed class <>c__DisplayClass1_1 { public Door door; internal void <Load>b__64() { door.onFullyOpened = null; HudMessageReceiver instance = MonoSingleton<HudMessageReceiver>.Instance; if (instance != null) { instance.SendHudMessage("<size=48>What?</size>", "", "", 0, true); } } } [CompilerGenerated] private sealed class <>c__DisplayClass1_2 { public GameObject obj; internal void <Load>b__65() { Transform obj = this.obj.transform.parent.Find("UsableScreen (1)/PuzzleScreen (1)/Canvas/UsableButtons/"); ((Component)obj.Find("Button (Closed)")).gameObject.SetActive(false); ((Component)obj.Find("Button (Open)")).gameObject.SetActive(true); } } [CompilerGenerated] private sealed class <>c__DisplayClass1_3 { public GameObject obj; internal void <Load>b__67() { CombinedBossBar componentInChildren = ((Component)obj.transform.parent).GetComponentInChildren<CombinedBossBar>(true); for (int i = 0; i < componentInChildren.enemies.Length; i++) { (World.SecuritySystem[i] = ((Component)componentInChildren.enemies[i]).gameObject.AddComponent<SecuritySystem>()).Type = (EntityType)(43 + i); } } } [CompilerGenerated] private sealed class <>c__DisplayClass1_4 { public GameObject obj; internal void <Load>b__68() { CollectionExtensions.Do<DestroyOnCheckpointRestart>((IEnumerable<DestroyOnCheckpointRestart>)((Component)obj.transform.parent).GetComponentsInChildren<DestroyOnCheckpointRestart>(true), (Action<DestroyOnCheckpointRestart>)Tools.Destroy); if (Object.op_Implicit((Object)(object)World.Brain)) { World.Brain.IsFightActive = true; } } } public const string BASEMENT_TERMILA_TEXT = "MACHINE ID: V3#{0}\r\nLOCATION: TERMINAL\r\nCURRENT OBJECTIVE: FUN\r\n\r\nAUTHORIZATION... <color=#32CD32>DONE</color>\r\n\r\n> Hello?\r\n<color=#FF341C>UNKNOWN COMMAND</color>\r\n\r\n> Please let me in :3\r\nOPENING ALL DOORS... <color=#32CD32>DONE</color>"; public static void Load() { //IL_001a: 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_007c: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: 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_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_025c: Unknown result type (might be due to invalid IL or missing references) //IL_029a: Unknown result type (might be due to invalid IL or missing references) //IL_02b9: Unknown result type (might be due to invalid IL or missing references) //IL_02f6: Unknown result type (might be due to invalid IL or missing references) //IL_0339: Unknown result type (might be due to invalid IL or missing references) //IL_0359: Unknown result type (might be due to invalid IL or missing references) //IL_0379: Unknown result type (might be due to invalid IL or missing references) //IL_0398: Unknown result type (might be due to invalid IL or missing references) //IL_03bc: Unknown result type (might be due to invalid IL or missing references) //IL_03ff: Unknown result type (might be due to invalid IL or missing references) //IL_043c: Unknown result type (might be due to invalid IL or missing references) //IL_0461: Unknown result type (might be due to invalid IL or missing references) //IL_049f: Unknown result type (might be due to invalid IL or missing references) //IL_04be: Unknown result type (might be due to invalid IL or missing references) //IL_04dd: Unknown result type (might be due to invalid IL or missing references) //IL_0520: Unknown result type (might be due to invalid IL or missing references) //IL_0540: Unknown result type (might be due to invalid IL or missing references) //IL_055f: Unknown result type (might be due to invalid IL or missing references) //IL_0584: Unknown result type (might be due to invalid IL or missing references) //IL_05a2: Unknown result type (might be due to invalid IL or missing references) //IL_05df: Unknown result type (might be due to invalid IL or missing references) //IL_05fe: Unknown result type (might be due to invalid IL or missing references) //IL_061d: Unknown result type (might be due to invalid IL or missing references) //IL_063c: Unknown result type (might be due to invalid IL or missing references) //IL_065b: Unknown result type (might be due to invalid IL or missing references) //IL_067a: Unknown result type (might be due to invalid IL or missing references) //IL_0699: Unknown result type (might be due to invalid IL or missing references) //IL_06b8: Unknown result type (might be due to invalid IL or missing references) //IL_06d8: Unknown result type (might be due to invalid IL or missing references) //IL_06fc: Unknown result type (might be due to invalid IL or missing references) //IL_071b: Unknown result type (might be due to invalid IL or missing references) //IL_073b: Unknown result type (might be due to invalid IL or missing references) //IL_075a: Unknown result type (might be due to invalid IL or missing references) //IL_079d: Unknown result type (might be due to invalid IL or missing references) //IL_07db: Unknown result type (might be due to invalid IL or missing references) //IL_07fb: Unknown result type (might be due to invalid IL or missing references) //IL_0839: Unknown result type (might be due to invalid IL or missing references) //IL_0858: Unknown result type (might be due to invalid IL or missing references) //IL_089b: Unknown result type (might be due to invalid IL or missing references) //IL_08d9: Unknown result type (might be due to invalid IL or missing references) //IL_08f8: Unknown result type (might be due to invalid IL or missing references) //IL_0917: Unknown result type (might be due to invalid IL or missing references) //IL_0937: Unknown result type (might be due to invalid IL or missing references) //IL_0956: Unknown result type (might be due to invalid IL or missing references) //IL_097b: Unknown result type (might be due to invalid IL or missing references) //IL_09b9: Unknown result type (might be due to invalid IL or missing references) //IL_09d8: Unknown result type (might be due to invalid IL or missing references) //IL_09f7: Unknown result type (might be due to invalid IL or missing references) //IL_0a16: Unknown result type (might be due to invalid IL or missing references) //IL_0a36: Unknown result type (might be due to invalid IL or missing references) //IL_0a55: Unknown result type (might be due to invalid IL or missing references) //IL_0a7a: Unknown result type (might be due to invalid IL or missing references) //IL_0ab7: Unknown result type (might be due to invalid IL or missing references) //IL_0af9: Unknown result type (might be due to invalid IL or missing references) //IL_0b3c: Unknown result type (might be due to invalid IL or missing references) //IL_0b7a: Unknown result type (might be due to invalid IL or missing references) //IL_0b99: Unknown result type (might be due to invalid IL or missing references) //IL_0bd7: Unknown result type (might be due to invalid IL or missing references) //IL_0bf6: Unknown result type (might be due to invalid IL or missing references) //IL_0c14: Unknown result type (might be due to invalid IL or missing references) //IL_0c39: Unknown result type (might be due to invalid IL or missing references) //IL_0c57: Unknown result type (might be due to invalid IL or missing references) //IL_0c7c: Unknown result type (might be due to invalid IL or missing references) //IL_0c9b: Unknown result type (might be due to invalid IL or missing references) //IL_0cbb: Unknown result type (might be due to invalid IL or missing references) //IL_0cf9: Unknown result type (might be due to invalid IL or missing references) //IL_0d37: Unknown result type (might be due to invalid IL or missing references) //IL_0d56: Unknown result type (might be due to invalid IL or missing references) //IL_0d75: Unknown result type (might be due to invalid IL or missing references) //IL_0d94: Unknown result type (might be due to invalid IL or missing references) //IL_0dcd: Unknown result type (might be due to invalid IL or missing references) //IL_0dec: Unknown result type (might be due to invalid IL or missing references) //IL_0e0c: Unknown result type (might be due to invalid IL or missing references) //IL_0e2b: Unknown result type (might be due to invalid IL or missing references) //IL_0e69: Unknown result type (might be due to invalid IL or missing references) //IL_0e89: Unknown result type (might be due to invalid IL or missing references) //IL_0ea9: Unknown result type (might be due to invalid IL or missing references) //IL_0ec9: Unknown result type (might be due to invalid IL or missing references) //IL_0f06: Unknown result type (might be due to invalid IL or missing references) //IL_0f2b: Unknown result type (might be due to invalid IL or missing references) //IL_0f69: Unknown result type (might be due to invalid IL or missing references) //IL_0fa7: Unknown result type (might be due to invalid IL or missing references) //IL_0fe5: Unknown result type (might be due to invalid IL or missing references) //IL_1023: Unknown result type (might be due to invalid IL or missing references) //IL_1061: Unknown result type (might be due to invalid IL or missing references) //IL_1080: Unknown result type (might be due to invalid IL or missing references) //IL_109f: Unknown result type (might be due to invalid IL or missing references) //IL_10be: Unknown result type (might be due to invalid IL or missing references) //IL_10dd: Unknown result type (might be due to invalid IL or missing references) //IL_10fc: Unknown result type (might be due to invalid IL or missing references) //IL_111c: Unknown result type (might be due to invalid IL or missing references) //IL_113c: Unknown result type (might be due to invalid IL or missing references) //IL_1179: Unknown result type (might be due to invalid IL or missing references) //IL_119e: Unknown result type (might be due to invalid IL or missing references) //IL_11dc: Unknown result type (might be due to invalid IL or missing references) //IL_121a: Unknown result type (might be due to invalid IL or missing references) //IL_1258: Unknown result type (might be due to invalid IL or missing references) //IL_1296: Unknown result type (might be due to invalid IL or missing references) //IL_12d4: Unknown result type (might be due to invalid IL or missing references) //IL_1312: Unknown result type (might be due to invalid IL or missing references) //IL_1331: Unknown result type (might be due to invalid IL or missing references) //IL_1350: Unknown result type (might be due to invalid IL or missing references) //IL_138e: Unknown result type (might be due to invalid IL or missing references) //IL_13ae: Unknown result type (might be due to invalid IL or missing references) //IL_13eb: Unknown result type (might be due to invalid IL or missing references) //IL_142e: Unknown result type (might be due to invalid IL or missing references) //IL_146c: Unknown result type (might be due to invalid IL or missing references) //IL_14aa: Unknown result type (might be due to invalid IL or missing references) //IL_14ca: Unknown result type (might be due to invalid IL or missing references) //IL_14ea: Unknown result type (might be due to invalid IL or missing references) //IL_150a: Unknown result type (might be due to invalid IL or missing references) //IL_1548: Unknown result type (might be due to invalid IL or missing references) //IL_1586: Unknown result type (might be due to invalid IL or missing references) //IL_15a6: Unknown result type (might be due to invalid IL or missing references) //IL_15e3: Unknown result type (might be due to invalid IL or missing references) //IL_1625: Unknown result type (might be due to invalid IL or missing references) //IL_1662: Unknown result type (might be due to invalid IL or missing references) //IL_168a: Unknown result type (might be due to invalid IL or missing references) //IL_16cc: Unknown result type (might be due to invalid IL or missing references) //IL_170e: Unknown result type (might be due to invalid IL or missing references) //IL_1732: Unknown result type (might be due to invalid IL or missing references) //IL_1774: Unknown result type (might be due to invalid IL or missing references) //IL_1798: Unknown result type (might be due to invalid IL or missing references) StaticAction.Find("Level 0-1", "Cube (2)", new Vector3(202f, 73f, 421f), delegate(GameObject obj) { obj.GetComponent<ObjectActivator>().events.toDisActivateObjects = (GameObject[])(object)new GameObject[0]; }); NetAction.Sync("Level 0-1", "Cube (2)", new Vector3(202f, 73f, 421f)); StaticAction.Destroy("Level 0-2", "Invisible Wall", new Vector3(0f, -7f, 163.5f)); StaticAction.Destroy("Level 0-2", "Invisible Wall", new Vector3(-45f, -8f, 287.5f)); StaticAction.Destroy("Level 0-2", "SwordMachine (1)", new Vector3(13f, -10f, 173f)); StaticAction.Destroy("Level 0-2", "Activator", new Vector3(-44.5f, 0f, 157f)); StaticAction.Destroy("Level 0-2", "SwordsMachine", new Vector3(-45f, -11f, 268f)); StaticAction.Destroy("Level 0-2", "SwordsMachine", new Vector3(-55f, -11f, 293f)); NetAction.Sync("Level 0-2", "Activator", new Vector3(-81f, 9f, 339.5f), delegate(Transform obj) { ((Component)obj.parent.parent).gameObject.SetActive(true); }); NetAction.Sync("Level 0-3", "Cube (1)", new Vector3(-89.5f, 9.3f, 413f)); StaticAction.Find("Level 0-5", "Cube", new Vector3(182f, 4f, 382f), delegate(GameObject obj) { obj.GetComponent<ObjectActivator>().events.toDisActivateObjects[0] = null; }); NetAction.Sync("Level 0-5", "Cube", new Vector3(182f, 4f, 382f)); NetAction.Sync("Level 0-5", "DelayedDoorActivation", new Vector3(175f, -6f, 382f)); StaticAction.Find("Level 0-S", "Cube", new Vector3(0f, -7.6f, 30f), delegate(GameObject obj) { ItemPlaceZone val8 = default(ItemPlaceZone); if (obj.TryGetComponent<ItemPlaceZone>(ref val8))