using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using HarmonyLib; using Microsoft.CodeAnalysis; using PeakAMap.Core; using PeakAMap.UI; using PeakAMap.Utilities; using TMPro; using UnityEngine; using UnityEngine.Events; using UnityEngine.SceneManagement; using UnityEngine.UI; using Zorro.ControllerSupport; using Zorro.Core; using Zorro.UI.Modal; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: IgnoresAccessChecksTo("Assembly-CSharp")] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("com.github.snowybunny.PeakAMap")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.2.2.0")] [assembly: AssemblyInformationalVersion("1.2.2+e0278e735ef709233cc6c607e2bbcdc3201a2e62")] [assembly: AssemblyProduct("com.github.snowybunny.PeakAMap")] [assembly: AssemblyTitle("PeakAMap")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.2.2.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace BepInEx { [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)] [Conditional("CodeGeneration")] internal sealed class BepInAutoPluginAttribute : Attribute { public BepInAutoPluginAttribute(string? id = null, string? name = null, string? version = null) { } } } namespace BepInEx.Preloader.Core.Patching { [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)] [Conditional("CodeGeneration")] internal sealed class PatcherAutoPluginAttribute : Attribute { public PatcherAutoPluginAttribute(string? id = null, string? name = null, string? version = null) { } } } namespace PeakAMap { [BepInPlugin("com.github.snowybunny.PeakAMap", "PeakAMap", "1.2.2")] public class Plugin : BaseUnityPlugin { private readonly Harmony _harmony = new Harmony("com.github.snowybunny.PeakAMap"); public const string Id = "com.github.snowybunny.PeakAMap"; internal static ManualLogSource Log { get; private set; } internal static PluginInfo LoadedInfo { get; private set; } public static string Name => "PeakAMap"; public static string Version => "1.2.2"; private void Awake() { Log = ((BaseUnityPlugin)this).Logger; LoadedInfo = ((BaseUnityPlugin)this).Info; ((BaseUnityPlugin)this).Config.SaveOnConfigSet = true; UserConfig.Initialize(((BaseUnityPlugin)this).Config); _harmony.PatchAll(Assembly.GetExecutingAssembly()); } } } namespace PeakAMap.Utilities { [HarmonyPatch] public static class BoardingPassUI { private static bool s_initialized; public static BoardingPass boardingPass { get; private set; } public static Image Panel { get; private set; } public static GameObject InnerBoardingPass { get; private set; } public static Button StartGameButton { get; private set; } public static Button IncrementAscentButton { get; private set; } public static GameObject Title { get; private set; } public static GameObject Plane { get; private set; } public static TMP_Text PlayerName { get; private set; } public static Vector2 Pivot { get; private set; } public static GameObject BlueTop { get; private set; } public static CustomOptionsWindow customOptionsWindow { get; private set; } public static Button CloseButtonCustom { get; private set; } public static GameObject CustomWindowPanel { get; private set; } public static GameObject CustomOptions { get; private set; } public static GameObject Background { get; private set; } public static GameObject Border { get; private set; } public static Button MiniRunButton { get; private set; } public static Button CustomOptionsButton { get; private set; } public static CustomOptionItemToggle CustomOptionItemTogglePrefab { get; private set; } public static TextMeshProUGUI AscentDescription { get; private set; } private static void Initialize() { //IL_00af: Unknown result type (might be due to invalid IL or missing references) boardingPass = GUIManager.instance.boardingPass; Panel = boardingPass.playerName.transform.parent.GetImage(); InnerBoardingPass = ((Component)((Component)Panel).transform.parent).gameObject; StartGameButton = boardingPass.startGameButton; IncrementAscentButton = boardingPass.incrementAscentButton; Title = ((Component)Panel).gameObject.QueryChildren("BOARDING PASS"); Plane = ((Component)Panel).gameObject.QueryChildren("Plane"); PlayerName = boardingPass.playerName; Pivot = InnerBoardingPass.GetComponent().pivot; BlueTop = ((Component)Panel).gameObject.QueryChildren("BlueTop"); customOptionsWindow = boardingPass.customOptionsWindow; CloseButtonCustom = customOptionsWindow.closeButtonCustom; CustomWindowPanel = ((Component)((Component)CloseButtonCustom).transform.parent).gameObject; CustomOptions = ((Component)CustomWindowPanel.transform.parent).gameObject; Background = ((Component)customOptionsWindow).gameObject.QueryChildren("BG"); Border = CustomOptions.QueryChildren("Border"); MiniRunButton = customOptionsWindow.miniRunButton; CustomOptionsButton = boardingPass.customOptionsButton; CustomOptionItemTogglePrefab = customOptionsWindow.customOptionItemTogglePrefab; AscentDescription = ((Component)CustomOptionsButton).transform.parent.QueryChildren("Description").GetTMPro(); } [HarmonyPatch(typeof(AirportCheckInKiosk), "Start")] [HarmonyPostfix] private static void InitializeBoardingPassUI() { if (!s_initialized) { Initialize(); s_initialized = true; } } } public static class GameObjectUtility { public static RectTransform GetRectTransform(this GameObject gameObject) { return gameObject.GetComponent(); } public static Image GetImage(this GameObject gameObject) { return gameObject.GetComponent(); } public static Color GetColor(this GameObject gameObject) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) return gameObject.GetComponent().color; } public static TextMeshProUGUI GetTMPro(this GameObject gameObject) { return gameObject.GetComponent(); } public static GameObject QueryChildren(this GameObject gameObject, string[] queries) { return ((Component)gameObject.transform.QueryChildren(queries)).gameObject; } public static GameObject QueryChildren(this GameObject gameObject, string queryOrPath) { return ((Component)gameObject.transform.QueryChildren(queryOrPath)).gameObject; } public static T GetOrAddComponent(this GameObject gameObject) where T : Component { T result = default(T); if (gameObject.TryGetComponent(ref result)) { return result; } return gameObject.AddComponent(); } public static Component GetOrAddComponent(this GameObject gameObject, Type type) { Component result = default(Component); if (gameObject.TryGetComponent(type, ref result)) { return result; } return gameObject.AddComponent(type); } public static Component GetComponentInChildrenActiveSelf(this GameObject gameObject) where T : Component { Component[] componentsInChildren = (Component[])(object)gameObject.GetComponentsInChildren(true); Component[] array = componentsInChildren; foreach (Component val in array) { if (val.gameObject.activeSelf) { return val; } } return null; } public static GameObject PasteComponent(this GameObject gameObject, T component, params string[] exclude) where T : Component { Type type = ((object)component).GetType(); Component orAddComponent = gameObject.GetOrAddComponent(type); PropertyInfo[] properties = type.GetProperties(); PropertyInfo[] array = properties; foreach (PropertyInfo propertyInfo in array) { if (propertyInfo.CanRead && propertyInfo.CanWrite && !exclude.Contains(propertyInfo.Name)) { try { propertyInfo.SetValue(orAddComponent, propertyInfo.GetValue(component)); } catch { } } } return gameObject; } public static string StripCloneInName(this GameObject gameObject) { string text = "(Clone)"; if (((Object)gameObject).name.EndsWith(text)) { int startIndex = ((Object)gameObject).name.Length - text.Length; ((Object)gameObject).name = ((Object)gameObject).name.Remove(startIndex); } return ((Object)gameObject).name; } } public class JsonExtended { private static HashSet s_startDelimiters = new HashSet { '"', '{', '(', '[' }; private static HashSet s_endDelimiters = new HashSet { '"', '}', ')', ']' }; private static string s_tab = " "; public static string Tab { get { return s_tab; } set { s_tab = value; } } public static string ListToJson(List items, bool prettyPrint = false) { return ArrayToJson(items.ToArray(), prettyPrint); } public static List ListFromJson(string json) { return ArrayFromJson(json).ToList(); } public static string ArrayToJson(T[] items, bool prettyPrint = false) { string[] array = new string[items.Length]; for (int i = 0; i < items.Length; i++) { array[i] = JsonUtility.ToJson((object)items[i], prettyPrint); } return EncaseCombine(array, '[', ']', prettyPrint); } public static T[] ArrayFromJson(string json) { string[] array = SplitSections(json, '[', ']'); T[] array2 = new T[array.Length]; for (int i = 0; i < array2.Length; i++) { array2[i] = JsonUtility.FromJson(array[i]); } return array2; } public static string CombineJson(bool prettyPrint, params string[] objectJsons) { char c = objectJsons[0][0]; string obj = objectJsons[0]; char c2 = obj[obj.Length - 1]; string[] array = new string[objectJsons.Length]; for (int i = 0; i < objectJsons.Length; i++) { int num = i; string text = objectJsons[i]; array[num] = text.Substring(2, text.Length - 2 - 2); } return c + "\n" + string.Join(",\n", array) + "\n" + c2; } public static string EncaseCombine(string[] objectJsons, char start, char end, bool prettyPrint = false) { if (!prettyPrint) { return start + string.Join(",", objectJsons) + end; } string text = start + "\n"; for (int i = 0; i < objectJsons.Length; i++) { string[] array = objectJsons[i].Split("\n"); for (int j = 0; j < array.Length; j++) { text = ((j >= array.Length - 1) ? (text + Tab + array[j]) : (text + Tab + array[j] + "\n")); } if (i < objectJsons.Length - 1) { text += ",\n"; } } return text + "\n" + end; } public static string CreateJsonObject(string key, string value, bool prettyPrint = false) { if (!prettyPrint) { return "{\"" + key + "\":" + value + "}"; } string text = "\"" + key + "\": " + value; return EncaseCombine(new string[1] { text }, '{', '}', prettyPrint); } public static string[] SplitSections(string json, char start, char end, bool prettyPrint = false) { List list = new List(); string text = ""; int num = _startSectionIndex(json, start); int num2 = _endSectionIndex(json, end); int num3 = 0; bool flag = false; for (int i = num; i <= num2; i++) { char c = json[i - 1]; char c2 = json[i]; if (c2 == '"' && c != '\\') { num3 = ((!flag) ? (num3 + 1) : (num3 - 1)); flag = !flag; text += c2; } else if (flag) { text += c2; } else if (char.IsWhiteSpace(c2)) { if (prettyPrint) { text += c2; } } else if (c2 == ',' && num3 == 0) { list.Add(text); text = ""; } else if (s_startDelimiters.Contains(c2)) { num3++; text += c2; } else if (s_endDelimiters.Contains(c2)) { num3--; text += c2; } else { text += c2; } } list.Add(text); return list.ToArray(); } public static string GetValueFromJson(string json, string key, bool prettyPrint = false) { string[] array = SplitSections(json, '{', '}', prettyPrint); for (int i = 0; i < array.Length; i++) { if (array[i].Contains(key)) { int num = _startSectionIndex(array[i], ':'); string text = array[i]; int num2 = num; return text.Substring(num2, text.Length - num2); } } return ""; } private static int _startSectionIndex(string text, char target) { bool started = false; for (int i = 0; i < text.Length; i++) { char currChar = text[i]; if (_foundChar(ref started, currChar, target)) { return i + 1; } } return -1; } private static int _endSectionIndex(string text, char target) { bool started = false; for (int num = text.Length - 1; num > -1; num--) { char currChar = text[num]; if (_foundChar(ref started, currChar, target)) { return num - 1; } } return -1; } private static bool _foundChar(ref bool started, char currChar, char target) { if (!started) { started = currChar == target; } return started; } } [HarmonyPatch] public static class MainMenuUI { private static bool s_initialized; public static GameObject Dropdown { get; private set; } public static GameObject SettingsBackButton { get; private set; } public static TextMeshProUGUI VersionTMPro { get; private set; } private static void Initialize(MainMenu instance) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Expected O, but got Unknown GameObject gameObject = ((Component)instance.credits.transform.parent.parent).gameObject; GameObject gameObject2 = ((Component)instance.credits.transform.parent).gameObject; GameObject val = new GameObject("MainMenuReference"); Dropdown = Object.Instantiate(gameObject.QueryChildren("FirstTimeSetupPage/SettingParent/ENUM DROPDOWN/Dropdown")); Dropdown.transform.SetParent(val.transform, false); SettingsBackButton = Object.Instantiate(gameObject.QueryChildren("SettingsPage/SettingsPageShared/UI_MainMenuButton_LeaveGame (2)")); SettingsBackButton.transform.SetParent(val.transform, false); VersionTMPro = Object.Instantiate(gameObject2.QueryChildren("Version").GetTMPro()); ((TMP_Text)VersionTMPro).transform.SetParent(val.transform, false); DontDestroy.Add(val); } [HarmonyPatch(typeof(MainMenu), "Start")] [HarmonyPostfix] private static void InitializeMainMenu(MainMenu __instance) { if (!s_initialized) { Initialize(__instance); s_initialized = true; } } } public static class MapBakerUtility { public static bool ValidSelectedBiomes(this MapBaker instance) { return instance.selectedBiomes.Count == instance.ScenePaths.Length; } } [HarmonyPatch] public static class PassportUI { private static bool s_initialized; public static PassportManager passportManager { get; private set; } public static TextMeshProUGUI PassportText { get; private set; } private static void Initialize() { passportManager = PassportManager.instance; PassportText = passportManager.uiObject.QueryChildren("Canvas/Panel/Panel/BG/Portrait").GetComponentInChildren(); } [HarmonyPatch(typeof(AirportCheckInKiosk), "Start")] [HarmonyPostfix] private static void InitializePassportUI() { if (!s_initialized) { Initialize(); s_initialized = true; } } } public static class TransformUtility { public static Color GetColor(this Transform transform) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) return ((Component)transform).GetComponent().color; } public static Image GetImage(this Transform transform) { return ((Component)transform).GetComponent(); } public static TextMeshProUGUI GetTMPro(this Transform transform) { return ((Component)transform).GetComponent(); } public static Transform FindFromChildren(string path) { string[] array = path.Split("/"); Transform transform = GameObject.Find(array[0]).transform; return transform.QueryChildren(array[1..]); } public static Transform QueryChildren(this Transform current, string[] queries) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown if (queries.Length == 0) { return current; } foreach (Transform item in current) { Transform val = item; if (((Object)val).name.Equals(queries[0])) { if (queries.Length == 1) { return val; } return val.QueryChildren(queries[1..]); } } if (queries.Length == 1 && string.IsNullOrEmpty(queries[0])) { return current; } Plugin.Log.LogWarning((object)("Cannot find " + queries[0] + " in " + ((Object)current).name + ". Returned null")); return null; } public static Transform QueryChildren(this Transform current, string queryOrPath) { string[] queries = queryOrPath.Split("/"); return current.QueryChildren(queries); } public static Transform SetParentAndScale(this Transform child, Transform parent, bool worldPositionStays = true) { //IL_0027: Unknown result type (might be due to invalid IL or missing references) child.SetParent(parent, worldPositionStays); RectTransform val = default(RectTransform); if (((Component)child).gameObject.TryGetComponent(ref val)) { ((Transform)val).localScale = new Vector3(1f, 1f, 1f); } return child; } } } namespace PeakAMap.UI { internal sealed class ConfigEntryTogglePrefab { private static readonly ConfigEntryTogglePrefab _instance; public static ConfigEntryTogglePrefab Instance => _instance; public GameObject gameObject { get; private set; } private ConfigEntryTogglePrefab() { Initialize(); } static ConfigEntryTogglePrefab() { _instance = new ConfigEntryTogglePrefab(); } private void Initialize() { gameObject = SetConfigEntryToggle(); DontDestroy.Add(gameObject); } private GameObject SetConfigEntryToggle() { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_0158: 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_0178: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) GameObject val = ((Component)BoardingPassUI.CustomOptionItemTogglePrefab).gameObject; GameObject val2 = Object.Instantiate(val); ((Object)val2).name = "ConfigEntryToggle"; CustomOptionItemToggle component = val2.GetComponent(); Object.DestroyImmediate((Object)(object)component); RectTransform rectTransform = val2.GetRectTransform(); rectTransform.anchoredPosition = new Vector2(0f, 0f); rectTransform.pivot = new Vector2(0.5f, 0.5f); rectTransform.anchorMin = new Vector2(0f, 0f); rectTransform.anchorMax = new Vector2(1f, 1f); TextMeshProUGUI componentInChildren = val2.GetComponentInChildren(); Image val3 = ((Component)rectTransform).gameObject.QueryChildren("Toggle/Background")?.GetImage(); Image val4 = ((val3 != null) ? ((Component)val3).transform.GetChild(0).GetImage() : null); Image val5 = ((val3 == null) ? null : ((Component)val3).transform.parent.QueryChildren("Image")?.GetImage()); if ((Object)(object)val3 == (Object)null || (Object)(object)val4 == (Object)null || (Object)(object)val5 == (Object)null) { return val2; } ((Graphic)componentInChildren).color = MapsBoardUI.MainFontColor; ((Graphic)val3).color = MapsBoardUI.MainFontColor; ((Graphic)val4).color = MapsBoardUI.AccentColor; ((Graphic)val5).color = MapsBoardUI.Cell1Color; RectTransform rectTransform2 = ((Component)val5).gameObject.GetRectTransform(); rectTransform2.sizeDelta = new Vector2(-40f, rectTransform2.sizeDelta.y); rectTransform2.anchoredPosition = new Vector2(0f, 0f); RectTransform rectTransform3 = ((Component)componentInChildren).gameObject.GetRectTransform(); rectTransform3.anchoredPosition = new Vector2(-20f, 0f); Object.DestroyImmediate((Object)(object)((Component)componentInChildren).gameObject.GetComponent()); return val2; } } internal sealed class DontDestroy { private static readonly DontDestroy _instance; public static DontDestroy Instance => _instance; public GameObject gameObject { get; private set; } private DontDestroy() { Initialize(); } static DontDestroy() { _instance = new DontDestroy(); } private void Initialize() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown gameObject = new GameObject("PeakAMap"); Object.DontDestroyOnLoad((Object)(object)gameObject); } public static void Add(GameObject child) { child.transform.SetParent(Instance.gameObject.transform); } } public sealed class LoadingMapsScreenPrefab { private static readonly LoadingMapsScreenPrefab _instance; public static LoadingMapsScreenPrefab Instance => _instance; public GameObject Description { get; set; } public GameObject QuitButton { get; set; } public GameObject gameObject { get; set; } private LoadingMapsScreenPrefab() { Initialize(); } static LoadingMapsScreenPrefab() { _instance = new LoadingMapsScreenPrefab(); } private void Initialize() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Expected O, but got Unknown gameObject = new GameObject("CustomLoadingMapsUI", new Type[1] { typeof(RectTransform) }); Description = CreateDescription(gameObject); QuitButton = CreateQuitButton(gameObject); DontDestroy.Add(gameObject); } public void Instantiate(GameObject? parent = null) { Instantiate(parent, out GameObject _, out GameObject _); } public void Instantiate(GameObject? parent, out GameObject? description, out GameObject? cancelButton) { //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) description = null; cancelButton = null; if (parent == null) { parent = GetLoadingScreen(); } if ((Object)(object)parent == (Object)null) { Plugin.Log.LogError((object)"No valid parent object was found. Cannot add description and cancel button."); return; } description = Object.Instantiate(Description); description.transform.SetParentAndScale(parent.transform, worldPositionStays: false); RectTransform rectTransform = description.GetRectTransform(); rectTransform.anchoredPosition = new Vector2(35f, -20f); cancelButton = Object.Instantiate(QuitButton); cancelButton.transform.SetParentAndScale(parent.transform, worldPositionStays: false); RectTransform rectTransform2 = cancelButton.GetRectTransform(); rectTransform2.anchoredPosition = new Vector2(-30f, -25f); } private GameObject? GetLoadingScreen() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) Scene scene = ((Component)GameHandler.Instance).gameObject.scene; GameObject[] rootGameObjects = ((Scene)(ref scene)).GetRootGameObjects(); GameObject result = null; for (int i = 0; i < ((Scene)(ref scene)).rootCount; i++) { if (((Object)rootGameObjects[i]).name.Equals("LoadingScreenSimple(Clone)")) { result = rootGameObjects[i]; } } return result; } private GameObject CreateDescription(GameObject parent) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("Description", new Type[2] { typeof(RectTransform), typeof(TextMeshProUGUI) }); val.transform.SetParentAndScale(parent.transform, worldPositionStays: false); RectTransform rectTransform = val.GetRectTransform(); rectTransform.sizeDelta = new Vector2(500f, 100f); rectTransform.anchorMin = new Vector2(0f, 1f); rectTransform.anchorMax = new Vector2(0f, 1f); rectTransform.pivot = new Vector2(0f, 1f); TextMeshProUGUI tMPro = val.GetTMPro(); TextMeshProUGUI versionTMPro = MainMenuUI.VersionTMPro; ((TMP_Text)tMPro).text = "COULD NOT FIND FULL FILE FOR THIS PATCH'S MAP ROTATION.\nNOW SEARCHING FOR MAP INFO MANUALLY..."; ((TMP_Text)tMPro).font = ((TMP_Text)versionTMPro).font; ((Graphic)tMPro).color = ((Graphic)versionTMPro).color; ((TMP_Text)tMPro).fontSize = 24f; ((TMP_Text)tMPro).horizontalAlignment = (HorizontalAlignmentOptions)1; ((TMP_Text)tMPro).verticalAlignment = (VerticalAlignmentOptions)256; ((TMP_Text)tMPro).textWrappingMode = (TextWrappingModes)0; ((TMP_Text)tMPro).overflowMode = (TextOverflowModes)0; ((TMP_Text)tMPro).lineSpacing = 15f; return val; } private GameObject CreateQuitButton(GameObject parent) { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) GameObject val = Object.Instantiate(MainMenuUI.SettingsBackButton); val.transform.SetParentAndScale(parent.transform, worldPositionStays: false); RectTransform rectTransform = val.GetRectTransform(); rectTransform.anchorMin = new Vector2(1f, 1f); rectTransform.anchorMax = new Vector2(1f, 1f); rectTransform.pivot = new Vector2(1f, 1f); Button val2 = default(Button); val.TryGetComponent