Decompiled source of OnlineFlights v1.3.0
OnlineFlights.dll
Decompiled 2 months ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Globalization; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Text; using System.Text.RegularExpressions; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using DG.Tweening; using DG.Tweening.Core; using DG.Tweening.Plugins.Options; using HarmonyLib; using Microsoft.CodeAnalysis; using OnlineFlights.Models; using OnlineFlights.Network; using OnlineFlights.Patches; using OnlineFlights.UI; using OnlineFlights.Utils; using Peak.UI; using Photon.Pun; using Photon.Realtime; using Steamworks; using TMPro; using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.Events; using UnityEngine.Networking; using UnityEngine.SceneManagement; using UnityEngine.UI; using Zorro.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: IgnoresAccessChecksTo("Assembly-CSharp-firstpass")] [assembly: IgnoresAccessChecksTo("Assembly-CSharp")] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("OnlineFlights")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("OnlineFlights")] [assembly: AssemblyTitle("OnlineFlights")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [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 OnlineFlights { [BepInPlugin("com.peakmod.onlineflights", "联机航班", "1.3.0")] public class Plugin : BaseUnityPlugin { internal static ManualLogSource Log; internal static Plugin Instance; internal ConfigEntry<bool> EnablePublicLobby; internal ConfigEntry<string> CustomRoomName; internal ConfigEntry<string> RoomPassword; internal ConfigEntry<string> RoomDescription; internal ConfigEntry<float> PanelWidth; internal ConfigEntry<float> PanelHeight; internal ConfigEntry<float> PanelPosX; internal ConfigEntry<float> PanelPosY; internal ConfigEntry<bool> EnableLog; internal static CSteamID CurrentLobbyId = CSteamID.Nil; internal static bool PendingStickyOpen; private Harmony _harmony; private Callback<LobbyCreated_t> _lobbyCreatedCallback; private Callback<LobbyEnter_t> _lobbyEnterCallback; private Coroutine _autoOpenCoroutine; private const float OPEN_DELAY_SEC = 2.2f; private void Awake() { Log = ((BaseUnityPlugin)this).Logger; Instance = this; EnablePublicLobby = ((BaseUnityPlugin)this).Config.Bind<bool>("大厅设置", "公开大厅", true, "将创建的 Steam 大厅设为公开,允许其他玩家搜索发现并加入(无需 Steam 好友)"); CustomRoomName = ((BaseUnityPlugin)this).Config.Bind<string>("房间设置", "自定义房间名", "", "自定义房间显示名称(留空则使用默认名:房主名的房间)"); RoomPassword = ((BaseUnityPlugin)this).Config.Bind<string>("房间设置", "房间密码", "", "设置房间密码,其他玩家需输入密码才能加入(留空=无限制)"); RoomDescription = ((BaseUnityPlugin)this).Config.Bind<string>("房间设置", "房间介绍", "Bing Bong~Bing Bong~", "房间介绍文本,显示在航班卡片的滚动栏中"); PanelWidth = ((BaseUnityPlugin)this).Config.Bind<float>("界面设置", "面板宽度", 840f, "航班大厅面板宽度(像素)"); PanelHeight = ((BaseUnityPlugin)this).Config.Bind<float>("界面设置", "面板高度", 480f, "航班大厅面板高度(像素)"); PanelPosX = ((BaseUnityPlugin)this).Config.Bind<float>("界面设置", "面板X偏移", 700f, "面板中心相对屏幕中心的水平偏移(像素)"); PanelPosY = ((BaseUnityPlugin)this).Config.Bind<float>("界面设置", "面板Y偏移", 0f, "面板中心相对屏幕中心的垂直偏移(像素)"); EnableLog = ((BaseUnityPlugin)this).Config.Bind<bool>("开发者", "启用日志", false, "启用后记录加入过的房间信息"); CustomRoomName.SettingChanged += delegate { UpdateLobbyMetadata(); }; RoomPassword.SettingChanged += delegate { UpdateLobbyMetadata(); }; RoomDescription.SettingChanged += delegate { UpdateLobbyMetadata(); }; PanelWidth.SettingChanged += delegate { FlightsPanel.Instance?.UpdateSize(); }; PanelHeight.SettingChanged += delegate { FlightsPanel.Instance?.UpdateSize(); }; PanelPosX.SettingChanged += delegate { FlightsPanel.Instance?.UpdatePosition(); }; PanelPosY.SettingChanged += delegate { FlightsPanel.Instance?.UpdatePosition(); }; _harmony = Harmony.CreateAndPatchAll(Assembly.GetExecutingAssembly(), "com.peakmod.onlineflights"); _lobbyCreatedCallback = Callback<LobbyCreated_t>.Create((DispatchDelegate<LobbyCreated_t>)OnLobbyCreated); _lobbyEnterCallback = Callback<LobbyEnter_t>.Create((DispatchDelegate<LobbyEnter_t>)OnLobbyEnter); SceneManager.sceneLoaded += OnSceneLoaded; Log.LogInfo((object)string.Format("[OnlineFlights] v{0} 已加载 (公开={1})", "1.3.0", EnablePublicLobby.Value)); } private void OnSceneLoaded(Scene scene, LoadSceneMode mode) { try { if (!(((Scene)(ref scene)).name.ToLowerInvariant() == "title")) { if (_autoOpenCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(_autoOpenCoroutine); _autoOpenCoroutine = null; } FlightsPanel.Instance?.Close(); PendingStickyOpen = false; return; } PendingStickyOpen = true; if (_autoOpenCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(_autoOpenCoroutine); } _autoOpenCoroutine = ((MonoBehaviour)this).StartCoroutine(AutoOpenWhenReady()); try { MainMenuPageHandler val = Object.FindObjectOfType<MainMenuPageHandler>(); if ((Object)(object)val != (Object)null && (Object)(object)FlightsPanel.Instance != (Object)null) { FlightsPanel.Instance.SubscribePageTransitions((UIPageHandler)(object)val); } } catch { } } catch { } } private static bool IsMenuReady() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Invalid comparison between Unknown and I4 if (!PhotonNetwork.OfflineMode) { return (int)PhotonNetwork.NetworkClientState == 15; } return true; } private IEnumerator AutoOpenWhenReady() { float timeout = 20f; while (timeout > 0f) { yield return null; timeout -= Time.unscaledDeltaTime; if (IsMenuReady() && !((Object)(object)FlightsPanel.Instance == (Object)null)) { break; } } if (!(timeout <= 0f)) { yield return (object)new WaitForSecondsRealtime(2.2f); if ((Object)(object)FlightsPanel.Instance != (Object)null && !FlightsPanel.Instance.IsOpen) { FlightsPanel.Instance.Open(); } PendingStickyOpen = false; _autoOpenCoroutine = null; } } private void OnLobbyCreated(LobbyCreated_t result) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Invalid comparison between Unknown and I4 //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) try { if ((int)result.m_eResult == 1) { CurrentLobbyId = new CSteamID(result.m_ulSteamIDLobby); Log.LogInfo((object)$"[OnlineFlights] 大厅创建成功,ID: {CurrentLobbyId}"); ((MonoBehaviour)this).StartCoroutine(LobbyMetadataWriter.WriteOwnerInfoToLobby((MonoBehaviour)(object)this)); ((MonoBehaviour)this).StartCoroutine(LobbyMetadataWriter.UpdateBiomeAscentLoop((MonoBehaviour)(object)this)); } else { Log.LogWarning((object)$"[OnlineFlights] 大厅创建回调结果: {result.m_eResult}"); } } catch (Exception ex) { Log.LogError((object)("[OnlineFlights] OnLobbyCreated 异常: " + ex.Message)); } } private void OnLobbyEnter(LobbyEnter_t result) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) try { CSteamID val = default(CSteamID); ((CSteamID)(ref val))..ctor(result.m_ulSteamIDLobby); if (!(val == CSteamID.Nil) && !(val == CurrentLobbyId)) { CurrentLobbyId = val; Log.LogInfo((object)$"[OnlineFlights] 已进入大厅,ID: {CurrentLobbyId}"); } } catch (Exception ex) { Log.LogWarning((object)("[OnlineFlights] OnLobbyEnter 异常: " + ex.Message)); } } private void UpdateLobbyMetadata() { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) if (CurrentLobbyId == CSteamID.Nil) { return; } try { if (!string.IsNullOrEmpty(CustomRoomName.Value)) { SteamMatchmaking.SetLobbyData(CurrentLobbyId, "customRoomName", CustomRoomName.Value); } if (!string.IsNullOrEmpty(RoomPassword.Value)) { SteamMatchmaking.SetLobbyData(CurrentLobbyId, "roomCode", RoomPassword.Value); } else { SteamMatchmaking.SetLobbyData(CurrentLobbyId, "roomCode", ""); } SteamMatchmaking.SetLobbyData(CurrentLobbyId, "description", RoomDescription.Value ?? ""); Log.LogInfo((object)"[OnlineFlights] 元数据已更新"); } catch (Exception ex) { Log.LogDebug((object)("[OnlineFlights] UpdateLobbyMetadata 异常: " + ex.Message)); } } private void OnDestroy() { Harmony harmony = _harmony; if (harmony != null) { harmony.UnpatchSelf(); } _lobbyCreatedCallback?.Unregister(); _lobbyEnterCallback?.Unregister(); SceneManager.sceneLoaded -= OnSceneLoaded; FlightsPanel.Instance?.UnsubscribePageTransitions(); SteamAvatarLoader.ClearCache(); Log.LogInfo((object)"[OnlineFlights] 已卸载"); } } internal static class PluginInfo { public const string PLUGIN_GUID = "com.peakmod.onlineflights"; public const string PLUGIN_NAME = "联机航班"; public const string PLUGIN_VERSION = "1.3.0"; } } namespace OnlineFlights.Utils { internal static class BiomeNames { public static string FromStateName(string stateName) { if (string.IsNullOrEmpty(stateName)) { return ""; } if (stateName[0] == '#') { stateName = stateName.Substring(1); } return stateName switch { "Status_Shore" => L10N.T("biome_shore"), "Status_Tropics" => L10N.T("biome_tropics"), "Status_Alpine" => L10N.T("biome_alpine"), "Status_Mesa" => L10N.T("biome_mesa"), "Status_Caldera" => L10N.T("biome_caldera"), "Status_Kiln" => L10N.T("biome_kiln"), "Status_Peak" => L10N.T("biome_peak"), "Status_Roots" => L10N.T("biome_roots"), "Status_Airport" => L10N.T("biome_airport"), "Status_MainMenu" => L10N.T("biome_menu"), _ => "", }; } public static string FromSceneName(string sceneName) { if (string.IsNullOrEmpty(sceneName)) { return ""; } return sceneName switch { "Airport" => L10N.T("biome_airport"), "WilIsland" => L10N.T("scene_climbing"), "Title" => L10N.T("biome_menu"), "Pretitle" => L10N.T("scene_loading"), _ => "", }; } public static string AscentText(int? ascent) { if (!ascent.HasValue) { return ""; } int value = ascent.Value; if (value <= -1) { return L10N.T("diff_tenderfoot"); } if (value == 0) { return L10N.T("diff_peak"); } return string.Format(L10N.T("diff_ascent"), value); } } internal static class L10N { private static int _lang = -1; private static readonly Dictionary<string, string[]> _strings = new Dictionary<string, string[]> { { "panel_title", new string[8] { "航班大厅", "Flight Lobby", "フライトロビー", "Flug-Lobby", "Hall des vols", "Sala de vuelos", "Saguão de voos", "Лобі рейсів" } }, { "searching", new string[8] { "搜索中...", "Searching...", "検索中...", "Suche...", "Recherche...", "Buscando...", "Pesquisando...", "Пошук..." } }, { "flight_count", new string[8] { "{0} 个航班", "{0} flights", "{0} 便", "{0} Flüge", "{0} vols", "{0} vuelos", "{0} voos", "{0} рейсів" } }, { "search_ph", new string[8] { "搜索...", "Search...", "検索...", "Suchen...", "Rechercher...", "Buscar...", "Pesquisar...", "Пошук..." } }, { "refresh", new string[8] { "刷新", "Refresh", "更新", "Neu", "Actualiser", "Actualizar", "Atualizar", "Оновити" } }, { "empty_title", new string[8] { "暂无公开航班", "No public flights", "公開フライトなし", "Keine öffentlichen Flüge", "Aucun vol public", "Sin vuelos públicos", "Sem voos públicos", "Немає публічних рейсів" } }, { "empty_sub", new string[8] { "当前似乎没有航班呢", "No flights available right now", "現在利用可能なフライトはありません", "Derzeit keine Flüge verfügbar", "Aucun vol disponible pour le moment", "No hay vuelos disponibles ahora", "Nenhum voo disponível agora", "Наразі немає доступних рейсів" } }, { "ticker", new string[8] { "✦ 欢迎乘坐 PEAK 联机航班 ✦ 从经济角度上讲航班人越多收益越高 ✦ 本公司航班目前零差评 ✦ 祝旅途愉快 ✦", "✦ Welcome aboard PEAK Online Flights ✦ More passengers = better economy ✦ Zero complaints so far ✦ Enjoy your trip ✦", "✦ PEAK オンラインフライトへようこそ ✦ 乗客が多いほどお得 ✦ クレームゼロ ✦ 良い旅を ✦", "✦ Willkommen bei PEAK Online-Flüge ✦ Mehr Passagiere = bessere Wirtschaft ✦ Null Beschwerden ✦ Gute Reise ✦", "✦ Bienvenue sur PEAK Vols en ligne ✦ Plus de passagers = meilleure éco ✦ Zéro plainte ✦ Bon voyage ✦", "✦ Bienvenido a PEAK Vuelos en línea ✦ Más pasajeros = mejor economía ✦ Cero quejas ✦ Buen viaje ✦", "✦ Bem-vindo ao PEAK Voos Online ✦ Mais passageiros = melhor economia ✦ Zero reclamações ✦ Boa viagem ✦", "✦ Ласкаво просимо на PEAK Онлайн-рейси ✦ Більше пасажирів = краща економіка ✦ Нуль скарг ✦ Гарної подорожі ✦" } }, { "clip_hint", new string[8] { "复制链接后点击本卡片加入房间", "Copy a link, then click this card to join", "リンクをコピーしてこのカードをクリック", "Link kopieren, dann diese Karte klicken", "Copiez un lien puis cliquez cette carte", "Copia un enlace y haz clic aquí", "Copie um link e clique aqui", "Скопіюйте посилання і натисніть цю картку" } }, { "clip_empty", new string[8] { "剪贴板为空", "Clipboard is empty", "クリップボードが空です", "Zwischenablage ist leer", "Presse-papiers vide", "Portapapeles vacío", "Área de transferência vazia", "Буфер обміну порожній" } }, { "clip_invalid", new string[8] { "未检测到房间链接", "No lobby link found", "ロビーリンクが見つかりません", "Kein Lobby-Link gefunden", "Aucun lien de lobby trouvé", "No se encontró enlace de lobby", "Link do lobby não encontrado", "Посилання на лобі не знайдено" } }, { "join", new string[8] { "加入", "Join", "参加", "Start", "Rejoindre", "Unirse", "Entrar", "Увійти" } }, { "full", new string[8] { "满", "Full", "満員", "Voll", "Complet", "Lleno", "Cheio", "Повний" } }, { "locked", new string[8] { "密码", "Code", "コード", "Code", "Code", "Código", "Código", "Код" } }, { "mono_fallback", new string[8] { "航", "F", "F", "F", "V", "V", "V", "Р" } }, { "copied", new string[8] { "已复制链接", "Link copied", "リンクをコピーしました", "Link kopiert", "Lien copié", "Enlace copiado", "Link copiado", "Посилання скопійовано" } }, { "copy_link", new string[8] { "复制航班链接", "Copy flight link", "フライトリンクをコピー", "Fluglink kopieren", "Copier le lien du vol", "Copiar enlace del vuelo", "Copiar link do voo", "Копіювати посилання рейсу" } }, { "copy_done", new string[8] { "已复制", "Copied", "コピー済", "Kopiert", "Copié", "Copiado", "Copiado", "Скопійовано" } }, { "copy_blocked", new string[8] { "该房间已设置密码", "This room is password-protected", "このルームにはパスワードが設定されています", "Dieser Raum ist passwortgeschützt", "Ce salon est protégé par un mot de passe", "Esta sala tiene contraseña", "Esta sala é protegida por senha", "Ця кімната захищена паролем" } }, { "cur_flight", new string[8] { "当前航班:", "Current flight:", "現在のフライト:", "Aktueller Flug:", "Vol actuel :", "Vuelo actual:", "Voo atual:", "Поточний рейс:" } }, { "region_label", new string[8] { "地区:", "Region:", "地域:", "Region:", "Région :", "Región:", "Região:", "Регіон:" } }, { "players_label", new string[8] { "当前人数:", "Players:", "プレイヤー:", "Spieler:", "Joueurs :", "Jugadores:", "Jogadores:", "Гравці:" } }, { "scene_label", new string[8] { "当前所处:", "Location:", "場所:", "Ort:", "Lieu :", "Ubicación:", "Local:", "Місце:" } }, { "difficulty_label", new string[8] { "难度:", "Difficulty:", "難易度:", "Schwierigkeit:", "Difficulté :", "Dificultad:", "Dificuldade:", "Складність:" } }, { "not_in_flight", new string[8] { "未在航班中", "Not in a flight", "フライトに参加していません", "Nicht in einem Flug", "Pas dans un vol", "No en un vuelo", "Não está em um voo", "Не в рейсі" } }, { "unknown", new string[8] { "未知", "Unknown", "不明", "Unbekannt", "Inconnu", "Desconocido", "Desconhecido", "Невідомо" } }, { "enter_code", new string[8] { "请输入房间码", "Enter room code", "ルームコードを入力", "Raumcode eingeben", "Entrez le code du salon", "Ingresa el código", "Digite o código da sala", "Введіть код кімнати" } }, { "pwd_ph", new string[8] { "输入密码...", "Enter password...", "パスワードを入力...", "Passwort eingeben...", "Mot de passe...", "Contraseña...", "Senha...", "Пароль..." } }, { "confirm", new string[8] { "确认", "Confirm", "確認", "OK", "Confirmer", "Confirmar", "Confirmar", "OK" } }, { "default_room", new string[8] { "公开航班", "Public Flight", "公開フライト", "Öffentlicher Flug", "Vol public", "Vuelo público", "Voo público", "Публічний рейс" } }, { "room_suffix", new string[8] { "的房间", "'s Room", "の部屋", "s Raum", " - Salon", " - Sala", " - Sala", " - Кімната" } }, { "biome_shore", new string[8] { "海岸", "Shoreline", "海岸", "Küste", "Littoral", "Costa", "Litoral", "Узбережжя" } }, { "biome_tropics", new string[8] { "雨林", "Tropics", "熱帯", "Tropen", "Tropiques", "Trópico", "Trópico", "Тропіки" } }, { "biome_alpine", new string[8] { "雪山", "Alpine", "雪山", "Alpen", "Alpin", "Alpino", "Alpino", "Альпи" } }, { "biome_mesa", new string[8] { "方山", "Mesa", "メサ", "Tafelberg", "Mesa", "Mesa", "Mesa", "Меса" } }, { "biome_caldera", new string[8] { "火山", "Caldera", "カルデラ", "Caldera", "Caldeira", "Caldera", "Caldeira", "Кальдера" } }, { "biome_kiln", new string[8] { "熔炉", "Kiln", "窯", "Brennofen", "Four", "Horno", "Forno", "Піч" } }, { "biome_peak", new string[8] { "顶峰", "Peak", "頂上", "Gipfel", "Sommet", "Cima", "Pico", "Вершина" } }, { "biome_roots", new string[8] { "森蕈", "Roots", "根", "Wurzeln", "Racines", "Raíces", "Raízes", "Коріння" } }, { "biome_airport", new string[8] { "大厅", "Lobby", "ロビー", "Lobby", "Hall", "Vestíbulo", "Saguão", "Лобі" } }, { "biome_menu", new string[8] { "主菜单", "Main Menu", "メインメニュー", "Hauptmenü", "Menu principal", "Menú principal", "Menu principal", "Головне меню" } }, { "scene_climbing", new string[8] { "登山中", "Climbing", "登山中", "Aufstieg", "Ascension", "Escalando", "Escalando", "Підйом" } }, { "scene_loading", new string[8] { "加载中", "Loading", "読み込み中", "Laden", "Chargement", "Cargando", "Carregando", "Завантаження" } }, { "diff_tenderfoot", new string[8] { "菜鸟新人", "Tenderfoot", "初心者", "Neuling", "Débutant", "Novato", "Novato", "Новачок" } }, { "diff_peak", new string[8] { "顶峰", "Peak", "頂上", "Gipfel", "Sommet", "Cima", "Pico", "Вершина" } }, { "diff_ascent", new string[8] { "天阶 {0}", "Ascent {0}", "昇天 {0}", "Aufstieg {0}", "Ascension {0}", "Ascenso {0}", "Ascensão {0}", "Піднесення {0}" } }, { "rg_hk", new string[8] { "香港", "Hong Kong", "香港", "Hongkong", "Hong Kong", "Hong Kong", "Hong Kong", "Гонконг" } }, { "rg_tw", new string[8] { "台湾", "Taiwan", "台湾", "Taiwan", "Taïwan", "Taiwán", "Taiwan", "Тайвань" } }, { "rg_cn", new string[8] { "中国", "China", "中国", "China", "Chine", "China", "China", "Китай" } }, { "rg_jp", new string[8] { "日本", "Japan", "日本", "Japan", "Japon", "Japón", "Japão", "Японія" } }, { "rg_kr", new string[8] { "韩国", "Korea", "韓国", "Korea", "Corée", "Corea", "Coreia", "Корея" } }, { "rg_sg", new string[8] { "新加坡", "Singapore", "シンガポール", "Singapur", "Singapour", "Singapur", "Singapura", "Сінгапур" } }, { "rg_th", new string[8] { "泰国", "Thailand", "タイ", "Thailand", "Thaïlande", "Tailandia", "Tailândia", "Таїланд" } }, { "rg_vn", new string[8] { "越南", "Vietnam", "ベトナム", "Vietnam", "Viêt Nam", "Vietnam", "Vietnã", "В'єтнам" } }, { "rg_ph", new string[8] { "菲律宾", "Philippines", "フィリピン", "Philippinen", "Philippines", "Filipinas", "Filipinas", "Філіппіни" } }, { "rg_my", new string[8] { "马来西亚", "Malaysia", "マレーシア", "Malaysia", "Malaisie", "Malasia", "Malásia", "Малайзія" } }, { "rg_id", new string[8] { "印尼", "Indonesia", "インドネシア", "Indonesien", "Indonésie", "Indonesia", "Indonésia", "Індонезія" } }, { "rg_in", new string[8] { "印度", "India", "インド", "Indien", "Inde", "India", "Índia", "Індія" } }, { "rg_de", new string[8] { "德国", "Germany", "ドイツ", "Deutschland", "Allemagne", "Alemania", "Alemanha", "Німеччина" } }, { "rg_fr", new string[8] { "法国", "France", "フランス", "Frankreich", "France", "Francia", "França", "Франція" } }, { "rg_gb", new string[8] { "英国", "UK", "イギリス", "UK", "Royaume-Uni", "Reino Unido", "Reino Unido", "Великобританія" } }, { "rg_nl", new string[8] { "荷兰", "Netherlands", "オランダ", "Niederlande", "Pays-Bas", "Países Bajos", "Países Baixos", "Нідерланди" } }, { "rg_se", new string[8] { "瑞典", "Sweden", "スウェーデン", "Schweden", "Suède", "Suecia", "Suécia", "Швеція" } }, { "rg_es", new string[8] { "西班牙", "Spain", "スペイン", "Spanien", "Espagne", "España", "Espanha", "Іспанія" } }, { "rg_it", new string[8] { "意大利", "Italy", "イタリア", "Italien", "Italie", "Italia", "Itália", "Італія" } }, { "rg_pl", new string[8] { "波兰", "Poland", "ポーランド", "Polen", "Pologne", "Polonia", "Polônia", "Польща" } }, { "rg_tr", new string[8] { "土耳其", "Turkey", "トルコ", "Türkei", "Turquie", "Turquía", "Turquia", "Туреччина" } }, { "rg_ru", new string[8] { "俄罗斯", "Russia", "ロシア", "Russland", "Russie", "Rusia", "Rússia", "Росія" } }, { "rg_ae", new string[8] { "阿联酋", "UAE", "UAE", "VAE", "Émirats", "EAU", "EAU", "ОАЕ" } }, { "rg_il", new string[8] { "以色列", "Israel", "イスラエル", "Israel", "Israël", "Israel", "Israel", "Ізраїль" } }, { "rg_za", new string[8] { "南非", "South Africa", "南アフリカ", "Südafrika", "Afrique du Sud", "Sudáfrica", "África do Sul", "ПАР" } }, { "rg_br", new string[8] { "巴西", "Brazil", "ブラジル", "Brasilien", "Brésil", "Brasil", "Brasil", "Бразилія" } }, { "rg_mx", new string[8] { "墨西哥", "Mexico", "メキシコ", "Mexiko", "Mexique", "México", "México", "Мексика" } }, { "rg_ar", new string[8] { "阿根廷", "Argentina", "アルゼンチン", "Argentinien", "Argentine", "Argentina", "Argentina", "Аргентина" } }, { "rg_nz", new string[8] { "新西兰", "New Zealand", "ニュージーランド", "Neuseeland", "Nouvelle-Zélande", "Nueva Zelanda", "Nova Zelândia", "Нова Зеландія" } }, { "rg_sa", new string[8] { "南美", "S. America", "南米", "Südamerika", "Am. du Sud", "Sudamérica", "Am. do Sul", "Пд. Америка" } }, { "rg_me", new string[8] { "中东", "Middle East", "中東", "Naher Osten", "Moyen-Orient", "Medio Oriente", "Oriente Médio", "Бл. Схід" } }, { "rg_au", new string[8] { "大洋洲", "Oceania", "オセアニア", "Ozeanien", "Océanie", "Oceanía", "Oceania", "Океанія" } }, { "rg_ca", new string[8] { "加拿大", "Canada", "カナダ", "Kanada", "Canada", "Canadá", "Canadá", "Канада" } }, { "rg_us", new string[8] { "美国", "USA", "米国", "USA", "États-Unis", "EE.UU.", "EUA", "США" } }, { "rg_eu", new string[8] { "欧洲", "Europe", "ヨーロッパ", "Europa", "Europe", "Europa", "Europa", "Європа" } }, { "rg_as", new string[8] { "亚洲", "Asia", "アジア", "Asien", "Asie", "Asia", "Ásia", "Азія" } } }; public static int Lang { get { if (_lang < 0) { Detect(); } return _lang; } } private static void Detect() { try { string text = (SteamApps.GetCurrentGameLanguage() ?? "").ToLowerInvariant(); if (text.Contains("chinese")) { _lang = 0; } else if (text.Contains("japan")) { _lang = 2; } else if (text.Contains("german")) { _lang = 3; } else if (text.Contains("french")) { _lang = 4; } else if (text.Contains("spanish") || text.Contains("latam")) { _lang = 5; } else if (text.Contains("portuguese") || text.Contains("brazil")) { _lang = 6; } else if (text.Contains("ukrain")) { _lang = 7; } else { _lang = 0; } Plugin.Log.LogInfo((object)$"[L10N] SteamGameLanguage='{text}' → lang={_lang}"); } catch (Exception ex) { _lang = 0; Plugin.Log.LogWarning((object)("[L10N] Detect failed, default zh: " + ex.Message)); } } public static string T(string key) { if (_strings.TryGetValue(key, out var value)) { int lang = Lang; if (lang < value.Length && !string.IsNullOrEmpty(value[lang])) { return value[lang]; } if (value.Length != 0) { return value[0]; } } return key; } public static string Region(string code) { if (string.IsNullOrWhiteSpace(code)) { return T("unknown"); } string text = code.ToUpperInvariant(); if (text.StartsWith("HK") || text.Contains("HONGKONG")) { return T("rg_hk"); } if (text.StartsWith("TW") || text.Contains("TAIWAN")) { return T("rg_tw"); } if (text.StartsWith("CN") || text.Contains("SHANGHAI") || text.Contains("CHINA")) { return T("rg_cn"); } if (text.StartsWith("JP") || text.Contains("TOKYO") || text.Contains("JAPAN")) { return T("rg_jp"); } if (text.StartsWith("KR") || text.Contains("SEOUL") || text.Contains("KOREA")) { return T("rg_kr"); } if (text.StartsWith("SG") || text.Contains("SINGAPORE")) { return T("rg_sg"); } if (text.StartsWith("TH") || text.Contains("THAILAND")) { return T("rg_th"); } if (text.StartsWith("VN") || text.Contains("VIETNAM")) { return T("rg_vn"); } if (text.StartsWith("PH") || text.Contains("PHILIPPINES") || text.Contains("MANILA")) { return T("rg_ph"); } if (text.StartsWith("MY") || text.Contains("MALAYSIA")) { return T("rg_my"); } if (text.StartsWith("ID") || text.Contains("INDONESIA") || text.Contains("JAKARTA")) { return T("rg_id"); } if (text.StartsWith("IN") || text.Contains("INDIA")) { return T("rg_in"); } if (text.StartsWith("DE") || text.Contains("GERMANY") || text.Contains("FRANKFURT")) { return T("rg_de"); } if (text.StartsWith("FR") || text.Contains("FRANCE") || text.Contains("PARIS")) { return T("rg_fr"); } if (text.StartsWith("GB") || text.Contains("UK") || text.Contains("LONDON") || text.Contains("BRITAIN")) { return T("rg_gb"); } if (text.StartsWith("NL") || text.Contains("NETHERLANDS") || text.Contains("AMSTERDAM")) { return T("rg_nl"); } if (text.StartsWith("SE") || text.Contains("SWEDEN") || text.Contains("STOCKHOLM")) { return T("rg_se"); } if (text.StartsWith("ES") || text.Contains("SPAIN") || text.Contains("MADRID")) { return T("rg_es"); } if (text.StartsWith("IT") || text.Contains("ITALY") || text.Contains("MILAN")) { return T("rg_it"); } if (text.StartsWith("PL") || text.Contains("POLAND") || text.Contains("WARSAW")) { return T("rg_pl"); } if (text.StartsWith("TR") || text.Contains("TURKEY") || text.Contains("ISTANBUL")) { return T("rg_tr"); } if (text.StartsWith("RU") || text.Contains("RUSSIA")) { return T("rg_ru"); } if (text.StartsWith("AE") || text.Contains("DUBAI") || text.Contains("EMIRATES")) { return T("rg_ae"); } if (text.StartsWith("IL") || text.Contains("ISRAEL")) { return T("rg_il"); } if (text.StartsWith("ZA") || text.Contains("SOUTHAFRICA") || text.Contains("JOHANNESBURG")) { return T("rg_za"); } if (text.StartsWith("BR") || text.Contains("BRAZIL") || text.Contains("SAOPAULO")) { return T("rg_br"); } if (text.StartsWith("MX") || text.Contains("MEXICO")) { return T("rg_mx"); } if (text.StartsWith("AR") || text.Contains("ARGENTINA")) { return T("rg_ar"); } if (text.StartsWith("NZ") || text.Contains("NEWZEALAND") || text.Contains("AUCKLAND")) { return T("rg_nz"); } if (text.StartsWith("SA") || text.Contains("SOUTHAMERICA")) { return T("rg_sa"); } if (text.StartsWith("ME") || text.Contains("MIDDLEEAST")) { return T("rg_me"); } if (text.StartsWith("AU") || text.StartsWith("OC") || text.Contains("AUSTRALIA")) { return T("rg_au"); } if (text.StartsWith("CA") || text.Contains("CANADA")) { return T("rg_ca"); } if (text.StartsWith("US") || text.Contains("USA") || text.Contains("AMERICA")) { return T("rg_us"); } if (text.StartsWith("EU") || text.Contains("EUROPE")) { return T("rg_eu"); } if (text.StartsWith("AS") || text.Contains("ASIA")) { return T("rg_as"); } return code; } } internal static class SteamAvatarLoader { private static readonly Dictionary<CSteamID, Texture2D> _cache = new Dictionary<CSteamID, Texture2D>(); private static readonly HashSet<CSteamID> _pending = new HashSet<CSteamID>(); public static void LoadAvatar(MonoBehaviour host, CSteamID steamId, Action<Texture2D> onLoaded) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) if (steamId == CSteamID.Nil) { onLoaded?.Invoke(null); return; } if (_cache.TryGetValue(steamId, out var value) && (Object)(object)value != (Object)null) { onLoaded?.Invoke(value); return; } if ((Object)(object)host == (Object)null || !((Component)host).gameObject.activeInHierarchy) { onLoaded?.Invoke(null); return; } if (_pending.Contains(steamId)) { host.StartCoroutine(WaitForAvatar(host, steamId, onLoaded)); return; } _pending.Add(steamId); host.StartCoroutine(LoadAvatarCoroutine(host, steamId, onLoaded)); } private static IEnumerator LoadAvatarCoroutine(MonoBehaviour host, CSteamID steamId, Action<Texture2D> onLoaded) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) Texture2D texture = null; Callback<PersonaStateChange_t> callback = null; try { int num = TryGetAvatarHandle(steamId); if (num != 0) { try { texture = ExtractTexture(num); } catch { } } if ((Object)(object)texture == (Object)null) { bool flag = false; try { flag = SteamFriends.RequestUserInformation(steamId, false); } catch { } if (flag) { bool received = false; callback = Callback<PersonaStateChange_t>.Create((DispatchDelegate<PersonaStateChange_t>)delegate(PersonaStateChange_t r) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) if (r.m_ulSteamID == steamId.m_SteamID) { received = true; } }); float t = 5f; while (!received && t > 0f) { yield return (object)new WaitForSeconds(0.2f); t -= 0.2f; } callback.Dispose(); callback = null; } else { yield return (object)new WaitForSeconds(1.5f); } num = TryGetAvatarHandle(steamId); if (num != 0) { try { texture = ExtractTexture(num); } catch { } } } if ((Object)(object)texture == (Object)null) { yield return host.StartCoroutine(FetchAvatarFromWeb(steamId, delegate(Texture2D tex) { texture = tex; })); } } finally { callback?.Dispose(); _pending.Remove(steamId); } if ((Object)(object)texture != (Object)null) { _cache[steamId] = texture; Plugin.Log.LogInfo((object)$"[Avatar:{steamId}] 成功"); onLoaded?.Invoke(texture); } else { Plugin.Log.LogWarning((object)$"[Avatar:{steamId}] 失败"); onLoaded?.Invoke(null); } } private static IEnumerator WaitForAvatar(MonoBehaviour host, CSteamID steamId, Action<Texture2D> onLoaded) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) float t = 10f; while (!_cache.ContainsKey(steamId) && _pending.Contains(steamId) && t > 0f) { yield return (object)new WaitForSeconds(0.5f); t -= 0.5f; } if (_cache.TryGetValue(steamId, out var value) && (Object)(object)value != (Object)null) { onLoaded?.Invoke(value); } else { onLoaded?.Invoke(null); } } private static int TryGetAvatarHandle(CSteamID steamId) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) try { int num = SteamFriends.GetLargeFriendAvatar(steamId); if (num <= 0) { num = SteamFriends.GetMediumFriendAvatar(steamId); } if (num <= 0) { num = SteamFriends.GetSmallFriendAvatar(steamId); } return (num > 0) ? num : 0; } catch { return 0; } } private static Texture2D ExtractTexture(int handle) { //IL_0083: 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_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Expected O, but got Unknown try { uint num = default(uint); uint num2 = default(uint); if (!SteamUtils.GetImageSize(handle, ref num, ref num2) || num == 0 || num2 == 0 || num > 1024 || num2 > 1024) { return null; } int num3 = (int)(num * num2 * 4); byte[] array = new byte[num3]; if (!SteamUtils.GetImageRGBA(handle, array, num3)) { return null; } int num4 = (int)(num * 4); byte[] array2 = new byte[num3]; for (int i = 0; i < num2; i++) { Array.Copy(array, i * num4, array2, (num2 - 1 - i) * num4, num4); } Texture2D val = new Texture2D((int)num, (int)num2, (TextureFormat)4, false); val.LoadRawTextureData(array2); val.Apply(); return val; } catch { return null; } } private static IEnumerator FetchAvatarFromWeb(CSteamID steamId, Action<Texture2D> onResult) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) Texture2D result = null; string text = $"https://steamcommunity.com/profiles/{steamId.m_SteamID}?xml=1"; UnityWebRequest www = UnityWebRequest.Get(text); try { www.timeout = 15; yield return www.SendWebRequest(); if (www.isNetworkError || www.isHttpError) { onResult?.Invoke(null); yield break; } Match match = Regex.Match(www.downloadHandler.text, "<avatarFull><!\\[CDATA\\[(.+?)\\]\\]></avatarFull>"); if (!match.Success) { match = Regex.Match(www.downloadHandler.text, "<avatarFull>\\s*(https?://\\S+)\\s*</avatarFull>"); } if (!match.Success) { onResult?.Invoke(null); yield break; } string avatarUrl = match.Groups[1].Value.Trim(); for (int i = 0; i < 2; i++) { if (!((Object)(object)result == (Object)null)) { break; } UnityWebRequest req = UnityWebRequestTexture.GetTexture(avatarUrl); try { req.timeout = 15; yield return req.SendWebRequest(); if (!req.isNetworkError && !req.isHttpError) { result = DownloadHandlerTexture.GetContent(req); } } finally { ((IDisposable)req)?.Dispose(); } } } finally { ((IDisposable)www)?.Dispose(); } if ((Object)(object)result != (Object)null) { Plugin.Log.LogInfo((object)$"[Avatar:{steamId}] HTTP 保底成功"); } else { Plugin.Log.LogWarning((object)$"[Avatar:{steamId}] HTTP 保底失败"); } onResult?.Invoke(result); } public static void ClearCache() { foreach (KeyValuePair<CSteamID, Texture2D> item in _cache) { if ((Object)(object)item.Value != (Object)null) { Object.Destroy((Object)(object)item.Value); } } _cache.Clear(); _pending.Clear(); } } } namespace OnlineFlights.UI { internal class FlightCard : MonoBehaviour, IPointerEnterHandler, IEventSystemHandler, IPointerExitHandler, IPointerClickHandler { public Action<FlightInfo> OnJoinClicked; public Action<FlightInfo> OnCopyLinkClicked; private const float AVATAR_SIZE = 60f; private const float AVATAR_X = 10f; private const float TEXT_X = 76f; private const float NAME_W = 160f; private const float TEXT_W = 104f; private const float NAME_TOP = -8f; private const float SCENE_TOP = -36f; private const float DESC_TOP = -60f; private const float REGION_TOP = -70f; private const float BTN_W = 54f; private const float BTN_H = 48f; private const float BTN_RIGHT = 10f; private const float BTN_TOP = -32f; private const float DESC_SPEED = 40f; private FlightInfo _info; private Outline _outline; private bool _isFull; private RawImage _avatarRaw; private Transform _joinButtonTransform; private RectTransform _descTextRt; private RectTransform _descVpRt; private float _descScrollX; private bool _descNeedsScroll; public void Setup(FlightInfo info, Transform parent) { //IL_005e: Unknown result type (might be due to invalid IL or missing references) _info = info; _isFull = info.MaxMembers > 0 && info.MemberCount >= info.MaxMembers; ((Component)this).transform.SetParent(parent, false); RectTransform val = ((Component)this).GetComponent<RectTransform>(); if ((Object)(object)val == (Object)null) { val = ((Component)this).gameObject.AddComponent<RectTransform>(); } val.sizeDelta = new Vector2(250f, 100f); BuildUI(); LoadAvatar(); } private void BuildUI() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0043: 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_007f: Unknown result type (might be due to invalid IL or missing references) Image obj = ((Component)this).gameObject.AddComponent<Image>(); ((Graphic)obj).color = UIFactory.CardFill; obj.sprite = UIFactory.CompSprite; obj.type = (Type)1; ((Graphic)obj).raycastTarget = true; UIFactory.AddShadow(((Component)this).gameObject, UIFactory.ShadowC, new Vector2(2f, -2f)); _outline = ((Component)this).gameObject.AddComponent<Outline>(); ((Shadow)_outline).effectColor = UIFactory.CardBorder; ((Shadow)_outline).effectDistance = new Vector2(2f, -2f); ((Component)this).gameObject.AddComponent<CrispHover>(); CanvasGroup val = ((Component)this).gameObject.AddComponent<CanvasGroup>(); if (_isFull) { val.alpha = 0.5f; val.interactable = false; } BuildAvatar(); BuildRegionCount(); BuildRoomName(); BuildSceneText(); BuildDescription(); BuildJoinButton(); } private void BuildAvatar() { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_006b: 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_008b: 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) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Expected O, but got Unknown //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_023e: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("Avatar", new Type[2] { typeof(RectTransform), typeof(Image) }); val.transform.SetParent(((Component)this).transform, false); UIFactory.Place(val.GetComponent<RectTransform>(), new Vector2(0f, 1f), new Vector2(0f, 1f), new Vector2(10f, -10f), new Vector2(60f, 60f)); Image component = val.GetComponent<Image>(); ((Graphic)component).color = UIFactory.DeepLeather; component.sprite = UIFactory.RoundSprite; component.type = (Type)0; ((Graphic)component).raycastTarget = false; Outline obj = val.AddComponent<Outline>(); ((Shadow)obj).effectColor = UIFactory.WarmBorder; ((Shadow)obj).effectDistance = new Vector2(1.5f, -1.5f); string text; if (_info.OwnerSteamId == CSteamID.Nil && string.IsNullOrWhiteSpace(_info.OwnerName) && string.IsNullOrWhiteSpace(_info.DisplayName)) { text = "?"; } else { string text2 = ((!string.IsNullOrWhiteSpace(_info.OwnerName)) ? _info.OwnerName.Trim() : ((!string.IsNullOrWhiteSpace(_info.DisplayName)) ? _info.DisplayName.Trim() : L10N.T("mono_fallback"))); text = ((text2.Length > 0) ? text2.Substring(0, 1) : L10N.T("mono_fallback")); } TMP_Text obj2 = UIFactory.MkText(val.transform, text, 18, (FontStyles)1, UIFactory.TextCream); UIFactory.Fill(((Component)obj2).GetComponent<RectTransform>(), Vector2.zero, Vector2.zero); obj2.alignment = (TextAlignmentOptions)514; GameObject val2 = new GameObject("Raw", new Type[2] { typeof(RectTransform), typeof(RawImage) }); val2.transform.SetParent(val.transform, false); UIFactory.Fill(val2.GetComponent<RectTransform>(), Vector2.zero, Vector2.zero); _avatarRaw = val2.GetComponent<RawImage>(); ((Graphic)_avatarRaw).raycastTarget = false; ((Graphic)_avatarRaw).color = new Color(1f, 1f, 1f, 0f); } private void BuildRegionCount() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0047: 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) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_0104: 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) TMP_Text obj = UIFactory.MkText(((Component)this).transform, _info.RegionText, 10, (FontStyles)0, UIFactory.TextMuted); obj.alignment = (TextAlignmentOptions)513; obj.overflowMode = (TextOverflowModes)1; obj.enableWordWrapping = false; UIFactory.Place(((Component)obj).GetComponent<RectTransform>(), new Vector2(0f, 1f), new Vector2(0f, 1f), new Vector2(13f, -70f), new Vector2(25f, 18f)); string text = $"{_info.MemberCount}/{_info.MaxMembers}"; TMP_Text obj2 = UIFactory.MkText(((Component)this).transform, text, 10, (FontStyles)0, UIFactory.TextMuted); obj2.alignment = (TextAlignmentOptions)516; obj2.overflowMode = (TextOverflowModes)1; obj2.enableWordWrapping = false; UIFactory.Place(((Component)obj2).GetComponent<RectTransform>(), new Vector2(0f, 1f), new Vector2(0f, 1f), new Vector2(40f, -70f), new Vector2(30f, 18f)); } private void BuildRoomName() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) TMP_Text obj = UIFactory.MkText(((Component)this).transform, _info.DisplayName, 14, (FontStyles)1, UIFactory.TextInk); obj.alignment = (TextAlignmentOptions)513; obj.overflowMode = (TextOverflowModes)1; obj.enableWordWrapping = false; obj.enableAutoSizing = true; obj.fontSizeMin = 9f; obj.fontSizeMax = 14f; UIFactory.Place(((Component)obj).GetComponent<RectTransform>(), new Vector2(0f, 1f), new Vector2(0f, 1f), new Vector2(76f, -8f), new Vector2(160f, 24f)); } private void BuildSceneText() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0047: 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) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) TMP_Text obj = UIFactory.MkText(((Component)this).transform, _info.SceneText, 11, (FontStyles)0, UIFactory.TextMuted); obj.alignment = (TextAlignmentOptions)513; obj.overflowMode = (TextOverflowModes)1; obj.enableWordWrapping = false; UIFactory.Place(((Component)obj).GetComponent<RectTransform>(), new Vector2(0f, 1f), new Vector2(0f, 1f), new Vector2(76f, -36f), new Vector2(104f, 20f)); } private void BuildDescription() { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Expected O, but got Unknown //IL_007e: 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_009c: 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_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: 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_01ed: Unknown result type (might be due to invalid IL or missing references) string text = ((!string.IsNullOrWhiteSpace(_info.Description)) ? _info.Description : "Bing Bong~Bing Bong~"); GameObject val = new GameObject("DescVP", new Type[2] { typeof(RectTransform), typeof(RectMask2D) }); val.transform.SetParent(((Component)this).transform, false); _descVpRt = val.GetComponent<RectTransform>(); UIFactory.Place(_descVpRt, new Vector2(0f, 1f), new Vector2(0f, 1f), new Vector2(76f, -60f), new Vector2(104f, 20f)); GameObject val2 = new GameObject("DescText", new Type[2] { typeof(RectTransform), typeof(TextMeshProUGUI) }); val2.transform.SetParent(val.transform, false); _descTextRt = val2.GetComponent<RectTransform>(); _descTextRt.anchorMin = new Vector2(0f, 0.5f); _descTextRt.anchorMax = new Vector2(0f, 0.5f); _descTextRt.pivot = new Vector2(0f, 0.5f); _descTextRt.anchoredPosition = Vector2.zero; _descTextRt.sizeDelta = new Vector2(0f, 20f); TextMeshProUGUI component = val2.GetComponent<TextMeshProUGUI>(); ((TMP_Text)component).text = text; ((TMP_Text)component).font = UIFactory.TmpFont; ((TMP_Text)component).fontSize = 11f; ((TMP_Text)component).fontStyle = (FontStyles)0; ((TMP_Text)component).alignment = (TextAlignmentOptions)513; ((Graphic)component).color = UIFactory.TextGold; ((Graphic)component).raycastTarget = false; ((TMP_Text)component).enableWordWrapping = false; ((TMP_Text)component).overflowMode = (TextOverflowModes)0; float x = ((TMP_Text)component).GetPreferredValues(text).x; _descTextRt.sizeDelta = new Vector2(Mathf.Max(x, 104f), 20f); _descNeedsScroll = x > 108f; if (_descNeedsScroll) { _descScrollX = 0f; } } private void BuildJoinButton() { //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_010f: 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_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0149: 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_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: 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_020a: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Unknown result type (might be due to invalid IL or missing references) //IL_023d: Expected O, but got Unknown string text = (_isFull ? L10N.T("full") : (string.IsNullOrEmpty(_info.RoomCode) ? L10N.T("join") : L10N.T("locked"))); GameObject val = new GameObject("JoinBtn", new Type[3] { typeof(RectTransform), typeof(Image), typeof(Button) }); val.transform.SetParent(((Component)this).transform, false); UIFactory.Place(val.GetComponent<RectTransform>(), new Vector2(1f, 1f), new Vector2(1f, 1f), new Vector2(-10f, -32f), new Vector2(54f, 48f)); Image component = val.GetComponent<Image>(); ((Graphic)component).color = UIFactory.BtnFill; component.sprite = UIFactory.BtnSprite; component.type = (Type)0; ((Graphic)component).raycastTarget = true; Button component2 = val.GetComponent<Button>(); ((Selectable)component2).targetGraphic = (Graphic)(object)component; ColorBlock colors = ((Selectable)component2).colors; ((ColorBlock)(ref colors)).normalColor = Color.white; ((ColorBlock)(ref colors)).highlightedColor = new Color(1.1f, 1.05f, 0.95f); ((ColorBlock)(ref colors)).pressedColor = new Color(0.85f, 0.8f, 0.72f); ((ColorBlock)(ref colors)).fadeDuration = 0.08f; ((Selectable)component2).colors = colors; GameObject val2 = new GameObject("T", new Type[2] { typeof(RectTransform), typeof(TextMeshProUGUI) }); val2.transform.SetParent(val.transform, false); UIFactory.Fill(val2.GetComponent<RectTransform>(), Vector2.zero, Vector2.zero); TextMeshProUGUI component3 = val2.GetComponent<TextMeshProUGUI>(); ((TMP_Text)component3).text = text; ((TMP_Text)component3).font = UIFactory.TmpFont; ((TMP_Text)component3).fontSize = 13f; ((TMP_Text)component3).enableAutoSizing = true; ((TMP_Text)component3).fontSizeMin = 9f; ((TMP_Text)component3).fontSizeMax = 13f; ((TMP_Text)component3).fontStyle = (FontStyles)1; ((TMP_Text)component3).alignment = (TextAlignmentOptions)514; ((Graphic)component3).color = UIFactory.BtnText; ((Graphic)component3).raycastTarget = false; _joinButtonTransform = val.transform; ((UnityEvent)component2.onClick).AddListener((UnityAction)delegate { UIFactory.PlayClick(); OnJoinClicked?.Invoke(_info); }); if (_isFull) { ((Selectable)component2).interactable = false; } } private void Update() { //IL_002b: 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_0084: Unknown result type (might be due to invalid IL or missing references) if (_descNeedsScroll && !((Object)(object)_descTextRt == (Object)null) && !((Object)(object)_descVpRt == (Object)null)) { float x = _descTextRt.sizeDelta.x; Rect rect = _descVpRt.rect; float width = ((Rect)(ref rect)).width; _descScrollX -= 40f * Time.unscaledDeltaTime; if (_descScrollX < 0f - x) { _descScrollX = width; } _descTextRt.anchoredPosition = new Vector2(_descScrollX, 0f); } } private void LoadAvatar() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) if (_info.OwnerSteamId == CSteamID.Nil) { Plugin.Log.LogInfo((object)("[Avatar] 跳过加载:房主无 SteamID,ownerName='" + _info.OwnerName + "'")); return; } Plugin.Log.LogInfo((object)$"[Avatar] 开始加载:steamId={_info.OwnerSteamId}, ownerName='{_info.OwnerName}'"); SteamAvatarLoader.LoadAvatar((MonoBehaviour)(object)this, _info.OwnerSteamId, delegate(Texture2D tex) { //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)this == (Object)null) && !((Object)(object)_avatarRaw == (Object)null)) { if ((Object)(object)tex != (Object)null) { _avatarRaw.texture = (Texture)(object)tex; ((Graphic)_avatarRaw).color = Color.white; } else { Plugin.Log.LogWarning((object)$"[Avatar] 回调收到 null 纹理:steamId={_info.OwnerSteamId}"); } } }); } public void OnPointerEnter(PointerEventData eventData) { //IL_0022: 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) if (!_isFull && !((Object)(object)_outline == (Object)null)) { UIFactory.PlayHover(); ((Shadow)_outline).effectColor = UIFactory.CardBorderHot; ((Shadow)_outline).effectDistance = new Vector2(3f, -3f); } } public void OnPointerExit(PointerEventData eventData) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)_outline == (Object)null)) { ((Shadow)_outline).effectColor = UIFactory.CardBorder; ((Shadow)_outline).effectDistance = new Vector2(2f, -2f); } } public void OnPointerClick(PointerEventData eventData) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) if (_isFull) { return; } if ((Object)(object)_joinButtonTransform != (Object)null) { RaycastResult pointerCurrentRaycast = eventData.pointerCurrentRaycast; if ((Object)(object)((RaycastResult)(ref pointerCurrentRaycast)).gameObject != (Object)null) { pointerCurrentRaycast = eventData.pointerCurrentRaycast; if (((RaycastResult)(ref pointerCurrentRaycast)).gameObject.transform.IsChildOf(_joinButtonTransform)) { return; } } } UIFactory.PlayClick(); OnCopyLinkClicked?.Invoke(_info); } } internal class FlightsPanel : MonoBehaviour { private RectTransform _panelRoot; private CanvasGroup _panelCg; private GraphicRaycaster _raycaster; private TMP_Text _flightCountText; private TMP_InputField _searchInput; private RectTransform _refreshBtnRt; private TMP_Text _countdownText; private Transform _cardContainer; private ScrollRect _scrollRect; private GameObject _emptyState; private readonly List<GameObject> _cardObjects = new List<GameObject>(); private Sequence _animSeq; private Sequence _refreshTween; private float _openTime; private RectTransform _shadowFrameRt; private float _refreshTimer = 120f; private int _lastCountdownSec = -1; private RectTransform _tickerTextRt; private float _tickerScrollX; private FlightInfo _lastJoinFlight; private UIPageHandler _subscribedHandler; private const float CARD_W = 250f; private const float CARD_H = 100f; private const float CARD_GAP = 10f; private const float GRID_PAD = 12f; private const float ANIM_DUR = 1f; private const float AUTO_REFRESH_SEC = 120f; private const float TICKER_SPEED = 80f; private static Sprite _plusSprite; public static FlightsPanel Instance { get; private set; } public bool IsOpen { get; private set; } private Vector2 POS_OPEN => new Vector2(Plugin.Instance.PanelPosX.Value, Plugin.Instance.PanelPosY.Value); private Vector2 POS_CLOSED => new Vector2(Plugin.Instance.PanelPosX.Value + 1400f, Plugin.Instance.PanelPosY.Value); public static FlightsPanel Create() { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown if ((Object)(object)Instance != (Object)null) { return Instance; } GameObject val = new GameObject("FlightsPanel", new Type[1] { typeof(RectTransform) }); Object.DontDestroyOnLoad((Object)val); return val.AddComponent<FlightsPanel>(); } private void Awake() { //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Expected O, but got Unknown Instance = this; DOTween.Init((bool?)false, (bool?)false, (LogBehaviour?)(LogBehaviour)2); UIFactory.Init(); BuildUI(); if ((Object)(object)LobbyQueryManager.Instance == (Object)null) { GameObject val = new GameObject("LobbyQueryManager"); Object.DontDestroyOnLoad((Object)val); val.AddComponent<LobbyQueryManager>(); } _panelRoot.anchoredPosition = POS_CLOSED; ((Component)_panelRoot).gameObject.SetActive(false); ManualLogSource log = Plugin.Log; TMP_FontAsset tmpFont = UIFactory.TmpFont; log.LogInfo((object)("[FlightsPanel] ready, font=" + (((tmpFont != null) ? ((Object)tmpFont).name : null) ?? "NULL"))); } private void Update() { //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) if (!IsOpen) { return; } if (Input.GetKeyDown((KeyCode)27) && Time.unscaledTime - _openTime > 0.3f) { Close(); return; } _refreshTimer -= Time.unscaledDeltaTime; if (_refreshTimer <= 0f) { _refreshTimer = 120f; RefreshFlights(); } if ((Object)(object)_countdownText != (Object)null) { int num = Mathf.Max(0, Mathf.CeilToInt(_refreshTimer)); if (num != _lastCountdownSec) { _lastCountdownSec = num; _countdownText.text = num + "s"; } } if ((Object)(object)_tickerTextRt != (Object)null) { Rect rect = ((RectTransform)((Transform)_tickerTextRt).parent).rect; float num2 = ((Rect)(ref rect)).width; if (num2 <= 0f) { num2 = 800f; } float x = _tickerTextRt.sizeDelta.x; _tickerScrollX -= 80f * Time.unscaledDeltaTime; if (_tickerScrollX < 0f - x) { _tickerScrollX = num2; } _tickerTextRt.anchoredPosition = new Vector2(_tickerScrollX, 0f); } } public void Toggle() { if (IsOpen) { Close(); } else { Open(); } } public void Open() { //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Expected O, but got Unknown IsOpen = true; _refreshTimer = 120f; _openTime = Time.unscaledTime; ((Component)_panelRoot).gameObject.SetActive(true); if ((Object)(object)_raycaster != (Object)null) { ((Behaviour)_raycaster).enabled = true; } float value = Plugin.Instance.PanelWidth.Value; float value2 = Plugin.Instance.PanelHeight.Value; _panelRoot.sizeDelta = new Vector2(value, value2); if ((Object)(object)_shadowFrameRt != (Object)null) { _shadowFrameRt.sizeDelta = new Vector2(value + 8f, value2 + 8f); } Sequence animSeq = _animSeq; if (animSeq != null) { TweenExtensions.Kill((Tween)(object)animSeq, false); } _panelRoot.anchoredPosition = POS_CLOSED; _panelCg.alpha = 0f; _animSeq = TweenSettingsExtensions.OnComplete<Sequence>(TweenSettingsExtensions.Join(TweenSettingsExtensions.Join(DOTween.Sequence(), (Tween)(object)TweenSettingsExtensions.SetEase<TweenerCore<Vector2, Vector2, VectorOptions>>(DOTweenModuleUI.DOAnchorPos(_panelRoot, POS_OPEN, 1f, false), (Ease)27, 0.5f, 0.5f)), (Tween)(object)DOTweenModuleUI.DOFade(_panelCg, 1f, 0.6f)), new TweenCallback(RefreshFlights)); } public void Close() { //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Expected O, but got Unknown IsOpen = false; ((MonoBehaviour)this).CancelInvoke(); ((MonoBehaviour)this).StopAllCoroutines(); if ((Object)(object)_raycaster != (Object)null) { ((Behaviour)_raycaster).enabled = false; } Sequence animSeq = _animSeq; if (animSeq != null) { TweenExtensions.Kill((Tween)(object)animSeq, false); } Sequence refreshTween = _refreshTween; if (refreshTween != null) { TweenExtensions.Kill((Tween)(object)refreshTween, false); } _animSeq = TweenSettingsExtensions.OnComplete<Sequence>(TweenSettingsExtensions.Join(TweenSettingsExtensions.Join(DOTween.Sequence(), (Tween)(object)TweenSettingsExtensions.SetEase<TweenerCore<Vector2, Vector2, VectorOptions>>(DOTweenModuleUI.DOAnchorPos(_panelRoot, POS_CLOSED, 0.5f, false), (Ease)9)), (Tween)(object)DOTweenModuleUI.DOFade(_panelCg, 0f, 0.5f)), (TweenCallback)delegate { ((Component)_panelRoot).gameObject.SetActive(false); }); } internal void UpdatePosition() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)_panelRoot == (Object)null)) { _panelRoot.anchoredPosition = (IsOpen ? POS_OPEN : POS_CLOSED); } } internal void UpdateSize() { //IL_0037: 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) if (!((Object)(object)_panelRoot == (Object)null)) { float value = Plugin.Instance.PanelWidth.Value; float value2 = Plugin.Instance.PanelHeight.Value; _panelRoot.sizeDelta = new Vector2(value, value2); if ((Object)(object)_shadowFrameRt != (Object)null) { _shadowFrameRt.sizeDelta = new Vector2(value + 8f, value2 + 8f); } if (IsOpen) { RebuildCards(); } } } internal void SubscribePageTransitions(UIPageHandler handler) { if (!((Object)(object)handler == (Object)null) && !((Object)(object)handler == (Object)(object)_subscribedHandler)) { if ((Object)(object)_subscribedHandler != (Object)null) { UIPageHandler subscribedHandler = _subscribedHandler; subscribedHandler.onPageTransition = (Action<UIPage>)Delegate.Remove(subscribedHandler.onPageTransition, new Action<UIPage>(OnPageTransitionCallback)); } _subscribedHandler = handler; UIPageHandler subscribedHandler2 = _subscribedHandler; subscribedHandler2.onPageTransition = (Action<UIPage>)Delegate.Combine(subscribedHandler2.onPageTransition, new Action<UIPage>(OnPageTransitionCallback)); } } internal void UnsubscribePageTransitions() { if ((Object)(object)_subscribedHandler != (Object)null) { UIPageHandler subscribedHandler = _subscribedHandler; subscribedHandler.onPageTransition = (Action<UIPage>)Delegate.Remove(subscribedHandler.onPageTransition, new Action<UIPage>(OnPageTransitionCallback)); _subscribedHandler = null; } } private void OnPageTransitionCallback(UIPage page) { try { if (!(page is IHaveParentPage) && PageTransitionPatch._inSettingsTree) { if (PageTransitionPatch.WasOpen && !IsOpen) { Open(); } else if (!PageTransitionPatch.WasOpen && IsOpen) { Close(); } } } catch (Exception ex) { Plugin.Log.LogError((object)("[FlightsPanel] pageTransition: " + ex.Message)); } } private void RefreshFlights() { _refreshTimer = 120f; _flightCountText.text = L10N.T("searching"); ClearCards(); LobbyQueryManager.Instance?.SearchFlights(delegate { if (IsOpen) { RebuildCards(); } }); } private void RebuildCards() { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Expected O, but got Unknown //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_0308: Unknown result type (might be due to invalid IL or missing references) //IL_0287: Unknown result type (might be due to invalid IL or missing references) //IL_028c: Unknown result type (might be due to invalid IL or missing references) //IL_0290: Unknown result type (might be due to invalid IL or missing references) //IL_0297: Unknown result type (might be due to invalid IL or missing references) //IL_029e: Unknown result type (might be due to invalid IL or missing references) //IL_02aa: Unknown result type (might be due to invalid IL or missing references) //IL_02b6: Unknown result type (might be due to invalid IL or missing references) ClearCards(); List<FlightInfo> list = LobbyQueryManager.Instance?.GetFilteredFlights(); if (list == null) { list = new List<FlightInfo>(); } CSteamID mySteamId = SteamUser.GetSteamID(); list.Sort(delegate(FlightInfo a, FlightInfo b) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) bool flag = a.OwnerSteamId == mySteamId; bool flag2 = b.OwnerSteamId == mySteamId; return (flag != flag2) ? ((!flag) ? 1 : (-1)) : b.MemberCount.CompareTo(a.MemberCount); }); _flightCountText.text = string.Format(L10N.T("flight_count"), list.Count); if ((Object)(object)_emptyState != (Object)null) { _emptyState.SetActive(false); } int num = list.Count + 1; RectTransform component = ((Component)_cardContainer).GetComponent<RectTransform>(); Rect rect = component.rect; float num2 = ((Rect)(ref rect)).width - 24f; if (num2 <= 0f) { num2 = Plugin.Instance.PanelWidth.Value - 30f; } int num3 = Mathf.Max(1, Mathf.FloorToInt((num2 + 10f) / 260f)); int num4 = Mathf.CeilToInt((float)num / (float)num3); CreateClipboardCard(0, num3); for (int num5 = 0; num5 < list.Count; num5++) { int num6 = num5 + 1; int num7 = num6 % num3; int num8 = num6 / num3; float num9 = 12f + (float)num7 * 260f; float num10 = 0f - (12f + (float)num8 * 110f); GameObject val = new GameObject("Card_" + num5, new Type[1] { typeof(RectTransform) }); RectTransform component2 = val.GetComponent<RectTransform>(); ((Transform)component2).SetParent(_cardContainer, false); UIFactory.Place(component2, new Vector2(0f, 1f), new Vector2(0.5f, 0.5f), new Vector2(num9 + 125f, num10 - 50f), new Vector2(250f, 100f)); FlightCard flightCard = val.AddComponent<FlightCard>(); flightCard.OnJoinClicked = (Action<FlightInfo>)Delegate.Combine(flightCard.OnJoinClicked, new Action<FlightInfo>(OnJoinFlight)); flightCard.OnCopyLinkClicked = (Action<FlightInfo>)Delegate.Combine(flightCard.OnCopyLinkClicked, new Action<FlightInfo>(OnCopyLink)); flightCard.Setup(list[num5], val.transform); _cardObjects.Add(val); CanvasGroup component3 = val.GetComponent<CanvasGroup>(); if ((Object)(object)component3 != (Object)null) { float alpha = component3.alpha; component3.alpha = 0f; TweenSettingsExtensions.SetDelay<TweenerCore<float, float, FloatOptions>>(DOTweenModuleUI.DOFade(component3, alpha, 0.3f), (float)num6 * 0.05f); continue; } Image component4 = val.GetComponent<Image>(); if ((Object)(object)component4 != (Object)null) { Color color = ((Graphic)component4).color; ((Graphic)component4).color = new Color(color.r, color.g, color.b, 0f); TweenSettingsExtensions.SetDelay<TweenerCore<Color, Color, ColorOptions>>(DOTweenModuleUI.DOFade(component4, color.a, 0.3f), (float)num6 * 0.05f); } } float num11 = 24f + (float)num4 * 110f - 10f; component.sizeDelta = new Vector2(0f, num11); } private void OnSearchChanged(string query) { if ((Object)(object)LobbyQueryManager.Instance != (Object)null) { LobbyQueryManager.Instance.SearchFilter = query; } RebuildCards(); } private void ClearCards() { foreach (GameObject cardObject in _cardObjects) { if ((Object)(object)cardObject != (Object)null) { DOTween.Kill((object)cardObject.transform, false); CanvasGroup component = cardObject.GetComponent<CanvasGroup>(); if ((Object)(object)component != (Object)null) { DOTween.Kill((object)component, false); } Image component2 = cardObject.GetComponent<Image>(); if ((Object)(object)component2 != (Object)null) { DOTween.Kill((object)component2, false); } Object.Destroy((Object)(object)cardObject); } } _cardObjects.Clear(); } private void CreateClipboardCard(int gridIndex, int cols) { //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Expected O, but got Unknown //IL_007e: 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_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: 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_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0166: 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_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Unknown result type (might be due to invalid IL or missing references) //IL_0242: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_028e: Unknown result type (might be due to invalid IL or missing references) //IL_0298: Expected O, but got Unknown int num = gridIndex % cols; int num2 = gridIndex / cols; float num3 = 12f + (float)num * 260f; float num4 = 0f - (12f + (float)num2 * 110f); GameObject val = new GameObject("Card_Clipboard", new Type[3] { typeof(RectTransform), typeof(Image), typeof(Button) }); RectTransform component = val.GetComponent<RectTransform>(); ((Transform)component).SetParent(_cardContainer, false); UIFactory.Place(component, new Vector2(0f, 1f), new Vector2(0.5f, 0.5f), new Vector2(num3 + 125f, num4 - 50f), new Vector2(250f, 100f)); Image component2 = val.GetComponent<Image>(); ((Graphic)component2).color = UIFactory.CardFill; component2.sprite = UIFactory.CompSprite; component2.type = (Type)1; ((Graphic)component2).raycastTarget = true; UIFactory.AddShadow(val, UIFactory.ShadowC, new Vector2(2f, -2f)); Outline obj = val.AddComponent<Outline>(); ((Shadow)obj).effectColor = UIFactory.CardBorder; ((Shadow)obj).effectDistance = new Vector2(2f, -2f); val.AddComponent<CrispHover>(); val.AddComponent<CanvasGroup>(); GameObject val2 = new GameObject("Plus", new Type[2] { typeof(RectTransform), typeof(Image) }); val2.transform.SetParent(val.transform, false); Image component3 = val2.GetComponent<Image>(); component3.sprite = GetPlusSprite(); ((Graphic)component3).color = new Color(0.38f, 0.28f, 0.16f, 0.8f); ((Graphic)component3).raycastTarget = false; UIFactory.Place(val2.GetComponent<RectTransform>(), new Vector2(0.5f, 0.5f), new Vector2(0.5f, 0.5f), new Vector2(0f, 8f), new Vector2(30f, 30f)); TMP_Text obj2 = UIFactory.MkText(val.transform, L10N.T("clip_hint"), 10, (FontStyles)0, UIFactory.TextMuted); UIFactory.Place(((Component)obj2).GetComponent<RectTransform>(), new Vector2(0.5f, 0.5f), new Vector2(0.5f, 0.5f), new Vector2(0f, -14f), new Vector2(210f, 18f)); obj2.alignment = (TextAlignmentOptions)514; ((Graphic)obj2).raycastTarget = false; Button component4 = val.GetComponent<Button>(); ((Selectable)component4).targetGraphic = (Graphic)(object)component2; ((Selectable)component4).transition = (Transition)0; ((UnityEvent)component4.onClick).AddListener((UnityAction)delegate { UIFactory.PlayClick(); JoinFromClipboard(); }); _cardObjects.Add(val); } private static Sprite GetPlusSprite() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Expected O, but got Unknown //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_plusSprite != (Object)null) { return _plusSprite; } Texture2D val = new Texture2D(32, 32, (TextureFormat)4, false); ((Texture)val).filterMode = (FilterMode)1; for (int i = 0; i < 32; i++) { for (int j = 0; j < 32; j++) { float num = (float)j + 0.5f; float num2 = (float)i + 0.5f; float num3 = Mathf.Clamp(num, 3f, 29f) - num; float num4 = 16f - num2; float num5 = Mathf.Sqrt(num3 * num3 + num4 * num4) - 5f; float num6 = 16f - num; float num7 = Mathf.Clamp(num2, 3f, 29f) - num2; float num8 = Mathf.Sqrt(num6 * num6 + num7 * num7) - 5f; float num9 = Mathf.Min(num5, num8); float num10 = Mathf.Clamp01(0.5f - num9); val.SetPixel(j, i, new Color(1f, 1f, 1f, num10)); } } val.Apply(); _plusSprite = Sprite.Create(val, new Rect(0f, 0f, 32f, 32f), new Vector2(0.5f, 0.5f), 32f); return _plusSprite; } private void OnJoinFlight(FlightInfo flight) { //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) _lastJoinFlight = flight; if (flight.MaxMembers > 0 && flight.MemberCount >= flight.MaxMembers) { Plugin.Log.LogInfo((object)("[FlightsPanel] flight full: " + flight.DisplayName)); } else if (!string.IsNullOrEmpty(flight.RoomCode)) { RoomCodeDialog.Show(((Component)this).transform, flight.RoomCode, delegate { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) JoinViaSteam(((object)flight.LobbyId/*cast due to .constrained prefix*/).ToString()); }); } else { JoinViaSteam(((object)flight.LobbyId/*cast due to .constrained prefix*/).ToString()); } } private void JoinViaSteam(string lobbyId) { string text = "steam://open/steam://joinlobby/3527290/" + lobbyId; Plugin.Log.LogInfo((object)("[FlightsPanel] joining via Steam: " + text)); if ((Object)(object)Plugin.Instance != (Object)null && Plugin.Instance.EnableLog.Value) { FlightInfo lastJoinFlight = _lastJoinFlight; if (lastJoinFlight != null) { Plugin.Log.LogInfo((object)$"[DevLog] 加入房间: name='{lastJoinFlight.DisplayName}' owner='{lastJoinFlight.OwnerName}' region='{lastJoinFlight.PhotonRegion}' players={lastJoinFlight.MemberCount}/{lastJoinFlight.MaxMembers} code='{lastJoinFlight.RoomCode}' lobby={lobbyId}"); } else { Plugin.Log.LogInfo((object)("[DevLog] 加入房间: lobby=" + lobbyId)); } } Application.OpenURL(text); Close(); } private void JoinFromClipboard() { string systemCopyBuffer = GUIUtility.systemCopyBuffer; if (string.IsNullOrWhiteSpace(systemCopyBuffer)) { ShowBubble(L10N.T("clip_empty")); return; } string text = ""; string text2 = ""; string text3 = systemCopyBuffer; for (int i = 0; i < text3.Length; i++) { char c = text3[i]; if (c >= '0' && c <= '9') { text2 += c; continue; } if (text2.Length > text.Length) { text = text2; } text2 = ""; } if (text2.Length > text.Length) { text = text2; } if (text.Length >= 5 && ulong.TryParse(text, out var result)) { Plugin.Log.LogInfo((object)$"[FlightsPanel] 从剪贴板加入大厅: {result}"); JoinViaSteam(result.ToString()); } else { ShowBubble(L10N.T("clip_invalid")); } } private void OnCopyLink(FlightInfo flight) { //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) bool flag = !string.IsNullOrEmpty(flight.RoomCode); bool flag2 = (Object)(object)Plugin.Instance != (Object)null && Plugin.Instance.EnableLog.Value; if (flag && !flag2) { ShowBubble(L10N.T("copy_blocked")); return; } string text = "steam://open/steam://joinlobby/3527290/" + ((object)flight.LobbyId/*cast due to .constrained prefix*/).ToString(); string text2 = text; if (flag && flag2) { text2 = text + "\n" + flight.RoomCode; } TextEditor val = new TextEditor { text = text2 }; val.SelectAll(); val.Copy(); ShowBubble(L10N.T("copied")); } private void ShowBubble(string message) { //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Expected O, but got Unknown //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010b: 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_013c: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Expected O, but got Unknown GameObject bubbleGo = new GameObject("Bubble", new Type[3] { typeof(RectTransform), typeof(Image), typeof(CanvasGroup) }); RectTransform component = bubbleGo.GetComponent<RectTransform>(); ((Transform)component).SetParent((Transform)(object)_panelRoot, false); UIFactory.Place(component, new Vector2(0.5f, 0.5f), new Vector2(0.5f, 0.5f), new Vector2(0f, 60f), new Vector2(160f, 32f)); Image component2 = bubbleGo.GetComponent<Image>(); ((Graphic)component2).color = UIFactory.BubbleBg; component2.sprite = UIFactory.CompSprite; component2.type = (Type)1; ((Graphic)component2).raycastTarget = false; CanvasGroup component3 = bubbleGo.GetComponent<CanvasGroup>(); component3.alpha = 0f; GameObject val = new GameObject("T", new Type[2] { typeof(RectTransform), typeof(TextMeshProUGUI) }); RectTransform component4 = val.GetComponent<RectTransform>(); ((Transform)component4).SetParent(bubbleGo.transform, false); UIFactory.Fill(component4, new Vector2(12f, 4f), new Vector2(-12f, -4f)); TextMeshProUGUI component5 = val.GetComponent<TextMeshProUGUI>(); ((TMP_Text)component5).text = message; ((TMP_Text)component5).font = UIFactory.TmpFont; ((TMP_Text)component5).fontSize = 14f; ((TMP_Text)component5).fontStyle = (FontStyles)0; ((TMP_Text)component5).alignment = (TextAlignmentOptions)514; ((Graphic)component5).color = UIFactory.TextCream; ((Graphic)component5).raycastTarget = false; TweenSettingsExtensions.OnComplete<Sequence>(TweenSettingsExtensions.Append(TweenSettingsExtensions.AppendInterval(TweenSettingsExtensions.Append(DOTween.Sequence(), (Tween)(object)DOTweenModuleUI.DOFade(component3, 1f, 0.2f)), 1.1f), (Tween)(object)DOTweenModuleUI.DOFade(component3, 0f, 0.2f)), (TweenCallback)delegate { Object.Destroy((Object)(object)bubbleGo); }); } private void BuildUI() { float value = Plugin.Instance.PanelWidth.Value; float value2 = Plugin.Instance.PanelHeight.Value; BuildMainCanvas(value, value2); BuildShadowFrame(value, value2); BuildParchmentBackground(); BuildTitleTab(); BuildSearchControls(); BuildContentArea(); BuildTicker(); BuildEmptyState(); } private void BuildMainCanvas(float panelW, float panelH) { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Expected O, but got Unknown //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) Canvas obj = ((Component)this).gameObject.AddComponent<Canvas>(); obj.renderMode = (RenderMode)0; obj.sortingOrder = 100; obj.overrideSorting = true; CanvasScaler obj2 = ((Component)this).gameObject.AddComponent<CanvasScaler>(); obj2.uiScaleMode = (ScaleMode)1; obj2.referenceResolution = new Vector2(2560f, 1440f); obj2.screenMatchMode = (ScreenMatchMode)0; obj2.matchWidthOrHeight = 0.5f; _raycaster = ((Component)this).gameObject.AddComponent<GraphicRaycaster>(); GameObject val = new GameObject("航班大厅", new Type[2] { typeof(RectTransform), typeof(CanvasGroup) }); val.transform.SetParent(((Component)this).transform, false); _panelRoot = val.GetComponent<RectTransform>(); UIFactory.Place(_panelRoot, new Vector2(0.5f, 0.5f), new Vector2(0.5f, 0.5f), POS_OPEN, new Vector2(panelW, panelH)); _panelCg = val.GetComponent<CanvasGroup>(); } private void BuildShadowFrame(float panelW, float panelH) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: 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) //IL_006e: 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_00a5: Unknown result type (might be due to invalid IL or missing references) RectTransform val = CreateRect("ShadowFrame", (Transform)(object)_panelRoot, typeof(Image)); UIFactory.Place(val, new Vector2(0.5f, 0.5f), new Vector2(0.5f, 0.5f), Vector2.zero, new Vector2(panelW + 8f, panelH + 8f)); _shadowFrameRt = val; Image component = ((Component)val).GetComponent<Image>(); ((Graphic)component).color = UIFactory.DeepLeather; component.sprite = UIFactory.RoundedPanelSprite; component.type = (Type)1; ((Graphic)component).raycastTarget = false; UIFactory.AddShadow(((Component)val).gameObject, UIFactory.ShadowC, new Vector2(6f, -6f)); } private void BuildParchmentBackground() { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) RectTransform obj = CreateRect("ParchmentBg", (Transform)(object)_panelRoot, typeof(Image)); UIFactory.Fill(obj, new Vector2(4f, 4f), new Vector2(-4f, -4f)); Image component = ((Component)obj).GetComponent<Image>(); ((Graphic)component).color = UIFactory.Parchment; component.sprite = UIFactory.RoundedPanelSprite; component.type = (Type)1; ((Graphic)component).raycastTarget = false; } private void BuildTitleTab() { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_020b: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_0238: Unknown result type (might be due to invalid IL or missing references) RectTransform obj = CreateRect("TitleTab", (Transform)(object)_panelRoot, typeof(Image)); UIFactory.Place(obj, new Vector2(0f, 1f), new Vector2(0f, 1f), new Vector2(24f, -8f), new Vector2(360f, 44f)); Image component = ((Component)obj).GetComponent<Image>(); ((Graphic)component).color = UIFactory.Terracotta; component.sprite = UIFactory.WavySprite; component.type = (Type)1; ((Graphic)component).raycastTarget = false; UIFactory.AddShadow(((Component)obj).gameObject, UIFactory.ShadowC, new Vector2(2f, -2f)); UIFactory.Stretch(((Component)UIFactory.MkText((Transform)(object)obj, "PEAK", 26, (FontStyles)1, UIFactory.TextCream)).GetComponent<RectTransform>(), new Vector2(0f, 0f), new Vector2(0f, 1f), new Vector2(0f, 0.5f), new Vector2(14f, 0f), new Vector2(90f, 40f)); TMP_Text obj2 = UIFactory.MkText((Transform)(object)obj, L10N.T("panel_title"), 26, (FontStyles)1, UIFactory.TextCream); obj2.enableAutoSizing = true; obj2.fontSizeMin = 16f; obj2.fontSizeMax = 26f; UIFactory.Stretch(((Component)obj2).GetComponent<RectTransform>(), new Vector2(0f, 0f), new Vector2(0f, 1f), new Vector2(0f, 0.5f), new Vector2(106f, 0f), new Vector2(130f, 40f)); Color color = default(Color); ((Color)(ref color))..ctor(UIFactory.TextCream.r, UIFactory.TextCream.g, UIFactory.TextCream.b, 0.8f); TMP_Text val = UIFactory.MkText((Transform)(object)obj, string.Format(L10N.T("flight_count"), 0), 16, (FontStyles)0, color); UIFactory.Stretch(((Component)val).GetComponent<RectTransform>(), new Vector2(0f, 0f), new Vector2(0f, 1f), new Vector2(0f, 0.5f), new Vector2(238f, 0f), new Vector2(110f, 36f)); _flightCountText = val; } private void BuildSearchControls() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Expected O, but got Unknown //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Expected O, but got Unknown //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_019e: 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_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_0220: 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_0238: Unknown result type (might be due to invalid IL or missing references) //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: Unknown result type (might be due to invalid IL or missing references) //IL_02ce: Unknown result type (might be due to invalid IL or missing references) //IL_02dd: 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_02fb: Unknown result type (might be due to invalid IL or missing references) //IL_0312: Unknown result type (might be due to invalid IL or missing references) //IL_031c: Expected O, but got Unknown //IL_032a: Unknown result type (might be due to invalid IL or missing references) //IL_0348: Unknown result type (might be due to invalid IL or missing references) //IL_0357: Unknown result type (might be due to invalid IL or missing references) //IL_0366: Unknown result type (might be due to invalid IL or missing references) //IL_0375: Unknown resu