Decompiled source of FindTheGaster v0.4.2
FindTheGaster.dll
Decompiled a day 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.Globalization; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using GameConsole; using GameConsole.Commands; using HarmonyLib; using Newtonsoft.Json; using RepoCaos; using TMPro; using UltrakillStupid.Classes; using UltrakillStupid.Patches; using UltrakillStupid.Scripts; using UltrakillStupid.Scripts.Triggers; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Events; using UnityEngine.Networking; using UnityEngine.UI; using plog; using plog.Models; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: AssemblyTitle("RepoCaosMod")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("ReviOS 11 24.12")] [assembly: AssemblyProduct("RepoCaosMod")] [assembly: AssemblyCopyright("Copyright © ReviOS 11 24.12 2025")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("b62091cf-1bc7-4d0e-be7b-011b6b98bf30")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: AssemblyVersion("1.0.0.0")] namespace RepoCaos { [BepInPlugin("duviz.ultrakill.findthegaster", "Find the Gaster", "0.4.2")] public class Plugin : BaseUnityPlugin { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static UnityAction <>9__30_1; public static UnityAction <>9__30_2; public static UnityAction <>9__30_3; public static Func<string, int> <>9__57_0; public static Func<string, int> <>9__57_1; internal void <SpawnDailyGaster>b__30_1() { //IL_0000: Unknown result type (might be due to invalid IL or missing references) Physics.gravity = Vector3.zero; } internal void <SpawnDailyGaster>b__30_2() { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) Physics.gravity *= 5f; } internal void <SpawnDailyGaster>b__30_3() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: 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) //IL_0029: 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_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("Water"); val.transform.localScale = new Vector3(1000f, 1000f, 1000f); val.transform.position = ((Component)MonoSingleton<NewMovement>.Instance).transform.position; val.AddComponent<BoxCollider>(); ((Collider)val.GetComponent<BoxCollider>()).isTrigger = true; val.layer = LayerMask.NameToLayer("Water"); val.AddComponent<Water>(); } internal int <IsRemoteVersionLower>b__57_0(string s) { if (!int.TryParse(s, out var result)) { return 0; } return result; } internal int <IsRemoteVersionLower>b__57_1(string s) { if (!int.TryParse(s, out var result)) { return 0; } return result; } } [CompilerGenerated] private sealed class <GetAudioFromUrl>d__41 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public string url; public Action<AudioClip> callback; private UnityWebRequest <www>5__2; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <GetAudioFromUrl>d__41(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { int num = <>1__state; if (num == -3 || num == 1) { try { } finally { <>m__Finally1(); } } <www>5__2 = null; <>1__state = -2; } private bool MoveNext() { //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Invalid comparison between Unknown and I4 try { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <www>5__2 = UnityWebRequestMultimedia.GetAudioClip(url, (AudioType)14); <>1__state = -3; <>2__current = <www>5__2.SendWebRequest(); <>1__state = 1; return true; case 1: <>1__state = -3; if ((int)<www>5__2.result != 1) { Debug.LogError((object)("Failed to load audio: " + <www>5__2.error)); callback?.Invoke(null); } else { AudioClip content = DownloadHandlerAudioClip.GetContent(<www>5__2); callback?.Invoke(content); } <>m__Finally1(); <www>5__2 = null; return false; } } catch { //try-fault ((IDisposable)this).Dispose(); throw; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } private void <>m__Finally1() { <>1__state = -1; if (<www>5__2 != null) { ((IDisposable)<www>5__2).Dispose(); } } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class <GetStringFromUrl>d__42 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public string url; public Action<string> callback; private UnityWebRequest <www>5__2; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <GetStringFromUrl>d__42(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { int num = <>1__state; if (num == -3 || num == 1) { try { } finally { <>m__Finally1(); } } <www>5__2 = null; <>1__state = -2; } private bool MoveNext() { //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Invalid comparison between Unknown and I4 try { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <www>5__2 = UnityWebRequest.Get(url); <>1__state = -3; <>2__current = <www>5__2.SendWebRequest(); <>1__state = 1; return true; case 1: <>1__state = -3; if ((int)<www>5__2.result != 1) { Debug.LogError((object)("Failed to load string: " + <www>5__2.error)); callback?.Invoke(null); } else { callback?.Invoke(<www>5__2.downloadHandler.text); } <>m__Finally1(); <www>5__2 = null; return false; } } catch { //try-fault ((IDisposable)this).Dispose(); throw; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } private void <>m__Finally1() { <>1__state = -1; if (<www>5__2 != null) { ((IDisposable)<www>5__2).Dispose(); } } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class <GetTextureFromURL>d__39 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public string url; public Action<Texture2D> callback; private UnityWebRequest <uwr>5__2; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <GetTextureFromURL>d__39(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { int num = <>1__state; if (num == -3 || num == 1) { try { } finally { <>m__Finally1(); } } <uwr>5__2 = null; <>1__state = -2; } private bool MoveNext() { //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Invalid comparison between Unknown and I4 try { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <uwr>5__2 = UnityWebRequestTexture.GetTexture(url); <>1__state = -3; <>2__current = <uwr>5__2.SendWebRequest(); <>1__state = 1; return true; case 1: <>1__state = -3; if ((int)<uwr>5__2.result != 1) { Debug.LogError((object)("Failed to load texture: " + <uwr>5__2.error)); callback?.Invoke(null); } else { Texture2D content = DownloadHandlerTexture.GetContent(<uwr>5__2); callback?.Invoke(content); } <>m__Finally1(); <uwr>5__2 = null; return false; } } catch { //try-fault ((IDisposable)this).Dispose(); throw; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } private void <>m__Finally1() { <>1__state = -1; if (<uwr>5__2 != null) { ((IDisposable)<uwr>5__2).Dispose(); } } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class <LoadAudioFromURL>d__40 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public string url; private UnityWebRequest <www>5__2; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <LoadAudioFromURL>d__40(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { int num = <>1__state; if (num == -3 || num == 1) { try { } finally { <>m__Finally1(); } } <www>5__2 = null; <>1__state = -2; } private bool MoveNext() { //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Invalid comparison between Unknown and I4 try { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <www>5__2 = UnityWebRequestMultimedia.GetAudioClip(url, (AudioType)14); <>1__state = -3; <>2__current = <www>5__2.SendWebRequest(); <>1__state = 1; return true; case 1: <>1__state = -3; if ((int)<www>5__2.result != 1) { Debug.LogError((object)("Failed to load audio: " + <www>5__2.error)); } else { AudioClip content = DownloadHandlerAudioClip.GetContent(<www>5__2); popupSfx.clip = content; } <>m__Finally1(); <www>5__2 = null; return false; } } catch { //try-fault ((IDisposable)this).Dispose(); throw; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } private void <>m__Finally1() { <>1__state = -1; if (<www>5__2 != null) { ((IDisposable)<www>5__2).Dispose(); } } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class <SetTextureToObject>d__37 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public string url; public Color? tintColor; public GameObject obj; private UnityWebRequest <uwr>5__2; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <SetTextureToObject>d__37(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { int num = <>1__state; if (num == -3 || num == 1) { try { } finally { <>m__Finally1(); } } <uwr>5__2 = null; <>1__state = -2; } private bool MoveNext() { //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Invalid comparison between Unknown and I4 //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Expected O, but got Unknown //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Expected O, but got Unknown //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) try { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <uwr>5__2 = UnityWebRequestTexture.GetTexture(url); <>1__state = -3; <>2__current = <uwr>5__2.SendWebRequest(); <>1__state = 1; return true; case 1: <>1__state = -3; if ((int)<uwr>5__2.result != 1) { Debug.LogError((object)("Failed to load texture: " + <uwr>5__2.error)); } else { Texture2D content = DownloadHandlerTexture.GetContent(<uwr>5__2); ((Texture)content).filterMode = (FilterMode)0; if (tintColor.HasValue) { Color[] pixels = content.GetPixels(); for (int i = 0; i < pixels.Length; i++) { pixels[i] *= tintColor.Value; } content.SetPixels(pixels); content.Apply(); } Material val = new Material(Shader.Find("Unlit/Texture")); if (PlayerPrefs.GetString("Gaster_Transparent", "transparent") == "transparent") { val = new Material(MonoSingleton<DefaultReferenceManager>.Instance.masterShader); val.SetFloat("_BlendMode", 1f); val.SetFloat("_ZWrite", 1f); val.SetFloat("_Opacity", 0.9f); val.SetFloat("_SrcBlend", 1f); val.SetFloat("_DstBlend", 0f); val.SetColor("_Color", Color.white); val.renderQueue = 2450; val.shaderKeywords = new string[8] { "ALPHA_TEST", "VERTEX_LIGHTING", "_FOG_ON", "_GLITCHMODE_NONE", "_USEALBEDOASEMISSIVE_ON", "_VERTEXCOLORS_ON", "_VERTEXLIGHTING_ON", "_ZWRITE_ON" }; val.EnableKeyword("VERTEX_LIGHTING"); val.EnableKeyword("_FOG_ON"); val.EnableKeyword("ALPHA_TEST"); val.DisableKeyword("VERTEX_LIGHTING"); val.DisableKeyword("_VERTEXLIGHTING_ON"); val.EnableKeyword("_USEALBEDOEMISSIVE_ON"); } val.SetTexture("_MainTex", (Texture)(object)content); obj.GetComponent<Renderer>().material = val; } <>m__Finally1(); <uwr>5__2 = null; return false; } } catch { //try-fault ((IDisposable)this).Dispose(); throw; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } private void <>m__Finally1() { <>1__state = -1; if (<uwr>5__2 != null) { ((IDisposable)<uwr>5__2).Dispose(); } } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public static Plugin instance; public List<Gaster> gasters = new List<Gaster>(); public Texture popupTex; public Texture fadeTex; public Texture2D vignetteTex; public Texture2D gasterTex; public static Texture2D gasterTerminalIcon = null; public static Texture2D gasterTerminalBackground = null; public static AudioSource popupSfx = null; public static AudioClip gasterAmbienceSfx = null; public static AudioClip gasterTerminalJingleSfx = null; public static AudioClip gasterTerminalMusicSfx = null; private string[] customLevelMod = new string[1] { "com.eternalUnion.angryLevelLoader" }; private bool pausedOnce; private bool extraGasters; private GameObject gasterMenuButton; public static bool showCollected = true; private bool spawnedDaily; private float timeToUpdate; private bool lastMovementActive; private bool spawnedDailyGaster; private bool isBusySpawning; public static float gasterPopupX = 0f; public static int gasterPopupStage = 0; public static float gasterPopupAlpha = 1f; public string overrideText = ""; public float gastersListX = -1920f; public static Color? forcedColor = null; public Texture2D tintedVignetteTex; public bool showVignette; public void Awake() { //IL_0053: Unknown result type (might be due to invalid IL or missing references) ((Object)((Component)this).gameObject).hideFlags = (HideFlags)61; ((Object)ThreadingHelper.Instance).hideFlags = (HideFlags)61; ((ConfigEntry<bool>)AccessTools.Field(typeof(Chainloader), "ConfigHideBepInExGOs").GetValue(null)).Value = true; ((BaseUnityPlugin)this).Logger.LogInfo((object)"Hello, the Instagram community!"); new Harmony("duviz.ultrakill.findthegaster").PatchAll(); instance = this; showCollected = PlayerPrefs.GetString("Gaster_Show_Collected", "on") == "on"; } public void Start() { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) SpawnDefaultGasters(); if (customLevelMod.Any(Chainloader.PluginInfos.ContainsKey)) { SpawnCustomLevelGasters(); } popupSfx = new GameObject("Audio").AddComponent<AudioSource>(); Object.DontDestroyOnLoad((Object)(object)popupSfx); MonoSingleton<Console>.Instance.RegisterCommand((ICommand)(object)new GasterTransparencyCommand()); MonoSingleton<Console>.Instance.RegisterCommand((ICommand)(object)new GasterRemixCommand()); MonoSingleton<Console>.Instance.RegisterCommand((ICommand)(object)new GasterCreditsCommand()); MonoSingleton<Console>.Instance.RegisterCommand((ICommand)(object)new GasterObsidianCommand()); MonoSingleton<Console>.Instance.RegisterCommand((ICommand)(object)new GasterPlayerPrefsCommand()); MonoSingleton<Console>.Instance.RegisterCommand((ICommand)(object)new GasterListCommand()); MonoSingleton<Console>.Instance.RegisterCommand((ICommand)(object)new GasterBranchCommand()); PointsButton.hintActive = PlayerPrefs.GetInt("Gaster_Hint") == 1; PlayerPrefsInformation.GasterPrefix = PlayerPrefs.GetString("Gaster_Save", "Gaster"); new GameObject("BundlesManager").AddComponent<BundlesManager>(); } public void Update() { float realtimeSinceStartup = Time.realtimeSinceStartup; UpdateFunction(); timeToUpdate = Time.realtimeSinceStartup - realtimeSinceStartup; } public void UpdateFunction() { //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0294: Unknown result type (might be due to invalid IL or missing references) //IL_0299: Unknown result type (might be due to invalid IL or missing references) //IL_02d7: Unknown result type (might be due to invalid IL or missing references) //IL_02dc: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_031a: Unknown result type (might be due to invalid IL or missing references) //IL_03fc: Unknown result type (might be due to invalid IL or missing references) //IL_0410: Unknown result type (might be due to invalid IL or missing references) //IL_0415: Unknown result type (might be due to invalid IL or missing references) //IL_0448: Unknown result type (might be due to invalid IL or missing references) //IL_0459: Expected O, but got Unknown //IL_0466: Unknown result type (might be due to invalid IL or missing references) //IL_0480: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)MonoSingleton<NewMovement>.Instance == (Object)null || !((Component)MonoSingleton<NewMovement>.Instance).gameObject.activeSelf) { return; } if (!spawnedDaily && (Object)(object)MonoSingleton<NewMovement>.Instance != (Object)null) { SpawnDailyGaster(); spawnedDaily = true; } if ((Object)(object)MonoSingleton<AudioMixerController>.Instance != (Object)null) { popupSfx.volume = MonoSingleton<AudioMixerController>.Instance.sfxVolume; } if ((Object)(object)MonoSingleton<NewMovement>.Instance != (Object)null) { if (!lastMovementActive && MonoSingleton<NewMovement>.Instance.activated) { ((MonoBehaviour)this).StartCoroutine(GetStringFromUrl("https://duviz.xyz/getGasterVersion", delegate(string str) { if (str != null && IsRemoteVersionLower(str, "0.4.2")) { MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage("Outdated Find The Gaster version!\nv0.4.2 > v" + str, "", "", 0, false, false, true); } })); } lastMovementActive = MonoSingleton<NewMovement>.Instance.activated; } Vector3 val3 = default(Vector3); foreach (Gaster gaster in gasters) { if ((Object)(object)gaster.instance == (Object)null && gaster.level == SceneHelper.CurrentScene && (MonoSingleton<NewMovement>.Instance.activated || gaster.level == "Main Menu") && (showCollected || !gaster.IsCollected())) { GasterTrigger.collectingObsidian = false; showVignette = false; gaster.instance = NewGaster(gaster.position, gaster, gasterTrigger: true, endLevelTrigger: false, gaster.displayColor.HasValue ? gaster.displayColor : new Color?(gaster.allowCheats ? new Color(0.5f, 0.5f, 1f) : new Color(1f, 1f, 1f))); } if (!((Object)(object)gaster.instance != (Object)null)) { continue; } string text = "unknown"; float num = 10f; Vector3 val = ((Component)Camera.main).transform.position - gaster.instance.transform.position; Quaternion val2 = Quaternion.LookRotation(((Vector3)(ref val)).normalized); gaster.instance.transform.rotation = Quaternion.Slerp(gaster.instance.transform.rotation, val2, 1f - Mathf.Exp((0f - num) * Time.deltaTime)); if (CheatsActive() && !gaster.allowCheats && !gaster.IsCollected()) { text = "cheats"; } if (gaster.difficultyExclusive != -1 && gaster.difficultyExclusive > MonoSingleton<PrefsManager>.Instance.GetInt("difficulty", 0) && !gaster.IsCollected()) { text = "difficulty"; } if (text != "unknown") { ((Vector3)(ref val3))..ctor(0f, 2000f, 0f); if (gaster.instance.transform.position != val3 && text == "cheats") { MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage("Cheats or major assistances disable gasters!", "", "", 0, false, false, true); } if (gaster.instance.transform.position != val3 && text == "difficulty") { MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage("Some gasters won't appear in this difficulty!", "", "", 0, false, false, true); } gaster.instance.transform.position = val3; gaster.instance.gameObject.SetActive(false); } } if (!extraGasters && CollectedGastersWithRequirements() >= gasters.Count) { extraGasters = true; SpawnExtraGasters(); } if (!(SceneHelper.CurrentScene == "Main Menu") || !((Object)(object)gasterMenuButton == (Object)null)) { return; } WebButton[] array = Object.FindObjectsOfType<WebButton>(); foreach (WebButton val4 in array) { if (((Object)((Component)val4).gameObject).name == "Youtube") { gasterMenuButton = Object.Instantiate<GameObject>(((Component)val4).gameObject, ((Component)val4).transform.parent); gasterMenuButton.transform.localPosition = ((Component)val4).transform.localPosition + new Vector3(120f, 0f, 0f); ((Object)gasterMenuButton).name = "GasterButton"; WebButton component = gasterMenuButton.GetComponent<WebButton>(); component.url = "https://duviz.xyz/findthegaster"; GameObject obj = Object.Instantiate<GameObject>(new GameObject(), ((Component)component).transform); obj.AddComponent<RectTransform>(); ((Transform)obj.GetComponent<RectTransform>()).localScale = Vector3.one; obj.GetComponent<RectTransform>().sizeDelta = new Vector2(300f, 28f); ((Object)obj).name = "GasterImage"; obj.AddComponent<RawImage>(); obj.GetComponent<RawImage>().texture = popupTex; ((Graphic)obj.GetComponent<RawImage>()).raycastTarget = false; ((Component)gasterMenuButton.transform.GetChild(0).GetChild(0)).gameObject.SetActive(false); ((Component)gasterMenuButton.transform.GetChild(0)).GetComponent<TMP_Text>().alpha = 0f; obj.AddComponent<GasterMenuButton>(); SpawnDailyGaster(); } } } public void LateUpdate() { } public static void LogInfo(object str) { ((BaseUnityPlugin)instance).Logger.LogInfo(str); } public static void LogError(object str) { ((BaseUnityPlugin)instance).Logger.LogError(str); } public bool CheatsActive() { if (!MonoSingleton<CheatsController>.Instance.cheatsEnabled) { return MonoSingleton<StatsManager>.Instance.majorUsed; } return true; } public void SpawnDailyGaster() { if (isBusySpawning) { return; } isBusySpawning = true; ((MonoBehaviour)this).StartCoroutine(GetStringFromUrl(string.Format("https://duviz.xyz/getGasterBeta/{0}", PlayerPrefs.GetInt("Gaster_Branch")), delegate(string str) { //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_023d: Expected O, but got Unknown //IL_0280: Unknown result type (might be due to invalid IL or missing references) //IL_0285: Unknown result type (might be due to invalid IL or missing references) //IL_028b: Expected O, but got Unknown //IL_0310: Unknown result type (might be due to invalid IL or missing references) //IL_031a: Expected O, but got Unknown //IL_02ce: Unknown result type (might be due to invalid IL or missing references) //IL_02d3: Unknown result type (might be due to invalid IL or missing references) //IL_02d9: Expected O, but got Unknown if (str != null) { string[][] items = JsonConvert.DeserializeObject<StringArrayWrapper>("{\"items\":" + str + "}").items; foreach (Gaster item in gasters.ToList()) { if (item.increasesDailyCount) { gasters.Remove(item); } } string[][] array = items; Vector3 pos = default(Vector3); Color value = default(Color); foreach (string[] array2 in array) { string text = array2[0]; string obj = array2[1]; string text2 = array2[2]; string text3 = array2[3]; string modifierStr = array2[4]; string[] array3 = obj.Trim('(', ')').Split(new char[1] { ',' }); ((Vector3)(ref pos))..ctor(float.Parse(array3[0], CultureInfo.InvariantCulture), float.Parse(array3[1], CultureInfo.InvariantCulture), float.Parse(array3[2], CultureInfo.InvariantCulture)); text3 = text3.Trim('(', ')'); string[] array4 = text3.Split(new char[1] { ',' }); ((Color)(ref value))..ctor(float.Parse(array4[0], CultureInfo.InvariantCulture), float.Parse(array4[1], CultureInfo.InvariantCulture), float.Parse(array4[2], CultureInfo.InvariantCulture)); Gaster gaster = new Gaster(text, pos, allowCheats: false, (text == "CreditsMuseum2") ? "Museum" : ((text == "Endless") ? "Cybergrind" : ""), value); gaster.extraRequirement = false; gaster.displayName = text2 + ": " + gaster.displayName; gaster.increasesDailyCount = true; gaster.requiresPRank = modifierStr == "prank"; gaster.isObsidian = modifierStr == "obsidian"; if (modifierStr == "noGravity") { gaster.isObsidian = true; gaster.isWeird = true; UnityEvent onTouch = gaster.OnTouch; object obj2 = <>c.<>9__30_1; if (obj2 == null) { UnityAction val = delegate { //IL_0000: Unknown result type (might be due to invalid IL or missing references) Physics.gravity = Vector3.zero; }; <>c.<>9__30_1 = val; obj2 = (object)val; } onTouch.AddListener((UnityAction)obj2); } if (modifierStr == "moreGravity") { gaster.isObsidian = true; gaster.isWeird = true; UnityEvent onTouch2 = gaster.OnTouch; object obj3 = <>c.<>9__30_2; if (obj3 == null) { UnityAction val2 = delegate { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) Physics.gravity *= 5f; }; <>c.<>9__30_2 = val2; obj3 = (object)val2; } onTouch2.AddListener((UnityAction)obj3); } if (modifierStr == "water") { gaster.isObsidian = true; gaster.isWeird = true; UnityEvent onTouch3 = gaster.OnTouch; object obj4 = <>c.<>9__30_3; if (obj4 == null) { UnityAction val3 = delegate { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: 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) //IL_0029: 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_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) GameObject val4 = new GameObject("Water"); val4.transform.localScale = new Vector3(1000f, 1000f, 1000f); val4.transform.position = ((Component)MonoSingleton<NewMovement>.Instance).transform.position; val4.AddComponent<BoxCollider>(); ((Collider)val4.GetComponent<BoxCollider>()).isTrigger = true; val4.layer = LayerMask.NameToLayer("Water"); val4.AddComponent<Water>(); }; <>c.<>9__30_3 = val3; obj4 = (object)val3; } onTouch3.AddListener((UnityAction)obj4); } if (modifierStr.StartsWith("spawn_")) { gaster.isObsidian = true; gaster.isWeird = true; gaster.OnTouch.AddListener((UnityAction)delegate { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) Object.Instantiate<GameObject>(Ass<GameObject>(modifierStr.Replace("spawn_", "") ?? ""), ((Component)MonoSingleton<NewMovement>.Instance).transform.position, Quaternion.identity); }); } gasters.Add(gaster); spawnedDailyGaster = true; isBusySpawning = false; } FirstRoomPatch.UpdateTerminal(); isBusySpawning = false; } isBusySpawning = false; })); } public void SpawnDefaultGasters() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: 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_0212: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Unknown result type (might be due to invalid IL or missing references) //IL_0282: Unknown result type (might be due to invalid IL or missing references) //IL_02ba: Unknown result type (might be due to invalid IL or missing references) //IL_02f2: Unknown result type (might be due to invalid IL or missing references) //IL_032a: Unknown result type (might be due to invalid IL or missing references) //IL_0362: Unknown result type (might be due to invalid IL or missing references) //IL_039a: Unknown result type (might be due to invalid IL or missing references) //IL_03d2: Unknown result type (might be due to invalid IL or missing references) //IL_040a: Unknown result type (might be due to invalid IL or missing references) //IL_0442: Unknown result type (might be due to invalid IL or missing references) //IL_047a: Unknown result type (might be due to invalid IL or missing references) //IL_04b2: Unknown result type (might be due to invalid IL or missing references) //IL_04ea: Unknown result type (might be due to invalid IL or missing references) //IL_0522: Unknown result type (might be due to invalid IL or missing references) //IL_055a: Unknown result type (might be due to invalid IL or missing references) //IL_0592: Unknown result type (might be due to invalid IL or missing references) //IL_05ca: Unknown result type (might be due to invalid IL or missing references) //IL_0602: Unknown result type (might be due to invalid IL or missing references) //IL_063a: Unknown result type (might be due to invalid IL or missing references) //IL_0672: Unknown result type (might be due to invalid IL or missing references) //IL_06aa: Unknown result type (might be due to invalid IL or missing references) //IL_06e2: Unknown result type (might be due to invalid IL or missing references) //IL_071a: Unknown result type (might be due to invalid IL or missing references) //IL_0752: Unknown result type (might be due to invalid IL or missing references) //IL_078a: Unknown result type (might be due to invalid IL or missing references) //IL_07c2: Unknown result type (might be due to invalid IL or missing references) //IL_07fa: Unknown result type (might be due to invalid IL or missing references) //IL_0832: Unknown result type (might be due to invalid IL or missing references) //IL_086a: Unknown result type (might be due to invalid IL or missing references) //IL_08a2: Unknown result type (might be due to invalid IL or missing references) //IL_08da: Unknown result type (might be due to invalid IL or missing references) //IL_0912: Unknown result type (might be due to invalid IL or missing references) //IL_094a: Unknown result type (might be due to invalid IL or missing references) gasters.Add(new Gaster("Level 0-1", new Vector3(38.25f, 228f, 589.25f))); gasters.Add(new Gaster("Level 0-2", new Vector3(0f, 12.5f, 100f))); gasters.Add(new Gaster("Level 0-3", new Vector3(-130f, -11.5f, 431.85f))); gasters.Add(new Gaster("Level 0-4", new Vector3(5.5f, -0.5f, 249f))); gasters.Add(new Gaster("Level 0-5", new Vector3(-3.695781f, -4.5f, 362.5f))); gasters.Add(new Gaster("Level 1-1", new Vector3(16.5f, 24.5f, 397.5f))); gasters.Add(new Gaster("Level 1-2", new Vector3(46.40152f, 1.428193f, 425.2201f))); gasters.Add(new Gaster("Level 1-3", new Vector3(44.19f, -7f, 363.75f))); gasters.Add(new Gaster("Level 1-4", new Vector3(0f, -30f, 423f))); gasters.Add(new Gaster("Level 2-1", new Vector3(22.63671f, 617.2075f, 431.9131f))); gasters.Add(new Gaster("Level 2-2", new Vector3(-126.2621f, 180.8f, 443.2578f))); gasters.Add(new Gaster("Level 2-3", new Vector3(-91.49994f, 27.78268f, 355.5f))); gasters.Add(new Gaster("Level 2-4", new Vector3(40.5f, -18.5f, 375.1033f))); gasters.Add(new Gaster("Level 3-1", new Vector3(0f, 19.5f, 350.4589f))); gasters.Add(new Gaster("Level 3-2", new Vector3(0f, 88.45461f, 650.3849f))); gasters.Add(new Gaster("Level 4-1", new Vector3(-293.1348f, 84.9838f, 1143.948f))); gasters.Add(new Gaster("Level 4-2", new Vector3(342.0074f, 211.133f, 470.0753f))); gasters.Add(new Gaster("Level 4-3", new Vector3(67.1669f, 17.5f, 373.6403f))); gasters.Add(new Gaster("Level 4-4", new Vector3(1123.369f, 262.4195f, 83.11234f))); gasters.Add(new Gaster("Level 5-1", new Vector3(270.3769f, -19.30468f, 231.6668f))); gasters.Add(new Gaster("Level 5-2", new Vector3(34.9902f, 991.1714f, -35.20284f))); gasters.Add(new Gaster("Level 5-3", new Vector3(-13.99754f, -8.5f, 317.6335f))); gasters.Add(new Gaster("Level 5-4", new Vector3(-1.144732f, 139.274f, 346.438f))); gasters.Add(new Gaster("Level 6-1", new Vector3(176.8103f, -142.6342f, -509.1721f))); gasters.Add(new Gaster("Level 6-2", new Vector3(-132.2011f, 12.62544f, 359.4402f))); gasters.Add(new Gaster("Level 7-1", new Vector3(17.51437f, 64.5f, 487.5963f))); gasters.Add(new Gaster("Level 7-2", new Vector3(-114.5412f, 387.4886f, 421.2605f))); gasters.Add(new Gaster("Level 7-3", new Vector3(-223f, 26.5f, 483.7091f))); gasters.Add(new Gaster("Level 7-4", new Vector3(104.0811f, -4.4107f, 847.1364f))); gasters.Add(new Gaster("Level P-1", new Vector3(-109.195f, -49.34299f, 70.04394f))); gasters.Add(new Gaster("Level P-2", new Vector3(69.5f, 49.2824f, 237.6205f))); gasters.Add(new Gaster("Level 0-E", new Vector3(-213.8062f, 7.5f, 311.9821f))); gasters.Add(new Gaster("Level 0-E", new Vector3(-43.76205f, 46.2929f, 228.9849f))); gasters.Add(new Gaster("Level 1-E", new Vector3(204f, 27.5f, 573.5f))); gasters.Add(new Gaster("Level 1-E", new Vector3(135.9412f, 166.5f, 553.1849f))); gasters.Add(new Gaster("Level 0-S", new Vector3(72.26433f, -14.5f, 165.4999f))); gasters.Add(new Gaster("Level 1-S", new Vector3(0f, -5.699751f, 134.8803f))); gasters.Add(new Gaster("Level 4-S", new Vector3(418.9155f, 89.5f, 154.9458f))); gasters.Add(new Gaster("Level 5-S", new Vector3(132.7276f, 85.49998f, -258.1491f))); gasters.Add(new Gaster("Level 7-S", new Vector3(-56.85102f, -12.68f, 149.4567f))); gasters.Add(new Gaster("Endless", new Vector3(0f, -30f, 65f), allowCheats: false, "Cybergrind")); gasters.Add(new Gaster("uk_construct", new Vector3(-951.3815f, 62.86881f, 584.1725f), allowCheats: true, "Sandbox")); gasters.Add(new Gaster("CreditsMuseum2", new Vector3(538.25f, 53.26952f, 713.1586f), allowCheats: false, "Museum")); } public void SpawnCustomLevelGasters() { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) Color value = default(Color); ((Color)(ref value))..ctor(0f, 1f, 0f); foreach (Gaster item in new List<Gaster> { new Gaster("punzstayfrosty", new Vector3(951.8428f, -141.375f, 418.6079f), allowCheats: false, "When hell freezes over"), new Gaster("ballfartchungus.aBetterTomorrow", new Vector3(-82.03432f, -14.40026f, 771.8484f), allowCheats: false, "A better tomorrow"), new Gaster("mag.indulgence.thedeathofparadigm", new Vector3(-274.7996f, 185.7045f, 377.2779f), allowCheats: false, "Indulgence: I-1"), new Gaster("BENCE.CLARITY.49", new Vector3(-348.7352f, 19.156f, 134.4591f), allowCheats: false, "Clarity: Trilogy"), new Gaster("BLISS.BENCE.FIRST", new Vector3(40.6951f, 960.3764f, 1580.036f), allowCheats: false, "BLISS: B-1") }) { item.displayColor = value; item.extraRequirement = false; gasters.Add(item); } } public void SpawnExtraGasters() { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: 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_0261: Unknown result type (might be due to invalid IL or missing references) //IL_0294: Unknown result type (might be due to invalid IL or missing references) //IL_02c7: Unknown result type (might be due to invalid IL or missing references) //IL_02fa: Unknown result type (might be due to invalid IL or missing references) //IL_032d: Unknown result type (might be due to invalid IL or missing references) //IL_0360: Unknown result type (might be due to invalid IL or missing references) //IL_0393: Unknown result type (might be due to invalid IL or missing references) //IL_03c6: Unknown result type (might be due to invalid IL or missing references) //IL_03f9: Unknown result type (might be due to invalid IL or missing references) //IL_042c: 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_0492: Unknown result type (might be due to invalid IL or missing references) //IL_04c5: Unknown result type (might be due to invalid IL or missing references) //IL_04f8: Unknown result type (might be due to invalid IL or missing references) //IL_052b: Unknown result type (might be due to invalid IL or missing references) //IL_055e: Unknown result type (might be due to invalid IL or missing references) //IL_0591: Unknown result type (might be due to invalid IL or missing references) //IL_05c4: Unknown result type (might be due to invalid IL or missing references) //IL_05f7: Unknown result type (might be due to invalid IL or missing references) //IL_062a: Unknown result type (might be due to invalid IL or missing references) //IL_065d: Unknown result type (might be due to invalid IL or missing references) //IL_0690: Unknown result type (might be due to invalid IL or missing references) //IL_06c3: Unknown result type (might be due to invalid IL or missing references) //IL_06f6: Unknown result type (might be due to invalid IL or missing references) //IL_0729: Unknown result type (might be due to invalid IL or missing references) //IL_075c: Unknown result type (might be due to invalid IL or missing references) //IL_078f: Unknown result type (might be due to invalid IL or missing references) //IL_07c2: Unknown result type (might be due to invalid IL or missing references) //IL_07f5: Unknown result type (might be due to invalid IL or missing references) //IL_0828: Unknown result type (might be due to invalid IL or missing references) //IL_085b: Unknown result type (might be due to invalid IL or missing references) //IL_088e: Unknown result type (might be due to invalid IL or missing references) //IL_08c9: Unknown result type (might be due to invalid IL or missing references) Color value = default(Color); ((Color)(ref value))..ctor(1f, 0f, 0f); foreach (Gaster item in new List<Gaster> { new Gaster("Main Menu", new Vector3(0f, -49.0386f, 63.6845f), allowCheats: true, "???"), new Gaster("Tutorial", new Vector3(65.64801f, 30.7f, 297.9344f)), new Gaster("Level 0-1", new Vector3(-0.6464477f, 119.7f, 253.5164f)), new Gaster("Level 0-2", new Vector3(-49.01336f, -1.53109f, 132.9333f)), new Gaster("Level 0-3", new Vector3(82.73406f, 76.5f, 426.1935f)), new Gaster("Level 0-4", new Vector3(-31.5f, 8.104531f, 352.7244f)), new Gaster("Level 0-5", new Vector3(194.1393f, 45f, 382.2445f)), new Gaster("Level 1-1", new Vector3(2.946469f, 232.0233f, 376.0338f)), new Gaster("Level 1-2", new Vector3(-205.7693f, 63.94686f, 304.9183f)), new Gaster("Level 1-3", new Vector3(0.02359945f, -18.25731f, 437.1486f)), new Gaster("Level 1-4", new Vector3(0.5014049f, 26.5f, 608.3572f)), new Gaster("Level 2-1", new Vector3(19.8496f, -164.285f, 234.3448f)), new Gaster("Level 2-1", new Vector3(35.11102f, -75.58088f, 394f)), new Gaster("Level 2-1", new Vector3(42.44817f, 71.30463f, 546.5776f)), new Gaster("Level 2-2", new Vector3(-314.4177f, 137.5f, 362.3129f)), new Gaster("Level 2-3", new Vector3(-146.6073f, 67.5751f, 483.3467f)), new Gaster("Level 2-4", new Vector3(23.60453f, 0.8778399f, 467.8522f)), new Gaster("Level 3-1", new Vector3(-69.73652f, -74.375f, 452.855f)), new Gaster("Level 3-2", new Vector3(-0.9552683f, -29.96024f, 254.9717f)), new Gaster("Level 4-1", new Vector3(-279.7554f, 37.25537f, 428.9385f)), new Gaster("Level 4-2", new Vector3(-1049.207f, 758.4415f, 550.069f)), new Gaster("Level 4-3", new Vector3(229.6724f, 22f, 529.3333f)), new Gaster("Level 4-4", new Vector3(0f, 3.353203f, 296.4533f)), new Gaster("Level 5-1", new Vector3(0.3724104f, -101.6131f, 395.7795f)), new Gaster("Level 5-2", new Vector3(109.724f, -11.90203f, 899.0867f)), new Gaster("Level 5-3", new Vector3(-243.2753f, 156.4371f, 348.4111f)), new Gaster("Level 5-4", new Vector3(640.9997f, 819.7258f, 18.63654f)), new Gaster("Level 6-1", new Vector3(1.938595f, -122.9554f, 741f)), new Gaster("Level 6-2", new Vector3(104.3508f, -21.19061f, 479.1222f)), new Gaster("Level 7-1", new Vector3(-88f, -11f, 345.6973f)), new Gaster("Level 7-2", new Vector3(-115.558f, 379.6547f, 409.4634f)), new Gaster("Level 7-3", new Vector3(-0.5292426f, 53.64056f, 242.9597f)), new Gaster("Level 7-4", new Vector3(-111.6039f, 403.8758f, 679.1782f)), new Gaster("Level P-1", new Vector3(404.8203f, -445.8927f, 110.3314f)), new Gaster("Level P-2", new Vector3(55.6429f, 364.25f, 60.6687f)), new Gaster("Level 0-E", new Vector3(94.05121f, -5.108382f, 314.9218f)), new Gaster("Level 1-E", new Vector3(292.5919f, 249.1026f, 448.4347f)), new Gaster("Level 0-S", new Vector3(1.063126f, 10f, -27.89005f)), new Gaster("Level 1-S", new Vector3(-0.0004342553f, 114.3649f, -45.63516f)), new Gaster("Level 4-S", new Vector3(409.2071f, 90.75f, 163.5f)), new Gaster("Level 5-S", new Vector3(82.01675f, -13.75659f, -278.9781f)), new Gaster("Level 7-S", new Vector3(-3859.486f, 904.4676f, -1906.405f)), new Gaster("Endless", new Vector3(0.2048489f, 729.2f, -47.05206f), allowCheats: false, "Cybergrind") }) { gasters.Add(item); item.displayColor = value; } } public int CollectedGasters() { int num = 0; foreach (Gaster gaster in gasters) { if (gaster.IsCollected()) { num++; } } return num; } public int CollectedGastersWithRequirements() { int num = 0; foreach (Gaster gaster in gasters) { if (gaster.IsCollected() || !gaster.extraRequirement) { num++; } } return num; } public GameObject NewGaster(Vector3 pos, Gaster gaster, bool gasterTrigger = true, bool endLevelTrigger = false, Color? tintColor = null) { //IL_0021: 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) GameObject val = GameObject.CreatePrimitive((PrimitiveType)3); SetTextureToObjectAssetBundle(val, tintColor); ((Object)val).name = "Gaster"; val.transform.position = pos; val.transform.localScale = new Vector3(1.2f, 3f, 0.01f); ((Collider)val.GetComponent<BoxCollider>()).isTrigger = true; if (endLevelTrigger) { val.AddComponent<EndLevelTrigger>(); } if (gasterTrigger) { val.AddComponent<GasterTrigger>(); val.GetComponent<GasterTrigger>().gaster = gaster; val.AddComponent<GasterAudioController>(); val.AddComponent<GasterRequirements>(); val.GetComponent<GasterRequirements>().gaster = gaster; } return val; } [IteratorStateMachine(typeof(<SetTextureToObject>d__37))] private IEnumerator SetTextureToObject(GameObject obj, Color? tintColor = null, string url = "https://duviz.xyz/static/img/mod/gaster.png") { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <SetTextureToObject>d__37(0) { obj = obj, tintColor = tintColor, url = url }; } private void SetTextureToObjectAssetBundle(GameObject obj, Color? tintColor = null) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Expected O, but got Unknown //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Expected O, but got Unknown //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) Texture2D val = new Texture2D(((Texture)gasterTex).width, ((Texture)gasterTex).height); val.SetPixels(gasterTex.GetPixels()); ((Texture)val).filterMode = (FilterMode)0; if (tintColor.HasValue) { Color[] pixels = val.GetPixels(); for (int i = 0; i < pixels.Length; i++) { pixels[i] *= tintColor.Value; } val.SetPixels(pixels); val.Apply(); } Material val2 = new Material(Shader.Find("Unlit/Texture")); if (PlayerPrefs.GetString("Gaster_Transparent") == "transparent") { val2 = new Material(MonoSingleton<DefaultReferenceManager>.Instance.masterShader); val2.SetFloat("_BlendMode", 1f); val2.SetFloat("_ZWrite", 1f); val2.SetFloat("_Opacity", 0.9f); val2.SetFloat("_SrcBlend", 1f); val2.SetFloat("_DstBlend", 0f); val2.SetColor("_Color", Color.white); val2.renderQueue = 2450; val2.shaderKeywords = new string[8] { "ALPHA_TEST", "VERTEX_LIGHTING", "_FOG_ON", "_GLITCHMODE_NONE", "_USEALBEDOASEMISSIVE_ON", "_VERTEXCOLORS_ON", "_VERTEXLIGHTING_ON", "_ZWRITE_ON" }; val2.EnableKeyword("VERTEX_LIGHTING"); val2.EnableKeyword("_FOG_ON"); val2.EnableKeyword("ALPHA_TEST"); val2.DisableKeyword("VERTEX_LIGHTING"); val2.DisableKeyword("_VERTEXLIGHTING_ON"); val2.EnableKeyword("_USEALBEDOEMISSIVE_ON"); } val2.SetTexture("_MainTex", (Texture)(object)val); obj.GetComponent<Renderer>().material = val2; } [IteratorStateMachine(typeof(<GetTextureFromURL>d__39))] public IEnumerator GetTextureFromURL(string url, Action<Texture2D> callback) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <GetTextureFromURL>d__39(0) { url = url, callback = callback }; } [IteratorStateMachine(typeof(<LoadAudioFromURL>d__40))] public IEnumerator LoadAudioFromURL(string url) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <LoadAudioFromURL>d__40(0) { url = url }; } [IteratorStateMachine(typeof(<GetAudioFromUrl>d__41))] public IEnumerator GetAudioFromUrl(string url, Action<AudioClip> callback) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <GetAudioFromUrl>d__41(0) { url = url, callback = callback }; } [IteratorStateMachine(typeof(<GetStringFromUrl>d__42))] public IEnumerator GetStringFromUrl(string url, Action<string> callback) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <GetStringFromUrl>d__42(0) { url = url, callback = callback }; } public AudioClip MakeClipLouder(AudioClip clip, float multiplier) { float[] array = new float[clip.samples * clip.channels]; clip.GetData(array, 0); for (int i = 0; i < array.Length; i++) { array[i] *= multiplier; } AudioClip obj = AudioClip.Create(((Object)clip).name + "_louder", clip.samples, clip.channels, clip.frequency, false); obj.SetData(array, 0); return obj; } public static T Ass<T>(string path) { //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 Addressables.LoadAssetAsync<T>((object)path).WaitForCompletion(); } public bool IsPaused(bool ignorePauseMenu = false) { if (MonoSingleton<Console>.Instance.consoleOpen) { return false; } if (ignorePauseMenu) { if (!((Object)(object)MonoSingleton<OptionsManager>.Instance != (Object)null)) { return false; } return MonoSingleton<OptionsManager>.Instance.paused; } if ((Object)(object)MonoSingleton<OptionsManager>.Instance != (Object)null && MonoSingleton<OptionsManager>.Instance.paused && Input.GetKey((KeyCode)306)) { if (!((Object)(object)MonoSingleton<OptionsManager>.Instance != (Object)null)) { return false; } return MonoSingleton<OptionsManager>.Instance.pauseMenu.activeSelf; } return false; } public bool IsInSettings() { if (!((Object)(object)MonoSingleton<OptionsManager>.Instance != (Object)null)) { return false; } return !MonoSingleton<OptionsManager>.Instance.pauseMenu.activeSelf; } public void OnGUI() { float realtimeSinceStartup = Time.realtimeSinceStartup; OnGUIFunction(); realtimeSinceStartup = Time.realtimeSinceStartup - realtimeSinceStartup; } public void OnGUIFunction() { //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) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Expected O, but got Unknown //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_03a6: Unknown result type (might be due to invalid IL or missing references) //IL_0485: Unknown result type (might be due to invalid IL or missing references) //IL_03c4: Unknown result type (might be due to invalid IL or missing references) //IL_052a: Unknown result type (might be due to invalid IL or missing references) //IL_053d: Unknown result type (might be due to invalid IL or missing references) //IL_0550: Unknown result type (might be due to invalid IL or missing references) //IL_05c9: Unknown result type (might be due to invalid IL or missing references) //IL_0585: Unknown result type (might be due to invalid IL or missing references) //IL_0597: Unknown result type (might be due to invalid IL or missing references) float num = Mathf.Clamp(Time.unscaledDeltaTime, 0f, 1f / 15f); GUI.matrix = Matrix4x4.TRS(Vector3.zero, Quaternion.identity, new Vector3((float)Screen.width / 1920f, (float)Screen.height / 1080f, 1f)); string text = overrideText; if (showVignette) { GUI.DrawTexture(new Rect(0f, 0f, 1920f, 1080f), (Texture)(object)tintedVignetteTex); } GUIStyle val = new GUIStyle(GUI.skin.label); val.alignment = (TextAnchor)4; val.fontSize = 24; float num2 = 1920f; float num3 = 100f; float num4 = (1920f - num2) / 2f; float num5 = 1080f - num3; GUI.Label(new Rect(num4, num5, num2, num3), text, val); num2 = 300f; num3 = 300f; num4 = gasterPopupX - 300f; num5 = 1080f - num3; if (gasterPopupX > 0f && gasterPopupStage == 0) { gasterPopupX -= (301f - gasterPopupX) * Time.deltaTime; } if (gasterPopupX < 299.9f && gasterPopupStage == 1) { gasterPopupX -= (gasterPopupX - 300f) * Time.deltaTime * 5f; } else { gasterPopupStage = 0; } if ((Object)(object)popupTex != (Object)null && gasterPopupX > 0f) { float num6 = 1f; float num7 = 1f; float num8 = 1f; if (forcedColor.HasValue) { num6 = forcedColor.Value.r; num7 = forcedColor.Value.g; num8 = forcedColor.Value.b; } GUI.color = new Color(num6, num7, num8, gasterPopupAlpha); GUI.DrawTexture(new Rect(num4, num5, num2, num3), popupTex, (ScaleMode)2, true); int num9 = 0; foreach (Gaster gaster in gasters) { if (gaster.IsCollected()) { num9++; } } val.alignment = (TextAnchor)4; val.fontSize = 30; GUI.Label(new Rect(num4, num5 - num3 / 2f + 50f, num2, 100f), $"{num9}/{gasters.Count}", val); } int num10 = 0; foreach (Gaster gaster2 in gasters) { if (showCollected || !gaster2.IsCollected()) { num10++; } } if (((Object)(object)MonoSingleton<OptionsManager>.Instance != (Object)null && MonoSingleton<OptionsManager>.Instance.paused && Time.timeScale == 0f) || (gastersListX > -1745.4545f && pausedOnce) || (SceneHelper.CurrentScene == "Main Menu" && Input.GetKey((KeyCode)306))) { num4 = gastersListX; num5 = 0f; float num11 = 0f; if ((IsPaused() && SceneHelper.CurrentScene != "Main Menu" && Time.timeScale == 0f) || (SceneHelper.CurrentScene == "Main Menu" && Input.GetKey((KeyCode)306))) { if (Input.mousePosition.x < (float)Screen.width * 0.4f) { if (num10 > 18) { num11 = (Input.mousePosition.x - (float)Screen.width * 0.3f) / (float)Screen.width * 300f; if (num11 < 0f) { num11 *= 10f; } } gastersListX -= (gastersListX - num11) * num * 5f; } else { gastersListX -= gastersListX * num * 5f; } pausedOnce = true; } if ((Object)(object)fadeTex != (Object)null) { GUI.DrawTexture(new Rect((0f - Mathf.Abs(num4)) / 1.4f - Mathf.Abs(num11), 0f, 1920f / ((num10 > 18) ? 1.5f : 3f), 1080f), fadeTex, (ScaleMode)0, true); } foreach (Gaster gaster3 in gasters) { if (showCollected || !gaster3.IsCollected()) { float num12 = 60f; int fontSize = 14; float num13 = (gaster3.allowCheats ? 0.5f : 1f); float num14 = (gaster3.allowCheats ? 0.5f : 1f); float num15 = (gaster3.allowCheats ? 1f : 1f); if (gaster3.displayColor.HasValue) { num13 = gaster3.displayColor.Value.r; num14 = gaster3.displayColor.Value.g; num15 = gaster3.displayColor.Value.b; } if ((Object)(object)popupTex != (Object)null) { GUI.color = new Color(num13, num14, num15, gaster3.IsCollected() ? 1f : 0.5f); GUI.DrawTexture(new Rect(num4, num5, num12, num12), popupTex, (ScaleMode)2, true); } val.alignment = (TextAnchor)3; val.fontSize = fontSize; GUI.Label(new Rect(num4 + num12, num5, num12 * 1.4f, num12), gaster3.displayName, val); num5 += num12; if (num5 > 1080f - num12) { num5 = 0f; num4 += num12 * 2f; } } } } if ((!IsPaused() || SceneHelper.CurrentScene == "Main Menu" || !MonoSingleton<NewMovement>.Instance.activated || !pausedOnce) && (SceneHelper.CurrentScene != "Main Menu" || !Input.GetKey((KeyCode)306))) { gastersListX -= (gastersListX - 1920f * ((IsPaused(ignorePauseMenu: true) && IsInSettings() && SceneHelper.CurrentScene != "Main Menu" && MonoSingleton<NewMovement>.Instance.activated) ? (-0.6f) : (-1f))) * num * 3f; if (float.IsNaN(gastersListX) || float.IsInfinity(gastersListX)) { gastersListX = -1920f; } } } private bool IsRemoteVersionLower(string remoteVersion, string localVersion) { int result2; int[] array = (from s in remoteVersion.Split(new char[1] { '.' }) select int.TryParse(s, out result2) ? result2 : 0).ToArray(); int result; int[] array2 = (from s in localVersion.Split(new char[1] { '.' }) select int.TryParse(s, out result) ? result : 0).ToArray(); int num = Mathf.Max(array.Length, array2.Length); for (int i = 0; i < num; i++) { int num2 = ((i < array.Length) ? array[i] : 0); int num3 = ((i < array2.Length) ? array2[i] : 0); if (num2 > num3) { return true; } if (num2 < num3) { return false; } } return false; } } } namespace GameConsole.Commands { public class GasterBranchCommand : ICommand, IConsoleLogger { public Logger Log { get; } = new Logger("Gaster branch activator"); public string Name => "Gaster branch activator"; public string Description => "Enabled gaster branches in the gaster terminal"; public string Command => "gaster_branch"; public void Execute(Console con, string[] args) { PlayerPrefs.SetInt("Gaster_BranchEnabled", 1); Log.Info("Branchs enabled! Restart the level!", (IEnumerable<Tag>)null, (string)null, (object)null); } } public class GasterCreditsCommand : ICommand, IConsoleLogger { public static GameObject book; public Logger Log { get; } = new Logger("Gaster credits"); public string Name => "Gaster credits"; public string Description => "Spawns a ceremonial message from the developer"; public string Command => "gaster_credits"; public void Execute(Console con, string[] args) { if (SceneHelper.CurrentScene != "uk_construct") { Log.Info("This command can only be executed in Sandbox", (IEnumerable<Tag>)null, (string)null, (object)null); return; } SpawnCredits(); Log.Info("Spawned credits book", (IEnumerable<Tag>)null, (string)null, (object)null); } public static void SpawnCredits() { //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0160: 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_00db: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)book != (Object)null) { Object.Destroy((Object)(object)book); } string text = "Credits:\nDuviz - Creator of the mod\nAxo - Helped with a lot of clips\nEggsToast - Made the Gaster's hint sound\nDoodles - Made the Gaster's hint sound\nAszon - Casino music\nCharluk - Terminal music\nPatns - Casino idea\nWing - Terminal art"; string text2 = ""; foreach (Gaster gaster in Plugin.instance.gasters) { if (!gaster.IsCollected()) { string text3 = ColorUtility.ToHtmlStringRGB(gaster.displayColor.HasValue ? gaster.displayColor.Value : Color.white); text2 = text2 + "\n<color=#" + text3 + ">" + gaster.displayName; } } if (text2 != "") { book = Object.Instantiate<GameObject>(Plugin.Ass<GameObject>("Assets/Prefabs/Items/Book.prefab"), ((Component)MonoSingleton<NewMovement>.Instance).transform.position, Quaternion.identity); typeof(Readable).GetField("content", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(book.GetComponent<Readable>(), text + "\n\nCome back when you have collected these gasters:\n" + text2); typeof(Readable).GetField("instantScan", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(book.GetComponent<Readable>(), true); } else { book = Object.Instantiate<GameObject>(Plugin.Ass<GameObject>("Assets/Prefabs/Items/Book.prefab"), ((Component)MonoSingleton<NewMovement>.Instance).transform.position, Quaternion.identity); typeof(Readable).GetField("content", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(book.GetComponent<Readable>(), "Hey!\n\nI'm the developer of this mod, and I must say...\n\nHow?\n\nLike, seriously, what was the purpose of all this?\nI made this mod like a way to just spend time on something and not lay in bed all day, and, honestly, why have I gotten so much support for this?\n\nIt's not a mod with an incredible idea, nor it has beautiful visual effects when collecting a secret.\n\nAnd somehow you people have been spending a lot of time on it...\n\n" + text + "\n\nYou can now send me an e-mail to [email protected] showing this book while in the pause menu, and I will make sure to add you to the leaderboard in duviz.xyz\n\n\nThank you. You are the reason why I'm still here."); typeof(Readable).GetField("instantScan", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(book.GetComponent<Readable>(), true); } } } public class GasterListCommand : ICommand, IConsoleLogger { public Logger Log { get; } = new Logger("Show collected gasters"); public string Name => "Show collected gasters"; public string Description => "Modify if already collected gasters should appear or not (on/off)"; public string Command => "gaster_show_collected"; public void Execute(Console con, string[] args) { if (args.Length != 0 && args[0] != "on" && args[0] != "off") { Log.Info("Argument must be (on/off)", (IEnumerable<Tag>)null, (string)null, (object)null); return; } Log.Info("Gaster show collected set to " + args[0], (IEnumerable<Tag>)null, (string)null, (object)null); PlayerPrefs.SetString("Gaster_Show_Collected", args[0]); Plugin.showCollected = PlayerPrefs.GetString("Gaster_Show_Collected", "on") == "on"; } } public class GasterObsidianCommand : ICommand, IConsoleLogger { public Logger Log { get; } = new Logger("Gaster transparency"); public string Name => "Gaster obsidian modifier"; public string Description => "Makes all gasters obsidian until the game closes"; public string Command => "gaster_obsidian"; public void Execute(Console con, string[] args) { foreach (Gaster gaster in Plugin.instance.gasters) { gaster.isObsidian = true; } Log.Info("Made every gaster obsidian (it's not visual, you have to collect them, trust \ud83e\udd1e)", (IEnumerable<Tag>)null, (string)null, (object)null); } } public class GasterPlayerPrefsCommand : ICommand, IConsoleLogger { public Logger Log { get; } = new Logger("Gaster save prefix"); public string Name => "Gaster save prefix"; public string Description => "Modify the PlayerPrefs prefix of Gasters (<string>/Gaster | requires restart)"; public string Command => "gaster_savefileprefix"; public void Execute(Console con, string[] args) { string text = ""; if (args[0] != null) { text = args[0]; } Log.Info("Gaster save file prefix set to " + text + " (restart the game) (to go back use Gaster as argument)", (IEnumerable<Tag>)null, (string)null, (object)null); PlayerPrefs.SetString("Gaster_Save", text); } } public class GasterTransparencyCommand : ICommand, IConsoleLogger { public Logger Log { get; } = new Logger("Gaster transparency"); public string Name => "Gaster transparency"; public string Description => "Modify the transparency of gasters (transparent/opaque)"; public string Command => "gaster_transparency"; public void Execute(Console con, string[] args) { if (args.Length != 0 && args[0] != "transparent" && args[0] != "opaque") { Log.Info("Argument must be (transparent/opaque)", (IEnumerable<Tag>)null, (string)null, (object)null); return; } Log.Info("Gaster transparency set to " + args[0] + " (restart the game)", (IEnumerable<Tag>)null, (string)null, (object)null); PlayerPrefs.SetString("Gaster_Transparent", args[0]); } } public class GasterRemixCommand : ICommand, IConsoleLogger { public Logger Log { get; } = new Logger("Gaster remix"); public string Name => "Gaster remix"; public string Description => "Toggles between the normal gaster hint sound with a remix sound (on/off | requires restart)"; public string Command => "gaster_remix"; public void Execute(Console con, string[] args) { if (args.Length != 0 && args[0] != "on" && args[0] != "off") { Log.Info("Argument must be (on/off)", (IEnumerable<Tag>)null, (string)null, (object)null); return; } Log.Info("Gaster remix " + args[0] + ", make sure to restart your game", (IEnumerable<Tag>)null, (string)null, (object)null); PlayerPrefs.SetString("Gaster_Ambience_Remix", args[0]); } } } namespace UltrakillStupid.Scripts { internal class GasterAudioController : MonoBehaviour { private AudioSource audioSource; public float maxDistance = 50f; public float minDistance = 40f; public bool forceOn; public void Start() { audioSource = ((Component)this).gameObject.AddComponent<AudioSource>(); audioSource.loop = true; audioSource.volume = 0f; audioSource.playOnAwake = false; audioSource.clip = null; } public void Update() { //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)Plugin.gasterAmbienceSfx != (Object)null && (Object)(object)audioSource.clip == (Object)null) { audioSource.clip = Plugin.gasterAmbienceSfx; } if ((Object)(object)audioSource.clip == (Object)null) { return; } audioSource.volume = MonoSingleton<AudioMixerController>.Instance.sfxVolume; if (PointsButton.hintActive || forceOn) { if (!audioSource.isPlaying) { audioSource.Play(); } } else if (audioSource.isPlaying) { audioSource.Stop(); } if ((Object)(object)MonoSingleton<NewMovement>.Instance != (Object)null) { audioSource.volume = (maxDistance - Mathf.Max(Vector3.Distance(((Component)this).transform.position, ((Component)MonoSingleton<NewMovement>.Instance).transform.position) - minDistance, 0f)) / maxDistance; } } } public class GasterRequirements : MonoBehaviour { public Gaster gaster; private bool requiresPRank; private bool hasSpawnedMessage; private MeshRenderer mr; private BoxCollider col; public void Start() { mr = ((Component)this).GetComponent<MeshRenderer>(); col = ((Component)this).GetComponent<BoxCollider>(); requiresPRank = gaster.requiresPRank; } public void Update() { if (requiresPRank) { SetVisibility(IsPRank()); if (!hasSpawnedMessage && IsPRank()) { MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage("Something has summoned...", "", "", 0, false, false, true); hasSpawnedMessage = true; } } } private bool IsPRank() { string ranks = MonoSingleton<StatsManager>.Instance.GetRanks(MonoSingleton<StatsManager>.Instance.timeRanks, MonoSingleton<StatsManager>.Instance.seconds, true, false); string ranks2 = MonoSingleton<StatsManager>.Instance.GetRanks(MonoSingleton<StatsManager>.Instance.killRanks, (float)MonoSingleton<StatsManager>.Instance.kills, false, false); string ranks3 = MonoSingleton<StatsManager>.Instance.GetRanks(MonoSingleton<StatsManager>.Instance.styleRanks, (float)MonoSingleton<StatsManager>.Instance.stylePoints, false, false); if (ranks == "<color=#FF0000>S</color>" && ranks2 == "<color=#FF0000>S</color>") { return ranks3 == "<color=#FF0000>S</color>"; } return false; } public void SetVisibility(bool visible) { ((Renderer)mr).enabled = visible; ((Collider)col).enabled = visible; } } internal class GasterVisualizer : MonoBehaviour { } } namespace UltrakillStupid.Scripts.Triggers { public class EndLevelTrigger : MonoBehaviour { public void OnTriggerEnter(Collider other) { if (!(((Component)other).tag != "Player")) { SceneHelper.SpawnFinalPitAndFinish(); } } } internal class GasterTrigger : MonoBehaviour { [CompilerGenerated] private sealed class <WaitTillEndOfLevelOrPlayerDeath>d__6 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public GasterTrigger <>4__this; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <WaitTillEndOfLevelOrPlayerDeath>d__6(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Expected O, but got Unknown //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) int num = <>1__state; GasterTrigger gasterTrigger = <>4__this; switch (num) { default: return false; case 0: <>1__state = -1; gasterTrigger.gaster.OnTouch.Invoke(); gasterTrigger.collecting = true; collectingObsidian = true; gasterTrigger.restarts = MonoSingleton<StatsManager>.Instance.restarts; MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage("Carry it until the end.", "", "", 0, false, false, true); MonoSingleton<TimeController>.Instance.ParryFlash(); ((Component)gasterTrigger).GetComponent<GasterRequirements>().SetVisibility(visible: false); if ((Object)(object)Plugin.instance.vignetteTex != (Object)null) { Color[] array = Plugin.instance.vignetteTex.GetPixels().ToArray(); for (int i = 0; i < array.Length; i++) { array[i] *= (gasterTrigger.gaster.displayColor.HasValue ? gasterTrigger.gaster.displayColor.Value : Color.white); if (gasterTrigger.gaster.isWeird) { array[i] = new Color(array[i].r, array[i].g, array[i].b, Mathf.Clamp(array[i].a - 0.2f, 0f, 1f)); } } Plugin.instance.tintedVignetteTex.SetPixels(array); Plugin.instance.tintedVignetteTex.Apply(); Plugin.instance.showVignette = true; } goto IL_01cb; case 1: <>1__state = -1; if (!gasterTrigger.gaster.isWeird) { MonoSingleton<NewMovement>.Instance.modNoJump = true; MonoSingleton<NewMovement>.Instance.modNoDashSlide = true; } goto IL_01cb; case 2: { <>1__state = -1; break; } IL_01cb: if (!MonoSingleton<NewMovement>.Instance.dead && MonoSingleton<StatsManager>.Instance.restarts == gasterTrigger.restarts && !GameStateManager.Instance.IsStateActive("pit-falling")) { <>2__current = (object)new WaitForEndOfFrame(); <>1__state = 1; return true; } if (MonoSingleton<NewMovement>.Instance.dead || MonoSingleton<StatsManager>.Instance.restarts != gasterTrigger.restarts) { MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage("Bad luck.", "", "", 0, false, false, true); Plugin.popupSfx.Play(); <>2__current = null; <>1__state = 2; return true; } break; } if (GameStateManager.Instance.IsStateActive("pit-falling")) { string[] array2 = new string[3] { "boy", "girl", "dog" }; string text = "job"; if (Random.Range(0, 100) == 0) { text = array2[Random.Range(0, array2.Length)]; } MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage("Good " + text + ".", "", "", 0, false, false, true); gasterTrigger.TriggerGaster(); } MonoSingleton<NewMovement>.Instance.modNoJump = false; MonoSingleton<NewMovement>.Instance.modNoDashSlide = false; gasterTrigger.collecting = false; collectingObsidian = false; Plugin.instance.showVignette = false; ((Component)gasterTrigger).GetComponent<GasterRequirements>().SetVisibility(visible: true); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public Gaster gaster; private bool collecting; public static bool collectingObsidian; private int restarts; public void OnTriggerEnter(Collider other) { if (((Component)other).tag != "Player" || gaster.cosmeticOnly || collecting) { return; } if (gaster.isObsidian) { if (!collectingObsidian) { ((MonoBehaviour)this).StartCoroutine(WaitTillEndOfLevelOrPlayerDeath()); } } else { TriggerGaster(); } } public void OnDestroy() { collecting = false; collectingObsidian = false; Plugin.instance.showVignette = false; } [IteratorStateMachine(typeof(<WaitTillEndOfLevelOrPlayerDeath>d__6))] public IEnumerator WaitTillEndOfLevelOrPlayerDeath() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <WaitTillEndOfLevelOrPlayerDeath>d__6(0) { <>4__this = this }; } public void TriggerGaster() { //IL_00c1: Unknown result type (might be due to invalid IL or missing references) if (gaster.increasesDailyCount && !gaster.IsCollected()) { PlayerPrefs.SetInt(PlayerPrefsInformation.DailyCount(), PlayerPrefs.GetInt(PlayerPrefsInformation.DailyCount(), 0) + 1); MonoSingleton<HudMessageReceiver>.Instance.SendHudMessage($"Daily gasters count: {PlayerPrefs.GetInt(PlayerPrefsInformation.DailyCount())}", "", "", 0, false, false, true); } Plugin.gasterPopupAlpha = (gaster.IsCollected() ? 0.5f : 1f); gaster.SetCollected(); Plugin.gasterPopupStage = 1; Plugin.popupSfx.Play(); Plugin.forcedColor = gaster.displayColor; ((Component)this).transform.position = new Vector3(0f, 2000f, 0f); ((Component)this).gameObject.SetActive(false); MonoSingleton<TimeController>.Instance.ParryFlash(); PointsButton.DisableHint(); gaster.OnCollect.Invoke(); FirstRoomPatch.UpdateTerminal(); } } } namespace UltrakillStupid.Patches { [HarmonyPatch(typeof(BloodstainParent))] [HarmonyPatch("Start")] internal class BloodStainParentPatch { public static bool Prefix(BloodstainParent __instance) { //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) if (((Object)__instance).name == "1 - Starting Room" && SceneHelper.CurrentScene == "Tutorial") { FirstRoomPatch.SpawnRoom(((Component)__instance).transform, new Vector3(-4.5f, -0.01f, 22.69f), new Vector3(0f, 90f, 180f)); } if ((((Object)__instance).name == "1 - Starting Room" || ((Object)__instance).name == "1Alt - Short Starting Room") && SceneHelper.CurrentScene == "Level 0-1") { FirstRoomPatch.SpawnRoom(((Component)__instance).transform, new Vector3(-4.5f, -0.01f, 6.57f), new Vector3(0f, 90f, 180f)); } return true; } } [HarmonyPatch(typeof(HudMessage))] [HarmonyPatch("Start")] internal class HudMessagePatch { public static bool Prefix(HudMessage __instance) { if (((Object)__instance).name == "Hint 1" && __instance.message == "Something wicked this way comes." && ((Object)((Component)__instance).transform.parent.GetChild(3)).name == "Hint 2") { __instance.message = "Collect my gasters."; } return true; } } [HarmonyPatch(typeof(HudOpenEffect))] [HarmonyPatch("Awake")] internal class HudOpenEffectPatch { public static bool Prefix(HudOpenEffect __instance) { //IL_0043: Unknown result type (might be due to invalid IL or missing references) if (((Object)__instance).name == "Quit Mission") { GameObject obj = Object.Instantiate<GameObject>(((Component)__instance).gameObject, ((Component)__instance).transform.parent); obj.AddComponent<CommunityGasterButton>(); obj.transform.position = new Vector3(960f, 175f, 0f); } return true; } } [HarmonyPatch(typeof(LeaderboardController))] [HarmonyPatch("SubmitLevelScore")] internal class LeaderboardControllerPatch { public static bool Prefix(string levelName, int difficulty, float seconds, int kills, int style, int restartCount, bool pRank = false) { return true; } } [HarmonyPatch(typeof(FinalDoor))] [HarmonyPatch("Start")] internal class FirstRoomPatch { private static Vector3 defaultPos = new Vector3(12.16f, 2f, 35.3f); private static Vector3 defaultRot = new Vector3(0f, 315f, 0f); public static GameObject lastTemplate; public static GameObject lastEnemiesPanel; public static bool Prefix(FinalDoor __instance) { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) if (((Object)((Component)__instance).transform.parent.parent).name.Contains("FirstRoom")) { SpawnRoom(((Component)__instance).transform.parent, defaultPos, defaultRot); } return true; } public static void SpawnRoom(Transform parent, Vector3 pos, Vector3 rot) { //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_006e: 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_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_0283: Unknown result type (might be due to invalid IL or missing references) //IL_0288: Unknown result type (might be due to invalid IL or missing references) //IL_02a6: Unknown result type (might be due to invalid IL or missing references) //IL_02bc: Unknown result type (might be due to invalid IL or missing references) //IL_02c7: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_02e7: Unknown result type (might be due to invalid IL or missing references) //IL_02ec: 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_036c: Unknown result type (might be due to invalid IL or missing references) //IL_052f: Unknown result type (might be due to invalid IL or missing references) //IL_053e: Unknown result type (might be due to invalid IL or missing references) //IL_0543: Unknown result type (might be due to invalid IL or missing references) //IL_055e: Unknown result type (might be due to invalid IL or missing references) //IL_05ad: Unknown result type (might be due to invalid IL or missing references) //IL_05b2: Unknown result type (might be due to invalid IL or missing references) //IL_05cb: Unknown result type (might be due to invalid IL or missing references) //IL_05e1: Unknown result type (might be due to invalid IL or missing references) //IL_05ec: Unknown result type (might be due to invalid IL or missing references) //IL_05f7: Unknown result type (might be due to invalid IL or missing references) //IL_0605: Unknown result type (might be due to invalid IL or missing references) //IL_060a: Unknown result type (might be due to invalid IL or missing references) //IL_0640: Unknown result type (might be due to invalid IL or missing references) //IL_0645: Unknown result type (might be due to invalid IL or missing references) //IL_065e: Unknown result type (might be due to invalid IL or missing references) //IL_0674: Unknown result type (might be due to invalid IL or missing references) //IL_067f: Unknown result type (might be due to invalid IL or missing references) //IL_068a: Unknown result type (might be due to invalid IL or missing references) //IL_06a1: Unknown result type (might be due to invalid IL or missing references) //IL_06a6: Unknown result type (might be due to invalid IL or missing references) GameObject val = Object.Instantiate<GameObject>(Plugin.Ass<GameObject>("Assets/Prefabs/Levels/Shop.prefab"), parent); ((Object)val).name = "Gasters terminal"; GameObject obj = Object.Instantiate<GameObject>(((Component)Plugin.Ass<GameObject>("Assets/Prefabs/Levels/Shop Testament.prefab").transform.GetChild(4)).gameObject, val.transform); val.transform.localPosition = pos; val.transform.localEulerAngles = rot; obj.transform.localPosition = new Vector3(0f, 0f, 0.35f); obj.transform.localScale = new Vector3(0.86956507f, 0.86956525f, 0.86956525f); obj.transform.localEulerAngles = new Vector3(90f, 0f, 180f); ((Component)val.transform.GetChild(5)).gameObject.SetActive(false); ((Component)val.transform.GetChild(0)).GetComponent<AudioSource>().clip = Plugin.gasterTerminalMusicSfx; ((Component)val.transform.GetChild(1)).GetComponent<AudioSource>().clip = Plugin.gasterTerminalJingleSfx; Sprite sprite = Sprite.Create(Plugin.gasterTerminalIcon, new Rect(0f, 0f, (float)((Texture)Plugin.gasterTerminalIcon).width, (float)((Texture)Plugin.gasterTerminalIcon).height), new Vector2(0.5f, 0.5f)); GameObject gameObject = ((Component)val.transform.GetChild(2).GetChild(0).GetChild(6)).gameObject; ((Component)val.transform.GetChild(2).GetChild(0).GetChild(1)).GetComponent<TMP_Text>().text = "Find The Gaster"; ((Component)val.transform.GetChild(2).GetChild(0).GetChild(0)).GetComponent<Image>().sprite = sprite; if (Random.Range(0, 2500) < 500) { ((Component)val.transform.GetChild(2).GetChild(0).GetChild(1)).GetComponent<TMP_Text>().text = "Entry 17"; } val.GetComponent<BoxCollider>().size = Vector3.one; val.GetComponent<ShopZone>().tipOfTheDay = null; ((Component)gameObject.transform.GetChild(0)).gameObject.SetActive(true); ((Component)gameObject.transform.GetChild(1)).gameObject.SetActive(true); GameObject gameObject2 = ((Component)gameObject.transform.GetChild(1)).gameObject; ((Component)gameObject.transform.GetChild(1).GetChild(5).GetChild(0) .GetChild(0)).GetComponent<TMP_Text>().text = "<color=#FF4343>Submitted gasters</color> are manually verificated before becoming Daily gasters. <color=#FF4343>Hourly gasters</color> are a group of gasters that are yet to verify."; GameObject val2 = new GameObject("Background", new Type[1] { typeof(RectTransform) }); val2.transform.SetParent(gameObject2.transform.GetChild(5).GetChild(0), false); RectTransform component = val2.GetComponent<RectTransform>(); ((Transform)component).localPosition = new Vector3(0f, 0f, 0f); ((Transform)component).localRotation = Quaternion.identity; ((Transform)component).localScale = Vector3.one; component.sizeDelta = Vector2.op_Implicit(new Vector3(300f, 300f)); ((Transform)component).SetAsFirstSibling(); RawImage obj2 = val2.AddComponent<RawImage>(); obj2.texture = (Texture)(object)Plugin.gasterTerminalBackground; ((Graphic)obj2).color = new Color(1f, 1f, 1f, 0.2f); Button[] componentsInChildren = ((Component)((Component)gameObject.transform.GetChild(0).GetChild(1)).gameObject.transform).GetComponentsInChildren<Button>(); foreach (Button val3 in componentsInChildren) { ((Component)val3).GetComponent<RectTransform>().sizeDelta = new Vector2(207.5f, 40f); if (((Object)val3).name == "SandboxButton") { Object.Instantiate<GameObject>(((Component)val3).gameObject, ((Component)val3).transform.parent).AddComponent<PointsButton>(); Object.Instantiate<GameObject>(((Component)val3).gameObject, ((Component)val3).transform.parent).AddComponent<SellButton>(); Object.Instantiate<GameObject>(((Component)val3).gameObject, ((Component)val3).transform.parent).AddComponent<ToggleTransparencyButton>(); if (PlayerPrefs.GetInt("Gaster_BranchEnabled") != 0) { Object.Instantiate<GameObject>(((Component)val3).gameObject, ((Component)val3).transform.parent).AddComponent<ChangeGasterBranchButton>(); } Object.Instantiate<GameObject>(((Component)val3).gameObject, ((Component)val3).transform.parent).AddComponent<SpawnBookButton>(); ((Component)val3).gameObject.SetActive(false); } else if (((Object)val3).name == "EnemiesButton") { ((Component)((Component)val3).transform.GetChild(0)).GetComponent<TMP_Text>().text = "Gasters"; } else { ((Component)val3).gameObject.SetActive(false); } } GameObject gameObject3 = ((Component)gameObject.transform.GetChild(3)).gameObject; GameObject gameObject4 = ((Component)gameObject3.transform.GetChild(0)).gameObject; gameObject3.SetActive(true); ((Behaviour)gameObject3.GetComponent<EnemyInfoPage>()).enabled = false; ((Component)gameObject4.transform.GetChild(1)).GetComponent<TMP_Text>().text = "Gasters"; TMP_FontAsset font = ((Component)gameObject4.transform.GetChild(1)).GetComponent<TMP_Text>().font; GameObject gameObject5 = ((Component)gameObject4.transform.GetChild(5).GetChild(0).GetChild(0)).gameObject; GameObject gameObject6 = ((Component)gameObject5.transform.GetChild(0)).gameObject; GridLayoutGroup component2 = gameObject5.GetComponent<GridLayoutGroup>(); component2.cellSize *= new Vector2(3f, 0.5f); gameObject5.GetComponent<GridLayoutGroup>().constraintCount = 1; float y = gameObject5.GetComponent<GridLayoutGroup>().cellSize.y; ((Component)gameObject6.transform.GetChild(0).GetChild(0)).gameObject.SetActive(false); gameObject6.GetComponent<ShopButton>().deactivated = true; GameObject val4 = new GameObject("GasterImg", new Type[1] { typeof(RectTransform) }); val4.transform.SetParent(gameObject6.transform.GetChild(0), false); RectTransform component3 = val4.GetComponent<RectTransform>(); ((Transform)component3).localPosition = new Vector3(-105f, 0f, 0f); ((Transform)component3).localRotation = Quaternion.identity; ((Transform)component3).localScale = Vector3.one; component3.sizeDelta = Vector2.op_Implicit(new Vector3(y, y)); val4.AddComponent<RawImage>().texture = Plugin.instance.popupTex; GameObject val5 = new GameObject("GasterText", new Type[1] { typeof(RectTransform) }); val5.transform.SetParent(gameObject6.transform.GetChild(0), false); RectTransform component4 = val5.GetComponent<RectTransform>(); ((Transform)component4).localPosition = new Vector3(35f, 0f, 0f); ((Transform)component4).localRotation = Quaternion.identity; ((Transform)component4).localScale = Vector3.one; component4.sizeDelta = Vector2.op_Implicit(new Vector3(200f, y - 5f)); TextMeshProUGUI obj3 = val5.AddComponent<TextMeshProUGUI>(); ((TMP_Text)obj3).text = "Gaster"; ((TMP_Text)obj3).enableAutoSizing = true; ((TMP_Text)obj3).fontSizeMin = 18f; ((TMP_Text)obj3).fontSizeMax = 28f; ((TMP_Text)obj3).alignment = (TextAlignmentOptions)513; ((TMP_Text)obj3).font = font; gameObject6.SetActive(false); UpdateTerminal(gameObject6, gameObject4); } public static void UpdateTerminal() { if ((Object)(object)lastTemplate != (Object)null && (Object)(object)lastEnemiesPanel != (Object)null) { UpdateTerminal(lastTemplate, lastEnemiesPanel); } } public static void UpdateTerminal(GameObject template, GameObject enemiesPanel) { //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) lastTemplate = template; lastEnemiesPanel = enemiesPanel; Button[] componentsInChildren = ((Component)template.transform.parent).GetComponentsInChildren<Button>(); foreach (Button val in componentsInChildren) { if ((Object)(object)((Component)val).gameObject != (Object)(object)template.gameObject) { Object.Destroy((Object)(object)((Component)val).gameObject); } } List<Gaster> list = new List<Gaster>(); List<Gaster> list2 = new List<Gaster>(); List<Gaster> list3 = new List<Gaster>(); int num = -1; int num2 = 0; foreach (Gaster gaster in Plugin.instance.gasters) { if (gaster.IsCollected()) { list3.Add(gaster); } else { list2.Add(gaster); } } list.AddRange(list2); list.AddRange(list3); int num3 = 0; foreach (Gaster item in list) { GameObject obj = Object.Instantiate<GameObject>(template, template.transform.parent); Image component = ((Component)obj.transform.GetChild(0)).GetComponent<Image>(); RawImage component2 = ((Component)obj.transform.GetChild(0).GetChild(2)).GetComponent<RawImage>(); TMP_Text component3 = ((Component)obj.transform.GetChild(0).GetChild(3)).GetComponent<TMP_Text>(); Color? val2 = item.displayColor; if (!val2.HasValue) { val2 = Color.white; if (item.allowCheats) { val2 = new Color(0.5f, 0.5f, 1f, 1f); } } obj.gameObject.SetActive(true); Color value = val2.Value; value.a -= ((!item.IsCollected()) ? 0.5f : 0f); ((Graphic)component2).color = value; ((Graphic)component3).color = value; ((Graphic)component).color = value - new Color(0.3f, 0.3f, 0.3f, 0f); component3.text = item.displayName; num3++; if (SceneHelper.CurrentScene == item.level && num == -1 && !item.IsCollected()) { num = num2; } num2++; } if (num != -1) { ((Component)enemiesPanel.transform.GetChild(5).GetChild(1).GetChild(0)).GetComponent<Scrollbar>().value = 1f - (float)num / (float)(num3 - 1); } } } } namespace UltrakillStupid.Classes { public class BundlesManager : MonoBehaviour { public static AssetBundle gasterBundle; public void Awake() { Object.DontDestroyOnLoad((Object)(object)((Component)this).gameObject); Assembly executingAssembly = Assembly.GetExecutingAssembly(); string text = "UltrakillStupid.Assets.gasterassets.bundle"; using Stream stream = executingAssembly.GetManifestResourceStream(text); if (stream == null) { Plugin.LogError("Embedded resource '" + text + "' not found!"); return; } byte[] array = new byte[stream.Length]; stream.Read(array, 0, array.Length); gasterBundle = AssetBundle.LoadFromMemory(array); if ((Object)(object)gasterBundle != (Object)null) { Plugin.LogInfo("Loaded embedded AssetBundle!"); } else { Plugin.LogError("Failed to load AssetBundle from memory!"); } SetupAssets(); } public void SetupAssets() { //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown if ((Object)(object)gasterBundle == (Object)null) { Plugin.LogError("Gaster AssetBundle is null, cannot set up assets."); return; } Plugin.instance.vignetteTex = gasterBundle.LoadAsset<Texture2D>("vignette.png"); Plugin.instance.tintedVignetteTex = new Texture2D(((Texture)Plugin.instance.vignetteTex).width, ((Texture)Plugin.instance.vignetteTex).height); Plugin.instance.popupTex = (Texture)(object)gasterBundle.LoadAsset<Texture2D>("gasterPopup.png"); Plugin.instance.fadeTex = (Texture)(object)gasterBundle.LoadAsset<Texture2D>("fade.png"); Plugin.instance.gasterTex = gasterBundle.LoadAsset<Texture2D>("gaster.png"); Plugin.instance.popupTex.filterMode = (FilterMode)0; Plugin.instance.fadeTex.filterMode = (FilterMode)0; Plugin.popupSfx.clip = gasterBundle.LoadAsset<AudioClip>("alert.ogg"); Plugin.gasterAmbienceSfx = gasterBundle.LoadAsset<AudioClip>((PlayerPrefs.GetString("Gaster_Ambience_Remix") == "on") ? "gaster_ambience.ogg" : "gaster_remix.ogg"); Plugin.gasterTerminalJingleSfx = gasterBundle.LoadAsset<AudioClip>("gaster jingle"); Plugin.gasterTerminalMusicSfx = gasterBundle.LoadAsset<AudioClip>("take gaster - full + g"); Plugin.gasterTerminalIcon = gasterBundle.LoadAsset<Texture2D>("GasterTerminalIcon.png"); Plugin.gasterTerminalBackground = gasterBundle.LoadAsset<Texture2D>("FINDTHEGASTER_Portrait.png"); } public void OnDestroy() { AssetBundle obj = gasterBundle; if (obj != null) { obj.Unload(false); } } } internal class ChangeGasterBranchButton : MonoBehaviour { public enum GasterBranch { Default, Challenge, Test } public class GasterBranchClass { public GasterBranch branch; public string name; public Color color; public GasterBranchClass(GasterBranch b, string n, Color c) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) branch = b; name = n; color = c; } } public static ChangeGasterBranchButton instance; public TMP_Text childText; public Button button; public ShopButton shopButton; private string prefix = "Gaster branch: "; pub