Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of LateJoinSimple v0.12.0
plugins/LateJoinSimple.dll
Decompiled 19 hours ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Reflection; using System.Reflection.Emit; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security.Cryptography; using System.Text; using System.Text.RegularExpressions; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using ExitGames.Client.Photon; using HarmonyLib; using Photon.Pun; using Photon.Realtime; using UnityEngine; using UnityEngine.SceneManagement; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: AssemblyTitle("LateJoinSimple")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("LateJoinSimple")] [assembly: AssemblyCopyright("Copyright © 2026")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("4a6b399a-b272-4a3b-89b4-c059afdb7768")] [assembly: AssemblyFileVersion("0.10.4.0")] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: AssemblyVersion("0.10.4.0")] namespace LateJoinSimple; [BepInPlugin("cn_xc.LateJoinSimple", "Late Join Simple", "0.12.0")] [BepInProcess("REPO.exe")] public class Plugin : BaseUnityPlugin { internal enum LateJoinState { Pending, Queued, Processing, Finalizing, Done, Aborted } internal sealed class LateJoinEntry { public Player Target; public int ActorNumber; public string NickName; public LateJoinState State; public string StartScene; public Vector3 SpawnPosition; public float CreatedAt; } internal sealed class PeerCoopCallbackListener : IInRoomCallbacks, IOnEventCallback { public void OnPlayerEnteredRoom(Player newPlayer) { UpdateCoopStateFor(newPlayer); } public void OnPlayerLeftRoom(Player otherPlayer) { if (otherPlayer != null) { RemoveCoopActor(otherPlayer.ActorNumber); } } public void OnPlayerPropertiesUpdate(Player targetPlayer, Hashtable changedProps) { RecordCoopReadyForListener(targetPlayer); if (targetPlayer != null) { UpdateCoopStateFor(targetPlayer); } } public void OnMasterClientSwitched(Player newMasterClient) { HandleMasterClientSwitched(newMasterClient); } public void OnRoomPropertiesUpdate(Hashtable propertiesThatChanged) { HandleExternalRoomProps(propertiesThatChanged); } public void OnEvent(EventData photonEvent) { if (photonEvent.Code == 196) { if (!PhotonNetwork.IsMasterClient) { ApplyCosmeticListEvent(photonEvent); } } else if (photonEvent.Code == 172) { if (!PhotonNetwork.IsMasterClient) { ApplyBatteryStateEvent(photonEvent); } } else { if (PhotonNetwork.IsMasterClient) { return; } bool flag = photonEvent.Code == 174; bool flag2 = photonEvent.Code == 175; if (!flag && !flag2) { return; } try { if (!(photonEvent.CustomData is object[] array) || array.Length < 2) { return; } if (flag && array[0] is string text) { Player masterClient = PhotonNetwork.MasterClient; if (text == "LJS.Rooms" && array[1] is float[] flat && masterClient != null && photonEvent.Sender == masterClient.ActorNumber) { ReceiveExploredRooms(flat); } } else { if (!flag2 || !(array[0] is int) || !(array[1] is bool)) { return; } Player masterClient2 = PhotonNetwork.MasterClient; if (masterClient2 == null || photonEvent.Sender != masterClient2.ActorNumber) { return; } int num = (int)array[0]; bool flag3 = (bool)array[1]; PhotonView val = PhotonView.Find(num); if (!((Object)(object)val == (Object)null)) { ExtractionPoint component = ((Component)val).GetComponent<ExtractionPoint>(); if (!((Object)(object)component == (Object)null)) { component.UpdateLock(flag3); Verbose("ExtractionPoint " + num + " 锁定状态同步:" + flag3); } } } } catch (Exception ex) { Verbose("ExtractionPoint 锁定同步失败:" + ex.Message); } } } } internal enum UiLang { Zh, ZhTw, En, Ja, Ru, Fr, Th, Es, Eo, Hi, Ar, Bn, Pt, De, Ur } private delegate void OwnershipUpdateDelegate(int[] viewOwnerPairs, int targetActor); private sealed class StateSyncEntry { public string TypeName; public string FieldName; public string RpcName; public bool CastToInt; public Type ResolvedType; public FieldInfo ResolvedField; public bool ResolveAttempted; } internal sealed class SteamIdRedactor : ILogListener, IDisposable { private static readonly Regex IdRegex = new Regex("\\b\\d{17}\\b", RegexOptions.Compiled); private readonly List<ILogListener> _inner; internal SteamIdRedactor(List<ILogListener> inner) { _inner = inner; } public void LogEvent(object sender, LogEventArgs eventArgs) { //IL_0087: 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_009c: Expected O, but got Unknown try { object data = eventArgs.Data; string text = (data as string) ?? ((data != null) ? data.ToString() : string.Empty); if (text.Length < 17 || text.IndexOf("7656", StringComparison.Ordinal) < 0) { Forward(sender, eventArgs); return; } string text2 = IdRegex.Replace(text, (Match m) => "****" + m.Value.Substring(m.Value.Length - 4)); if (text2 == text) { Forward(sender, eventArgs); } else { Forward(sender, new LogEventArgs((object)text2, eventArgs.Level, eventArgs.Source)); } } catch { } } private void Forward(object sender, LogEventArgs e) { for (int i = 0; i < _inner.Count; i++) { try { _inner[i].LogEvent(sender, e); } catch { } } } public void Dispose() { } } public const string PluginGuid = "cn_xc.LateJoinSimple"; public const string PluginVersion = "0.12.0"; internal const string CoopVersionKey = "LateJoinSimple.Version"; internal const string CoopProtoKey = "LateJoinSimple.Protocol"; internal const string CoopReadyKey = "LateJoinSimple.Ready"; internal const string CoopModuleCountKey = "LateJoinSimple.ModuleCount"; internal const string CoopSpawnedKey = "LateJoinSimple.ModSpawned"; internal const string CoopTargetKey = "LateJoinSimple.ModTarget"; private Harmony _harmony; private static ConfigEntry<bool> _teleportToHostOnJoin; private static ConfigEntry<bool> _allowJoinInTruck; private static ConfigEntry<bool> _allowJoinInShop; private static ConfigEntry<bool> _allowJoinInLevel; private static ConfigEntry<bool> _showRoomType; private static ConfigEntry<bool> _showRoomName; private static ConfigEntry<int> _hudFontSize; private static ConfigEntry<int> _hudOpacity; private static ConfigEntry<bool> _coopMode; private static ConfigEntry<int> _hudNamesPerLine; private static ConfigEntry<bool> _showHud; internal const string LicenseNotice = "LateJoinSimple (c) 2026 cn_xc; based on LateJoinNow 1.1.0 by Zichen (used with permission). Licensed for unmodified in-game use only. Decompiling, reverse engineering, repacking, porting or redistributing the implementation is prohibited without prior written permission."; private const string AuthorSteamIdHash = "5DDAC0861D67BE9B"; private const string AuthorNickName = "cn-小菜"; private static ConfigEntry<bool> _verboseLog; private static ConfigEntry<bool> _showConflictWarning; private static ConfigEntry<bool> _logModuleViewIds; private static List<string> _sentViewIdDump; private static ConfigEntry<bool> _fixInventorySlots; private static ConfigEntry<bool> _shopOutsideOpen; private static ConfigEntry<bool> _shopOutsideGround; private static ConfigEntry<bool> _shopOutsideSafety; private static ConfigEntry<float> _shopOutsideRadius; private static float _shopNextScan; private static float _shopNextSafety; private static GameObject _shopSafetyFloor; private static ConfigEntry<int> _moduleResendSeconds; private static ConfigEntry<bool> _minimalSyncMode; private static ConfigEntry<string> _uiLanguage; private static ConfigEntry<bool> _gateOnGeneration; private static ConfigEntry<KeyboardShortcut> _roomGateKey; private static int _roomGateManual; private static float _roomGateNextAt; private static float _roomGateLastToggleAt; private static int _hudCacheRoomGateManual = int.MinValue; private static int _hudCacheCdLeft = -1; private static bool _roomClosedForLoading; private static int _legacyInputUsable = -1; private static int _gameStateMainCache = -2; private static string _lastGateLine; private static ConfigEntry<bool> _closeRoomWhileLoading; private static ConfigEntry<bool> _respectExternalGate; private static float _ljsPropsNextAt; private static string _ljsPropsLast = ""; private static ConfigEntry<bool> _showRoomGateLine; private const float GateMaxWaitSeconds = 30f; private const string MuiKey = "cn_xc.LateJoinSimple.Hud"; private static bool _muiReady; private static MethodInfo _muiRegister; private static MethodInfo _muiUnregister; private static MethodInfo _muiSetLanguage; internal static ConfigEntry<bool> _extractionResend; internal static int _suppressAvatarSpawnFrame = -1; internal static float _suppressSpawnUntil; internal static int _suppressSpawnBudget; private static ConfigEntry<bool> _playerHealthSync; private static ConfigEntry<bool> _playerCosmeticsSync; private static ConfigEntry<bool> _applyUpgradesOnJoin; private static bool _voiceMixerGuardLogged; private static readonly Dictionary<int, LateJoinEntry> _lateJoinEntries = new Dictionary<int, LateJoinEntry>(); private static readonly Queue<int> _lateJoinQueue = new Queue<int>(); private static bool _schedulerRunning; private const float SceneAllowedCacheSeconds = 0.5f; private static float _sceneAllowedCacheUntil; private static bool _sceneAllowedCachedValue; private static float _inGameCacheUntil; private static bool _inGameCachedValue; private float _enforceTimer; private const float EnforceInterval = 1f; private static readonly FieldInfo _roundAllExtractionPointsCompletedField = AccessTools.Field(typeof(RoundDirector), "allExtractionPointsCompleted"); private static bool _cfgWatchErrLogged; private static string _cfgWatchPath; private static DateTime _cfgWatchStamp; private static bool _cfgWatchLogOnce; private static bool _conflictWarned; private static bool _conflictCheckedInRoom; private static FieldInfo _rmWaitToChangeScene; private const int CoopProtocolNumber = 2; private static readonly Dictionary<int, bool> _coopByActor = new Dictionary<int, bool>(); private static readonly Dictionary<int, long> _coopReadyByActor = new Dictionary<int, long>(); private static readonly Dictionary<int, int> _coopModuleCountByActor = new Dictionary<int, int>(); private static readonly Dictionary<int, int> _coopSpawnedByActor = new Dictionary<int, int>(); private static readonly Dictionary<int, int> _coopTargetByActor = new Dictionary<int, int>(); private static bool _hostCoopCompatible; private static PeerCoopCallbackListener _coopListener; private static readonly Hashtable _presencePropsScratch = new Hashtable(); private static readonly Hashtable _readyPropsScratch = new Hashtable(); private static readonly Hashtable _clearPropsScratch = new Hashtable(); private static float _changeLevelCooldownUntil; private static bool _changeLevelCooldownRunning; private static bool _lastSceneAllowed; private static bool _steamLobbyLocked; private static float _steamUnlockEnsureNextAt; private static FieldInfo _steamPrivateLobbyField; private static readonly FieldInfo _gmConnectRandomField = F(typeof(GameManager), "connectRandom"); private static readonly WaitForSecondsRealtime _waitGeneratedPoll = new WaitForSecondsRealtime(0.5f); internal const bool LjnCompatEnabled = true; private static bool _foreignHostReported; internal static bool HostIsLateJoinNow; internal const string LjnVersionKey = "LateJoinNow.Version"; internal const string LjnProtoKey = "LateJoinNow.Protocol"; internal const string LjnReadyKey = "LateJoinNow.Ready"; internal const string LjnModuleCountKey = "LateJoinNow.ModuleCount"; private const string LjnProtocolVersion = "1.1.0"; private const int LjnProtocolNumber = 1; private static bool _ljnAnnounced; private static readonly HashSet<int> _scenePersistentViewIds = new HashSet<int>(64); private static readonly FieldInfo _voiceChatsField = F(typeof(RunManager), "voiceChats"); private static readonly FieldInfo _runManagerPunField = F(typeof(RunManager), "runManagerPUN"); private static readonly FieldInfo _punPhotonViewField = F(typeof(RunManagerPUN), "photonView"); private static readonly FieldInfo _eyesOtherGrabPoint = AccessTools.Field(typeof(PlayerEyes), "otherPhysGrabPoint"); internal static float LastLateJoinSyncTime; private static readonly List<string> _hudLines = new List<string>(4); private static readonly List<string> _emptyList = new List<string>(0); private static readonly List<string> _lateJoinStatusLines = new List<string>(4); private static readonly List<LateJoinEntry> _hudEntriesScratch = new List<LateJoinEntry>(8); private static readonly Comparison<LateJoinEntry> _entrySortDesc = (LateJoinEntry a, LateJoinEntry b) => b.ActorNumber.CompareTo(a.ActorNumber); private static GUIStyle _hudLabelStyle; private static GUIStyle _hudShadowStyle; private static int _cachedFontSize; private static int _cachedOpacity; private static float _hudNextRefreshAt; private static bool _hudCacheUseChinese; private static bool _hudCacheShowPlayerCount; private static bool _hudCacheShowRoomType; private static bool _hudCacheShowRoomName; private static int _hudCachePlayerCount; private static int _hudCacheMaxPlayers; private static bool _hudCacheLobbyTypeKnown; private static LobbyTypes _hudCacheLobbyType; private static string _hudCacheServerName; private static bool _hudCacheRoomOpen; private static float _statusLinesNextRefreshAt; private static int _statusLinesLastEntryCount = -1; private static int _statusLinesLastCoopMask; private static readonly FieldInfo _gmLobbyTypeField = F(typeof(GameManager), "lobbyType"); private static readonly FieldInfo _avatarPlayerNameField = F(typeof(PlayerAvatar), "playerName"); private static readonly Dictionary<string, string[]> _trExtra = new Dictionary<string, string[]>(StringComparer.Ordinal) { { "玩家", new string[14] { "玩家", "Player", "プレイヤー", "Игрок", "Joueur", "ผ\u0e39\u0e49เล\u0e48น", "Jugador", "Ludanto", "ख\u093fल\u093eड\u093c\u0940", "لاعب", "খ\u09c7ল\u09cbয\u09bc\u09beড\u09bc", "Jogador", "Spieler", "کھلاڑی" } }, { "房间人数:", new string[14] { "房間人數:", "Players: ", "人数:", "Игроки: ", "Joueurs : ", "จำนวนผ\u0e39\u0e49เล\u0e48น: ", "Jugadores: ", "Ludantoj: ", "ख\u093fल\u093eड\u093c\u0940: ", "اللاعبون: ", "খ\u09c7ল\u09cbয\u09bc\u09beড\u09bc: ", "Jogadores: ", "Spieler: ", "کھلاڑی: " } }, { "房间类型:", new string[14] { "房間類型:", "Room: ", "部屋タイプ:", "Тип комнаты: ", "Type : ", "ประเภทห\u0e49อง: ", "Tipo: ", "Ĉambra tipo: ", "कमर\u0947 क\u093e प\u094dरक\u093eर: ", "نوع الغرفة: ", "র\u09c1ম\u09c7র ধরন: ", "Tipo de sala: ", "Raumtyp: ", "کمرے کی قسم: " } }, { "房间名称:", new string[14] { "房間名稱:", "Name: ", "部屋名:", "Комната: ", "Nom : ", "ช\u0e37\u0e48อห\u0e49อง: ", "Nombre: ", "Ĉambra nomo: ", "कमर\u0947 क\u093e न\u093eम: ", "اسم الغرفة: ", "র\u09c1ম\u09c7র ন\u09beম: ", "Nome da sala: ", "Raumname: ", "کمرے کا نام: " } }, { " 房间 ", new string[14] { " 房間 ", " Rooms ", " 部屋 ", " Комнаты ", " Salles ", " ห\u0e49อง ", " Salas ", " Ĉambroj ", " कमर\u0947 ", " غرف ", " র\u09c1ম ", " Salas ", " Räume ", " کمرے " } }, { "【房主】", new string[14] { "【房主】", "[HOST]", "【ホスト】", "[ХОСТ]", "[HÔTE]", "[เจ\u0e49าบ\u0e49าน]", "[ANFITRIÓN]", "[GASTIGANTO]", "【ह\u094bस\u094dट】", "[المضيف]", "【হ\u09cbস\u09cdট】", "[ANFITRIÃO]", "[HOST]", "[میزبان]" } }, { "【加入者】", new string[14] { "【加入者】", "[CLIENT]", "【参加者】", "[КЛИЕНТ]", "[CLIENT]", "[ผ\u0e39\u0e49เข\u0e49าร\u0e48วม]", "[CLIENTE]", "[KLIENTO]", "【क\u094dल\u093eइ\u0902ट】", "[العميل]", "【ক\u09cdল\u09beয\u09bc\u09c7ন\u09cdট】", "[CLIENTE]", "[CLIENT]", "[کلائنٹ]" } }, { "房间加入:", new string[14] { "房間加入:", "Join: ", "参加可否:", "Вход: ", "Rejoindre : ", "เข\u0e49าร\u0e48วม: ", "Unirse: ", "Aliĝo: ", "श\u093eम\u093fल ह\u094b\u0902: ", "الانضمام: ", "য\u09cbগ দ\u09bfন: ", "Entrar: ", "Beitreten: ", "شامل ہوں: " } }, { "自动", new string[14] { "自動", "auto", "自動", "авто", "auto", "อ\u0e31ตโนม\u0e31ต\u0e34", "auto", "aŭtomate", "स\u094dवत\u0903", "تلقائي", "স\u09cdবয\u09bc\u0982ক\u09cdর\u09bfয\u09bc", "auto", "auto", "خودکار" } }, { "可加入", new string[14] { "可加入", "Open", "入室可", "Открыто", "Ouvert", "เป\u0e34ด", "Abierto", "Malfermita", "ख\u0941ल\u093e", "مفتوح", "খ\u09cbল\u09be", "Aberto", "Offen", "کھلا" } }, { "禁止加入", new string[14] { "禁止加入", "Closed", "入室不可", "Закрыто", "Fermé", "ป\u0e34ด", "Cerrado", "Fermita", "ब\u0902द", "مغلق", "বন\u09cdধ", "Fechado", "Geschlossen", "بند" } }, { Tri(Tri(Tri("未知", "Unknown"), "Unknown"), "Unknown"), new string[14] { Tri(Tri(Tri("未知", "Unknown"), "Unknown"), "Unknown"), "Unknown", "不明", "Неизвестно", "Inconnu", "ไม\u0e48ทราบ", "Desconocido", "Nekonata", "अज\u094dञ\u093eत", "غير معروف", "অজ\u09beন\u09be", "Desconhecido", "Unbekannt", "نامعلوم" } }, { "加载中", new string[14] { "載入中", "Loading", "読み込み中", "Загрузка", "Chargement", "กำล\u0e31งโหลด", "Cargando", "Ŝargado", "ल\u094bड ह\u094b रह\u093e ह\u0948", "جار\u064d التحميل", "ল\u09cbড হচ\u09cdছ\u09c7", "Carregando", "Lädt", "لوڈ ہو رہا ہے" } }, { "等待连接", new string[14] { "等待連線", "Connecting", "接続待ち", "Ожидание", "Connexion", "กำล\u0e31งเช\u0e37\u0e48อมต\u0e48อ", "Conectando", "Konektado", "कन\u0947क\u094dट ह\u094b रह\u093e ह\u0948", "جار\u064d الاتصال", "স\u0982য\u09cbগ হচ\u09cdছ\u09c7", "Conectando", "Verbinden", "جڑ رہا ہے" } }, { "排队中", new string[14] { "排隊中", "Queued", "待機中", "В очереди", "En file", "อย\u0e39\u0e48ในค\u0e34ว", "En cola", "En vico", "कत\u093eर म\u0947\u0902", "في قائمة الانتظار", "স\u09beর\u09bfত\u09c7", "Na fila", "In Warteschlange", "قطار میں" } }, { "精简模式", new string[14] { "精簡模式", "MINIMAL MODE", "簡易モード", "МИНИМАЛЬНЫЙ РЕЖИМ", "MODE MINIMAL", "โหมดย\u0e48อ", "MODO MÍNIMO", "MINIMUMA REĜIMO", "न\u094dय\u0942नतम म\u094bड", "الوضع المبسط", "ন\u09cdয\u09c2নতম ম\u09cbড", "MODO MÍNIMO", "MINIMALMODUS", "کم سے کم موڈ" } }, { "已中途加入", new string[14] { "已中途加入", "Late Joined", "途中参加済み", "Подключился позже", "Arrivé tard", "เข\u0e49าร\u0e48วมภายหล\u0e31ง", "Se unió tarde", "Malfrue aliĝis", "द\u0947र स\u0947 ज\u0941ड\u093c\u0947", "انضم متأخر\u064bا", "দ\u09c7র\u09bfত\u09c7 য\u09cbগদ\u09beন", "Entrou depois", "Später beigetreten", "دیر سے شامل" } }, { "单人模式", new string[14] { "單人模式", "Singleplayer", "ソロ", "Одиночный", "Solo", "เล\u0e48นคนเด\u0e35ยว", "Un jugador", "Unuludanto", "एकल ख\u093fल\u093eड\u093c\u0940", "لاعب واحد", "একক প\u09cdল\u09c7য\u09bc\u09beর", "Um jogador", "Einzelspieler", "اکیلے کھلاڑی" } }, { Tri("公开服务器", "Public"), new string[14] { "公開伺服器", "Public", "公開", "Публичный", "Public", "สาธารณะ", "Público", "Publika", "स\u093eर\u094dवजन\u093fक", "عام", "স\u09beর\u09cdবজন\u09c0ন", "Público", "Öffentlich", "عوامی" } }, { Tri("私人服务器", "Private"), new string[14] { "私人伺服器", "Private", "非公開", "Приватный", "Privé", "ส\u0e48วนต\u0e31ว", "Privado", "Privata", "न\u093fज\u0940", "خاص", "ব\u09cdযক\u09cdত\u09bfগত", "Privado", "Privat", "نجی" } }, { "匹配房间", new string[14] { "匹配房間", "Matchmaking", "マッチング", "Подбор", "Appariement", "จ\u0e31บค\u0e39\u0e48", "Emparejamiento", "Matĉado", "म\u0948चम\u0947क\u093f\u0902ग", "مطابقة", "ম\u09cdয\u09beচম\u09c7ক\u09bf\u0982", "Emparelhamento", "Matchmaking", "میچ میکنگ" } }, { "仅限好友加入", new string[14] { "僅限好友加入", "Friends Only", "フレンドのみ", "Только друзья", "Amis seulement", "เฉพาะเพ\u0e37\u0e48อน", "Solo amigos", "Nur amikoj", "क\u0947वल म\u093fत\u094dर", "الأصدقاء فقط", "শ\u09c1ধ\u09c1 বন\u09cdধ\u09c1র\u09be", "Apenas amigos", "Nur Freunde", "صرف دوست" } }, { "离线", new string[14] { "離線", "Offline", "オフライン", "Оффлайн", "Hors ligne", "ออฟไลน\u0e4c", "Sin conexión", "Senrete", "ऑफ\u093cल\u093eइन", "غير متصل", "অফল\u09beইন", "Offline", "Offline", "آف لائن" } }, { "(优化)", new string[14] { "(最佳化)", " (Optimized)", "(最適化)", "(оптимизация)", " (Optimisé)", " (ปร\u0e31บแต\u0e48ง)", " (Optimizado)", " (Optimumigita)", " (अन\u0941क\u0942ल\u093fत)", " (م\u064fحس\u064e\u0651ن)", " (অপ\u09cdট\u09bfম\u09beইজড)", " (Otimizado)", " (Optimiert)", " (بہتر بنایا گیا)" } }, { "无", new string[14] { "無", "N/A", "なし", "Нет", "N/A", "ไม\u0e48ม\u0e35", "N/D", "N/A", "क\u094bई नह\u0940\u0902", "لا يوجد", "ক\u09bfছ\u09c1 ন\u09c7ই", "N/D", "N/A", "کوئی نہیں" } }, { "协同版本校验:", new string[14] { "協同版本校驗:", "Version check: ", "バージョン確認:", "Проверка версии: ", "Vérif. version : ", "ตรวจสอบเวอร\u0e4cช\u0e31น: ", "Verif. versión: ", "Versio-kontrolo: ", "स\u0902स\u094dकरण ज\u093e\u0901च: ", "فحص الإصدار: ", "স\u0982স\u09cdকরণ য\u09beচ\u09beই: ", "Verificação de versão: ", "Versionsprüfung: ", "ورژن جانچ: " } }, { "开", new string[14] { "開", "on", "オン", "вкл", "activé", "เป\u0e34ด", "activado", "aktiva", "च\u093eल\u0942", "مفع\u0651ل", "চ\u09beল\u09c1", "ativado", "an", "آن" } }, { "(模组作者)", new string[14] { "(模組作者)", " (Mod Author)", "(Mod作者)", " (Автор мода)", " (Auteur du mod)", " (ผ\u0e39\u0e49สร\u0e49างมอด)", " (Autor del mod)", " (Aŭtoro de la modifaĵo)", " (म\u0949ड ल\u0947खक)", " (مؤلف المود)", " (মড ল\u09c7খক)", " (Autor do mod)", " (Mod-Autor)", " (موڈ مصنف)" } }, { "(模组测试员)", new string[14] { "(模組測試員)", " (Tester)", "(テスター)", " (Тестер)", " (Testeur)", " (ผ\u0e39\u0e49ทดสอบ)", " (Probador)", " (Testanto)", " (पर\u0940क\u094dषक)", " (مختب\u0650ر)", " (পর\u09c0ক\u09cdষক)", " (Testador)", " (Tester)", " (ٹیسٹر)" } }, { "<color=#7AB8FF>(仅供参考)</color>", new string[14] { "<color=#7AB8FF>(僅供參考)</color>", " <color=#7AB8FF>(reference only)</color>", "<color=#7AB8FF>(参考のみ)</color>", "<color=#7AB8FF>(справочно)</color>", "<color=#7AB8FF>(indicatif)</color>", "<color=#7AB8FF>(อ\u0e49างอ\u0e34งเท\u0e48าน\u0e31\u0e49น)</color>", "<color=#7AB8FF>(solo referencia)</color>", "<color=#7AB8FF>(nur referenco)</color>", "<color=#7AB8FF>(क\u0947वल स\u0902दर\u094dभ)</color>", "<color=#7AB8FF>(للمرجع فقط)</color>", "<color=#7AB8FF>(শ\u09c1ধ\u09c1 র\u09c7ফ\u09beর\u09c7ন\u09cdস)</color>", "<color=#7AB8FF>(apenas referência)</color>", "<color=#7AB8FF>(nur Referenz)</color>", "<color=#7AB8FF>(صرف حوالہ)</color>" } } }; private static readonly Dictionary<string, string[]> _trAll = new Dictionary<string, string[]>(StringComparer.Ordinal) { { "(模组作者)</color>", new string[10] { " (Auteur du mod)</color>", " (ผ\u0e39\u0e49สร\u0e49างมอด)</color>", " (Autor del mod)</color>", " (Aŭtoro de la modifaĵo)</color>", " (म\u0949ड ल\u0947खक)</color>", " (مؤلف المود)</color>", " (মড ল\u09c7খক)</color>", " (Autor do mod)</color>", " (Mod-Autor)</color>", " (موڈ مصنف)</color>" } }, { "(模组测试员)</color>", new string[10] { " (Testeur)</color>", " (ผ\u0e39\u0e49ทดสอบ)</color>", " (Probador)</color>", " (Testanto)</color>", " (पर\u0940क\u094dषक)</color>", " (مختب\u0650ر)</color>", " (পর\u09c0ক\u09cdষক)</color>", " (Testador)</color>", " (Tester)</color>", " (ٹیسٹر)</color>" } }, { "(房主)</color>", new string[10] { " (Hôte)</color>", " (เจ\u0e49าบ\u0e49าน)</color>", " (Anfitrión)</color>", " (Gastiganto)</color>", " (ह\u094bस\u094dट)</color>", " (المضيف)</color>", " (হ\u09cbস\u09cdট)</color>", " (Anfitrião)</color>", " (Host)</color>", " (میزبان)</color>" } }, { " | 地区:", new string[10] { " | Région : ", " | ภ\u0e39ม\u0e34ภาค: ", " | Región: ", " | Regiono: ", " | क\u094dष\u0947त\u094dर: ", " | المنطقة: ", " | অঞ\u09cdচল: ", " | Região: ", " | Region: ", " | علاقہ: " } }, { "<color=#FFD24A>Backrooms 模式</color>", new string[10] { "<color=#FFD24A>Mode Backrooms</color>", "<color=#FFD24A>โหมด Backrooms</color>", "<color=#FFD24A>Modo Backrooms</color>", "<color=#FFD24A>Reĝimo Backrooms</color>", "<color=#FFD24A>Backrooms म\u094bड</color>", "<color=#FFD24A>وضع Backrooms</color>", "<color=#FFD24A>Backrooms ম\u09cbড</color>", "<color=#FFD24A>Modo Backrooms</color>", "<color=#FFD24A>Backrooms-Modus</color>", "<color=#FFD24A>Backrooms موڈ</color>" } }, { "(已同步 ", new string[10] { " (synchronisé ", " (ซ\u0e34งค\u0e4c ", " (sincronizado ", " (sinkronigita ", " (स\u093f\u0902क ", " (تمت المزامنة ", " (স\u09bfঙ\u09cdক ", " (sincronizado ", " (synchronisiert ", " (ہم آہنگ " } }, { " 个房间)", new string[10] { " salles)", " ห\u0e49อง)", " salas)", " ĉambroj)", " कमर\u0947)", " غرف)", " র\u09c1ম)", " salas)", " Räume)", " کمرے)" } }, { " <color=#7AB8FF>(仅供参考)</color>", new string[10] { " <color=#7AB8FF>(indicatif)</color>", " <color=#7AB8FF>(อ\u0e49างอ\u0e34งเท\u0e48าน\u0e31\u0e49น)</color>", " <color=#7AB8FF>(solo referencia)</color>", " <color=#7AB8FF>(nur referenco)</color>", " <color=#7AB8FF>(क\u0947वल स\u0902दर\u094dभ)</color>", " <color=#7AB8FF>(للمرجع فقط)</color>", " <color=#7AB8FF>(শ\u09c1ধ\u09c1 র\u09c7ফ\u09beর\u09c7ন\u09cdস)</color>", " <color=#7AB8FF>(apenas referência)</color>", " <color=#7AB8FF>(nur Referenz)</color>", " <color=#7AB8FF>(صرف حوالہ)</color>" } }, { "日本", new string[10] { "Japon", "ญ\u0e35\u0e48ป\u0e38\u0e48น", "Japón", "Japanio", "ज\u093eप\u093eन", "اليابان", "জ\u09beপ\u09beন", "Japão", "Japan", "جاپان" } }, { "亚洲", new string[10] { "Asie", "เอเช\u0e35ย", "Asia", "Azio", "एश\u093fय\u093e", "آسيا", "এশ\u09bfয\u09bc\u09be", "Ásia", "Asien", "ایشیا" } }, { "澳大利亚", new string[10] { "Australie", "ออสเตรเล\u0e35ย", "Australia", "Aŭstralio", "ऑस\u094dट\u094dर\u0947ल\u093fय\u093e", "أستراليا", "অস\u09cdট\u09cdর\u09c7ল\u09bfয\u09bc\u09be", "Austrália", "Australien", "آسٹریلیا" } }, { "美国西部", new string[10] { "États-Unis (ouest)", "สหร\u0e31ฐฯ ตะว\u0e31นตก", "EE. UU. (oeste)", "Usono (okcidento)", "अम\u0947र\u093fक\u093e (पश\u094dच\u093fम)", "الولايات المتحدة (غرب)", "ম\u09beর\u09cdক\u09bfন (পশ\u09cdচ\u09bfম)", "EUA (oeste)", "USA (West)", "امریکہ (مغرب)" } }, { "美国东部", new string[10] { "États-Unis (est)", "สหร\u0e31ฐฯ ตะว\u0e31นออก", "EE. UU. (este)", "Usono (oriento)", "अम\u0947र\u093fक\u093e (प\u0942र\u094dव)", "الولايات المتحدة (شرق)", "ম\u09beর\u09cdক\u09bfন (প\u09c2র\u09cdব)", "EUA (leste)", "USA (Ost)", "امریکہ (مشرق)" } }, { "欧洲", new string[10] { "Europe", "ย\u0e38โรป", "Europa", "Eŭropo", "य\u0942र\u094bप", "أوروبا", "ইউর\u09cbপ", "Europa", "Europa", "یورپ" } }, { "南非", new string[10] { "Afrique du Sud", "แอฟร\u0e34กาใต\u0e49", "Sudáfrica", "Sud-Afriko", "दक\u094dष\u093fण अफ\u093c\u094dर\u0940क\u093e", "جنوب أفريقيا", "দক\u09cdষ\u09bfণ আফ\u09cdর\u09bfক\u09be", "África do Sul", "Südafrika", "جنوبی افریقہ" } }, { "南美洲", new string[10] { "Amérique du Sud", "อเมร\u0e34กาใต\u0e49", "Sudamérica", "Sudameriko", "दक\u094dष\u093fण अम\u0947र\u093fक\u093e", "أمريكا الجنوبية", "দক\u09cdষ\u09bfণ আম\u09c7র\u09bfক\u09be", "América do Sul", "Südamerika", "جنوبی امریکہ" } }, { " | 按 ", new string[10] { " | Appuyez sur ", " | กด ", " | Pulsa ", " | Premu ", " | दब\u093eए\u0901 ", " | اضغط ", " | চ\u09beপ\u09c1ন ", " | Pressione ", " | Drücke ", " | دبائیں " } }, { "开放(房主控制)", new string[10] { "ouvert (hôte)", "เป\u0e34ด (โฮสต\u0e4c)", "abierto (anfitrión)", "malfermita (gastiganto)", "ख\u0941ल\u093e (ह\u094bस\u094dट)", "مفتوح (المضيف)", "খ\u09cbল\u09be (হ\u09cbস\u09cdট)", "aberto (anfitrião)", "offen (Host)", "کھلا (میزبان)" } }, { "关闭(房主控制)", new string[10] { "fermé (hôte)", "ป\u0e34ด (โฮสต\u0e4c)", "cerrado (anfitrión)", "fermita (gastiganto)", "ब\u0902द (ह\u094bस\u094dट)", "مغلق (المضيف)", "বন\u09cdধ (হ\u09cbস\u09cdট)", "fechado (anfitrião)", "geschlossen (Host)", "بند (میزبان)" } }, { "开放(手动)", new string[10] { "ouvert (manuel)", "เป\u0e34ด (กำหนดเอง)", "abierto (manual)", "malfermita (mana)", "ख\u0941ल\u093e (म\u0948न\u0941अल)", "مفتوح (يدوي)", "খ\u09cbল\u09be (ম\u09cdয\u09beন\u09c1য\u09bc\u09beল)", "aberto (manual)", "offen (manuell)", "کھلا (دستی)" } }, { "关闭(手动)", new string[10] { "fermé (manuel)", "ป\u0e34ด (กำหนดเอง)", "cerrado (manual)", "fermita (mana)", "ब\u0902द (म\u0948न\u0941अल)", "مغلق (يدوي)", "বন\u09cdধ (ম\u09cdয\u09beন\u09c1য\u09bc\u09beল)", "fechado (manual)", "geschlossen (manuell)", "بند (دستی)" } }, { "房间加入:关卡加载中(不可切换)", new string[10] { "Rejoindre : chargement (verrouillé)", "เข\u0e49าร\u0e48วม: กำล\u0e31งโหลด (ล\u0e47อก)", "Unirse: cargando (bloqueado)", "Aliĝo: ŝargado (ŝlosita)", "श\u093eम\u093fल ह\u094b\u0902: ल\u094bड ह\u094b रह\u093e ह\u0948 (ल\u0949क)", "الانضمام: جار\u064d التحميل (مقفل)", "য\u09cbগ দ\u09bfন: ল\u09cbড হচ\u09cdছ\u09c7 (লক)", "Entrar: carregando (bloqueado)", "Beitreten: lädt (gesperrt)", "شامل ہوں: لوڈ ہو رہا ہے (مقفل)" } }, { "协同版本校验:关(仅校验协议号)", new string[10] { "Vérif. version : OFF (protocole uniquement)", "ตรวจสอบเวอร\u0e4cช\u0e31น: ป\u0e34ด (โปรโตคอลเท\u0e48าน\u0e31\u0e49น)", "Verif. versión: OFF (solo protocolo)", "Versio-kontrolo: OFF (nur protokolo)", "स\u0902स\u094dकरण ज\u093e\u0901च: ब\u0902द (क\u0947वल प\u094dर\u094bट\u094bक\u0949ल)", "فحص الإصدار: إيقاف (البروتوكول فقط)", "স\u0982স\u09cdকরণ য\u09beচ\u09beই: বন\u09cdধ (শ\u09c1ধ\u09c1 প\u09cdর\u09cbট\u09cbকল)", "Verificação de versão: OFF (apenas protocolo)", "Versionsprüfung: AUS (nur Protokoll)", "ورژن جانچ: بند (صرف پروٹوکول)" } }, { "清理 Photon 实例化缓存", new string[10] { "Nettoyage du cache d'instanciation Photon", "ล\u0e49างแคชอ\u0e34นสแตนซ\u0e4c Photon", "Limpieza de caché de instancias Photon", "Purigo de Photon-instanc-kacheo", "Photon इ\u0902स\u094dट\u0947\u0902श\u093fएशन क\u0948श स\u093eफ\u093c कर\u0947\u0902", "تنظيف ذاكرة إنشاء Photon", "Photon ইনস\u09cdট\u09cdয\u09beন\u09cdস ক\u09cdয\u09beশ পর\u09bfষ\u09cdক\u09beর", "Limpeza de cache de instanciação Photon", "Photon-Instanz-Cache bereinigen", "Photon انسٹینس کیش صاف کریں" } }, { "清理 RunManager 缓存", new string[10] { "Nettoyage du cache RunManager", "ล\u0e49างแคช RunManager", "Limpieza de caché de RunManager", "Purigo de RunManager-bufro", "RunManager क\u0948श स\u093eफ\u093c कर\u0947\u0902", "تنظيف ذاكرة RunManager", "RunManager ক\u09cdয\u09beশ পর\u09bfষ\u09cdক\u09beর", "Limpeza de cache do RunManager", "RunManager-Puffer bereinigen", "RunManager کیش صاف کریں" } }, { "晚加入玩家跳过加载动画", new string[10] { "Saut de l'animation de chargement (arrivée tardive)", "ข\u0e49ามแอน\u0e34เมช\u0e31นโหลด (เข\u0e49าร\u0e48วมภายหล\u0e31ง)", "Saltar animación de carga (llegada tardía)", "Salti ŝargan animacion (malfrua aliĝo)", "द\u0947र स\u0947 ज\u0941ड\u093cन\u0947 पर ल\u094bड एन\u093fम\u0947शन छ\u094bड\u093c\u0947\u0902", "تخطي رسوم التحميل (انضمام متأخر)", "ল\u09cbড অ\u09cdয\u09beন\u09bfম\u09c7শন ব\u09beদ (দ\u09c7র\u09bfত\u09c7 য\u09cbগদ\u09beন)", "Pular animação de carregamento (entrada tardia)", "Ladeanimation überspringen (spät beigetreten)", "دیر سے شامل پر لوڈ اینیمیشن چھوڑیں" } }, { "菜单弹窗提示", new string[10] { "Notifications de menu", "การแจ\u0e49งเต\u0e37อนเมน\u0e39", "Avisos de menú", "Menuaj sciigoj", "म\u0947न\u094dय\u0942 स\u0942चन\u093eए\u0901", "إشعارات القائمة", "ম\u09c7ন\u09c1 ব\u09bfজ\u09cdঞপ\u09cdত\u09bf", "Avisos de menu", "Menü-Hinweise", "مینو اطلاعات" } }, { "房间类型判定", new string[10] { "Détection du type de salon", "ตรวจชน\u0e34ดห\u0e49อง", "Detección de tipo de sala", "Ĉambrotipa identigo", "कमर\u0947 क\u093e प\u094dरक\u093eर पहच\u093eन", "تحديد نوع الغرفة", "র\u09c1ম\u09c7র ধরন শন\u09beক\u09cdত", "Detecção de tipo de sala", "Raumtyp-Erkennung", "کمرے کی قسم کی شناخت" } }, { "公开房名加[中途加入]前缀", new string[10] { "Préfixe [arrivée tardive] sur les salons publics", "เต\u0e34ม [เข\u0e49าร\u0e48วมภายหล\u0e31ง] นำหน\u0e49าห\u0e49องสาธารณะ", "Prefijo [llegada tardía] en salas públicas", "Prefikso [malfrua aliĝo] en publikaj ĉambroj", "स\u093eर\u094dवजन\u093fक कमर\u0947 क\u0947 न\u093eम म\u0947\u0902 [द\u0947र स\u0947 ज\u0941ड\u093cन\u093e] उपसर\u094dग", "بادئة [انضمام متأخر] على الغرف العامة", "স\u09beর\u09cdবজন\u09c0ন র\u09c1ম\u09c7 [দ\u09c7র\u09bfত\u09c7 য\u09cbগদ\u09beন] প\u09cdর\u09bfফ\u09bfক\u09cdস", "Prefixo [entrada tardia] em salas públicas", "Präfix [spät beigetreten] bei öffentlichen Räumen", "عوامی کمرے کے نام پر [دیر سے شمولیت] سابقہ" } }, { "修复 GumballValuable 越界崩溃", new string[10] { "Correctif de débordement GumballValuable", "แก\u0e49ไข GumballValuable เก\u0e34นขอบเขต", "Corrección de desbordamiento GumballValuable", "Ĝustigo de GumballValuable-trapaso", "GumballValuable स\u0940म\u093e-प\u093eर क\u094dर\u0948श स\u0941ध\u093eर", "إصلاح تجاوز GumballValuable", "GumballValuable স\u09c0ম\u09be-ছ\u09beড\u09bc\u09beন\u09cb ঠ\u09bfক", "Correção de estouro GumballValuable", "GumballValuable-Überlauf-Fix", "GumballValuable حد سے تجاوز کی مرمت" } }, { "晚加入加载界面守门", new string[10] { "Garde de l'écran de chargement (arrivée tardive)", "การ\u0e4cดหน\u0e49าจอโหลด (เข\u0e49าร\u0e48วมภายหล\u0e31ง)", "Protección de pantalla de carga (llegada tardía)", "Gardo de ŝarga ekrano (malfrua aliĝo)", "द\u0947र स\u0947 ज\u0941ड\u093cन\u0947 पर ल\u094bड स\u094dक\u094dर\u0940न ग\u093eर\u094dड", "حماية شاشة التحميل (انضمام متأخر)", "ল\u09cbড স\u09cdক\u09cdর\u09bfন গ\u09beর\u09cdড (দ\u09c7র\u09bfত\u09c7 য\u09cbগদ\u09beন)", "Proteção da tela de carregamento (entrada tardia)", "Ladebildschirm-Schutz (spät beigetreten)", "دیر سے شامل پر لوڈ اسکرین گارڈ" } }, { "晚加入者尸体组件补创", new string[10] { "Recréation des composants de cadavre (arrivée tardive)", "สร\u0e49างช\u0e34\u0e49นส\u0e48วนศพใหม\u0e48 (เข\u0e49าร\u0e48วมภายหล\u0e31ง)", "Recreación de componentes de cadáver (llegada tardía)", "Rekreado de kadavraj komponantoj (malfrua aliĝo)", "द\u0947र स\u0947 ज\u0941ड\u093cन\u0947 व\u093eल\u0947 क\u093e शव घटक प\u0941न\u0903 बन\u093eए\u0901", "إعادة إنشاء مكو\u0651نات الجثة (انضمام متأخر)", "ম\u09c3তদ\u09c7হ উপ\u09beদ\u09beন প\u09c1ন\u0983ন\u09bfর\u09cdম\u09beণ (দ\u09c7র\u09bfত\u09c7 য\u09cbগদ\u09beন)", "Recriação de componentes de cadáver (entrada tardia)", "Leichen-Komponenten neu erzeugen (spät beigetreten)", "دیر سے شامل کے نعش اجزاء دوبارہ بنائیں" } }, { "晚加入者墙体/内饰同步", new string[10] { "Synchro murs/intérieur (arrivée tardive)", "ซ\u0e34งค\u0e4cผน\u0e31ง/ภายใน (เข\u0e49าร\u0e48วมภายหล\u0e31ง)", "Sincronización muros/interior (llegada tardía)", "Sinkronigo muroj/internajxo (malfrua aliĝo)", "द\u0947र स\u0947 ज\u0941ड\u093cन\u0947 व\u093eल\u0947 क\u0940 द\u0940व\u093eर/इ\u0902ट\u0940र\u093fयर स\u093f\u0902क", "مزامنة الجدران/الداخل (انضمام متأخر)", "দ\u09c7য\u09bc\u09beল/অভ\u09cdযন\u09cdতর স\u09bfঙ\u09cdক (দ\u09c7র\u09bfত\u09c7 য\u09cbগদ\u09beন)", "Sincronização paredes/interior (entrada tardia)", "Wände/Innenraum-Sync (spät beigetreten)", "دیر سے شامل کی دیواریں/اندرونی ہم آہنگی" } }, { "晚加入者宝物状态同步", new string[10] { "Synchro de l'état des objets de valeur (arrivée tardive)", "ซ\u0e34งค\u0e4cสถานะของม\u0e35ค\u0e48า (เข\u0e49าร\u0e48วมภายหล\u0e31ง)", "Sincronización de estado de objetos de valor (llegada tardía)", "Sinkronigo de valorajxoj (malfrua aliĝo)", "द\u0947र स\u0947 ज\u0941ड\u093cन\u0947 व\u093eल\u0947 क\u0940 क\u093c\u0940मत\u0940 स\u093eम\u093eन स\u094dथ\u093fत\u093f स\u093f\u0902क", "مزامنة حالة الأشياء الثمينة (انضمام متأخر)", "ম\u09c2ল\u09cdযব\u09beন স\u09beমগ\u09cdর\u09c0র অবস\u09cdথ\u09be স\u09bfঙ\u09cdক (দ\u09c7র\u09bfত\u09c7 য\u09cbগদ\u09beন)", "Sincronização de estado de itens de valor (entrada tardia)", "Wertsachen-Status-Sync (spät beigetreten)", "دیر سے شامل کے قیمتی سامان کی حالت ہم آہنگ" } } }; private static readonly Dictionary<string, string[]> _tr8 = new Dictionary<string, string[]>(StringComparer.Ordinal) { { "玩家", new string[8] { "玩家", "Player", "プレイヤー", "Игрок", "Joueur", "ผ\u0e39\u0e49เล\u0e48น", "Jugador", "Ludanto" } }, { "房间人数:", new string[8] { "房間人數:", "Players: ", "人数:", "Игроки: ", "Joueurs : ", "จำนวนผ\u0e39\u0e49เล\u0e48น: ", "Jugadores: ", "Ludantoj: " } }, { "房间类型:", new string[8] { "房間類型:", "Room: ", "部屋タイプ:", "Тип комнаты: ", "Type : ", "ประเภทห\u0e49อง: ", "Tipo: ", "Ĉambra tipo: " } }, { "房间名称:", new string[8] { "房間名稱:", "Name: ", "部屋名:", "Комната: ", "Nom : ", "ช\u0e37\u0e48อห\u0e49อง: ", "Nombre: ", "Ĉambra nomo: " } }, { " 房间 ", new string[8] { " 房間 ", " Rooms ", " 部屋 ", " Комнаты ", " Salles ", " ห\u0e49อง ", " Salas ", " Ĉambroj " } }, { "【房主】", new string[8] { "【房主】", "[HOST]", "【ホスト】", "[ХОСТ]", "[HÔTE]", "[เจ\u0e49าบ\u0e49าน]", "[ANFITRIÓN]", "[GASTIGANTO]" } }, { "【加入者】", new string[8] { "【加入者】", "[CLIENT]", "【参加者】", "[КЛИЕНТ]", "[CLIENT]", "[ผ\u0e39\u0e49เข\u0e49าร\u0e48วม]", "[CLIENTE]", "[KLIENTO]" } }, { "房间加入:", new string[8] { "房間加入:", "Join: ", "参加可否:", "Вход: ", "Rejoindre : ", "เข\u0e49าร\u0e48วม: ", "Unirse: ", "Aliĝo: " } }, { "自动", new string[8] { "自動", "auto", "自動", "авто", "auto", "อ\u0e31ตโนม\u0e31ต\u0e34", "auto", "aŭtomate" } }, { "可加入", new string[8] { "可加入", "Open", "入室可", "Открыто", "Ouvert", "เป\u0e34ด", "Abierto", "Malfermita" } }, { "禁止加入", new string[8] { "禁止加入", "Closed", "入室不可", "Закрыто", "Fermé", "ป\u0e34ด", "Cerrado", "Fermita" } }, { Tri(Tri(Tri("未知", "Unknown"), "Unknown"), "Unknown"), new string[8] { Tri(Tri(Tri("未知", "Unknown"), "Unknown"), "Unknown"), "Unknown", "不明", "Неизвестно", "Inconnu", "ไม\u0e48ทราบ", "Desconocido", "Nekonata" } }, { "加载中", new string[8] { "載入中", "Loading", "読み込み中", "Загрузка", "Chargement", "กำล\u0e31งโหลด", "Cargando", "Ŝargado" } }, { "等待连接", new string[8] { "等待連線", "Connecting", "接続待ち", "Ожидание", "Connexion", "กำล\u0e31งเช\u0e37\u0e48อมต\u0e48อ", "Conectando", "Konektado" } }, { "排队中", new string[8] { "排隊中", "Queued", "待機中", "В очереди", "En file", "อย\u0e39\u0e48ในค\u0e34ว", "En cola", "En vico" } }, { "已中途加入", new string[8] { "已中途加入", "Late Joined", "途中参加済み", "Подключился позже", "Arrivé tard", "เข\u0e49าร\u0e48วมภายหล\u0e31ง", "Se unió tarde", "Malfrue aliĝis" } }, { "单人模式", new string[8] { "單人模式", "Singleplayer", "ソロ", "Одиночный", "Solo", "เล\u0e48นคนเด\u0e35ยว", "Un jugador", "Unuludanto" } }, { Tri("公开服务器", "Public"), new string[8] { "公開伺服器", "Public", "公開", "Публичный", "Public", "สาธารณะ", "Público", "Publika" } }, { Tri("私人服务器", "Private"), new string[8] { "私人伺服器", "Private", "非公開", "Приватный", "Privé", "ส\u0e48วนต\u0e31ว", "Privado", "Privata" } }, { "匹配房间", new string[8] { "匹配房間", "Matchmaking", "マッチング", "Подбор", "Appariement", "จ\u0e31บค\u0e39\u0e48", "Emparejamiento", "Matĉado" } }, { "仅限好友加入", new string[8] { "僅限好友加入", "Friends Only", "フレンドのみ", "Только друзья", "Amis seulement", "เฉพาะเพ\u0e37\u0e48อน", "Solo amigos", "Nur amikoj" } }, { "离线", new string[8] { "離線", "Offline", "オフライン", "Оффлайн", "Hors ligne", "ออฟไลน\u0e4c", "Sin conexión", "Senrete" } }, { "(优化)", new string[8] { "(最佳化)", " (Optimized)", "(最適化)", "(оптимизация)", " (Optimisé)", " (ปร\u0e31บแต\u0e48ง)", " (Optimizado)", " (Optimumigita)" } }, { "无", new string[8] { "無", "N/A", "なし", "Нет", "N/A", "ไม\u0e48ม\u0e35", "N/D", "N/A" } }, { "协同版本校验:", new string[8] { "協同版本校驗:", "Version check: ", "バージョン確認:", "Проверка версии: ", "Vérif. version : ", "ตรวจสอบเวอร\u0e4cช\u0e31น: ", "Verif. versión: ", "Versio-kontrolo: " } }, { "开", new string[8] { "開", "on", "オン", "вкл", "activé", "เป\u0e34ด", "activado", "aktiva" } }, { "精简模式", new string[8] { "精簡模式", "MINIMAL MODE", "簡易モード", "МИНИМАЛЬНЫЙ РЕЖИМ", "MODE MINIMAL", "โหมดย\u0e48อ", "MODO MÍNIMO", "MINIMUMA REĜIMO" } }, { "(模组作者)", new string[8] { "(模組作者)", " (Mod Author)", "(Mod作者)", " (Автор мода)", " (Auteur du mod)", " (ผ\u0e39\u0e49สร\u0e49างมอด)", " (Autor del mod)", " (Aŭtoro de la modifaĵo)" } }, { "(模组测试员)", new string[8] { "(模組測試員)", " (Tester)", "(テスター)", " (Тестер)", " (Testeur)", " (ผ\u0e39\u0e49ทดสอบ)", " (Probador)", " (Testanto)" } }, { "<color=#7AB8FF>(仅供参考)</color>", new string[8] { "<color=#7AB8FF>(僅供參考)</color>", " <color=#7AB8FF>(reference only)</color>", "<color=#7AB8FF>(参考のみ)</color>", "<color=#7AB8FF>(справочно)</color>", "<color=#7AB8FF>(indicatif)</color>", "<color=#7AB8FF>(อ\u0e49างอ\u0e34งเท\u0e48าน\u0e31\u0e49น)</color>", "<color=#7AB8FF>(solo referencia)</color>", "<color=#7AB8FF>(nur referenco)</color>" } } }; private static readonly Dictionary<string, string[]> _trJaRu = new Dictionary<string, string[]>(StringComparer.Ordinal) { { "、", new string[2] { "、", ", " } }, { "玩家", new string[2] { "プレイヤー", "Игрок" } }, { "(模组作者)", new string[2] { "(Mod作者)", " (Автор мода)" } }, { "(房主)</color>", new string[2] { "(ホスト)</color>", " (Хост)</color>" } }, { "(模组作者)</color>", new string[2] { "(Mod作者)</color>", " (Автор мода)</color>" } }, { "(模组测试员)</color>", new string[2] { "(テスター)</color>", " (Тестер)</color>" } }, { "房间类型:", new string[2] { "部屋タイプ:", "Тип комнаты: " } }, { "房间名称:", new string[2] { "部屋名:", "Комната: " } }, { " | 地区:", new string[2] { " | 地域:", " | Регион: " } }, { "【房主】", new string[2] { "【ホスト】", "[ХОСТ]" } }, { "【加入者】", new string[2] { "【参加者】", "[КЛИЕНТ]" } }, { " 房间 ", new string[2] { " 部屋 ", " Комнаты " } }, { "<color=#FFD24A>Backrooms 模式</color>", new string[2] { "<color=#FFD24A>Backrooms モード</color>", "<color=#FFD24A>Режим Backrooms</color>" } }, { " <color=#7AB8FF>(仅供参考)</color>", new string[2] { " <color=#7AB8FF>(参考のみ)</color>", " <color=#7AB8FF>(справочно)</color>" } }, { "等待连接", new string[2] { "接続待ち", "Ожидание" } }, { "排队中", new string[2] { "待機中", "В очереди" } }, { "加载中", new string[2] { "読み込み中", "Загрузка" } }, { "已中途加入", new string[2] { "途中参加済み", "Подключился позже" } }, { "(优化)", new string[2] { "(最適化)", "(оптимизация)" } }, { "单人模式", new string[2] { "ソロ", "Одиночный" } }, { Tri("公开服务器", "Public"), new string[2] { "公開", "Публичный" } }, { Tri("私人服务器", "Private"), new string[2] { "非公開", "Приватный" } }, { "匹配房间", new string[2] { "マッチング", "Подбор" } }, { Tri(Tri(Tri("未知", "Unknown"), "Unknown"), "Unknown"), new string[2] { "不明", "Неизвестно" } }, { "禁止加入", new string[2] { "入室不可", "Закрыто" } }, { "可加入", new string[2] { "入室可", "Открыто" } }, { "离线", new string[2] { "オフライン", "Оффлайн" } }, { "日本", new string[2] { "日本", "Япония" } }, { "亚洲", new string[2] { "アジア", "Азия" } }, { "澳大利亚", new string[2] { "オーストラリア", "Австралия" } }, { "美国西部", new string[2] { "米国西部", "США (запад)" } }, { "美国东部", new string[2] { "米国東部", "США (восток)" } }, { "欧洲", new string[2] { "ヨーロッパ", "Европа" } }, { "南非", new string[2] { "南アフリカ", "ЮАР" } }, { "南美洲", new string[2] { "南米", "Южная Америка" } }, { "无", new string[2] { "なし", "Нет" } }, { "仅限好友加入", new string[2] { "フレンドのみ", "Только друзья" } }, { "清理 Photon 实例化缓存", new string[2] { "Photon キャッシュ整理", "Очистка кэша Photon" } }, { "清理 RunManager 缓存", new string[2] { "RunManager バッファ整理", "Очистка буфера RunManager" } }, { "晚加入玩家跳过加载动画", new string[2] { "途中参加者の演出スキップ", "Пропуск анимации загрузки" } }, { "菜单弹窗提示", new string[2] { "メニュー通知", "Уведомления меню" } }, { "房间类型判定", new string[2] { "部屋タイプ判定", "Тип комнаты" } }, { "公开房名加[中途加入]前缀", new string[2] { "公開部屋名に[途中参加]", "Префикс [поздний вход]" } }, { "修复 GumballValuable 越界崩溃", new string[2] { "GumballValuable 修正", "Исправление GumballValuable" } }, { "晚加入加载界面守门", new string[2] { "ロード画面ガード", "Защита экрана загрузки" } }, { "晚加入者尸体组件补创", new string[2] { "死体パーツ補完", "Части трупа" } }, { "晚加入者墙体/内饰同步", new string[2] { "壁・内装同期", "Стены/интерьер" } }, { "晚加入者宝物状态同步", new string[2] { "宝物状態同期", "Состояние ценностей" } }, { "(已同步 ", new string[2] { "(同期済み ", " (синхр. " } } }; private static int _mapRoomCount; private static int _mapWallCount; private static int _mapDoorCount; private static float _mapCountsNextAt; private static string _mapCountsSceneName; private static string _hudRoleLineCache = string.Empty; private static bool _hudRoleLineDirty = true; private static bool _lastIsMasterClient; internal const string MapCountsKey = "LJS.MapCounts"; private static int _hostRoomCount = -1; private static int _hostWallCount = -1; private static int _hostDoorCount = -1; private static readonly string[] SupporterSteamIdHashes = new string[2] { "54A3737943CD6489", "38E689F0FDF4A203" }; private static readonly string[] CollabAuthorSteamIdHashes = new string[1] { "C73F699985E18338" }; private static readonly string[] TesterSteamIdHashes = new string[2] { "82FA455A276FF987", "EAA9D5AA2C2052CA" }; private static readonly WaitForSecondsRealtime _wait02 = new WaitForSecondsRealtime(0.2f); private static bool _clientLateJoinFixesDone; private static bool _clientLateJoinCoroutineRunning; private static float _clientFixRetryNextAt; private static bool _clientFixRetriggerDone; private static FieldInfo _physGrabSpawnedField; private static float _nextSteamLobbyJoinAttempt; private static MethodInfo _steamJoinLobbyMethod; private static FieldInfo _steamIdValueField; private static FieldInfo _steamCurrentLobbyField; private static PropertyInfo _steamLobbyIdProp; private static PropertyInfo _steamLobbyIdIsValidProp; private static readonly FieldInfo _deathHeadField = F(typeof(PlayerAvatar), "playerDeathHead"); private static readonly FieldInfo _deathSpotField = F(typeof(PlayerAvatar), "deathSpot"); private static readonly FieldInfo _tumbleField = F(typeof(PlayerAvatar), "tumble"); private static readonly FieldInfo _networkServerNameField = F(typeof(DataDirector), "networkServerName"); private static readonly FieldInfo _rdExtractionPointCurrentField = F(typeof(RoundDirector), "extractionPointCurrent"); private static int _moduleRpcReceived; internal static int _moduleRpcDeduped; private static float _moduleRpcLastLogAt; private static readonly MethodInfo _ownershipUpdateMethod = typeof(PhotonNetwork).GetMethod("OwnershipUpdate", BindingFlags.Static | BindingFlags.NonPublic); private static readonly OwnershipUpdateDelegate _ownershipUpdate = ((_ownershipUpdateMethod != null) ? ((OwnershipUpdateDelegate)Delegate.CreateDelegate(typeof(OwnershipUpdateDelegate), _ownershipUpdateMethod)) : null); private static readonly int[] _ownershipScratch = new int[2]; private static readonly int[] _projectileOwnershipScratch = new int[2]; private static readonly List<KeyValuePair<PlayerAvatar, int>> _oldAvatarsScratch = new List<KeyValuePair<PlayerAvatar, int>>(8); private static readonly WaitForSecondsRealtime _wait05 = new WaitForSecondsRealtime(0.5f); private static readonly WaitForSecondsRealtime _wait25 = new WaitForSecondsRealtime(2.5f); internal const string RoomSyncTag = "LJS.Rooms"; internal const byte BatteryEventCode = 172; internal const byte RoomVisEventCode = 174; internal const byte ExtractionLockEventCode = 175; internal const byte CosmeticListEventCode = 196; private static readonly FieldInfo _rdCosmeticList = AccessTools.Field(typeof(RoundDirector), "cosmeticWorldObjectsExtracted"); private static ConfigEntry<bool> _cosmeticCatchup; private static readonly FieldInfo _ibLifeField = F(typeof(ItemBattery), "batteryLife"); private static readonly FieldInfo _ibLifeIntField = F(typeof(ItemBattery), "batteryLifeInt"); private static readonly FieldInfo _rvExploredField = F(typeof(RoomVolume), "Explored"); private static readonly FieldInfo _rvMapModuleField = F(typeof(RoomVolume), "MapModule"); private static readonly List<Vector3> _pendingRoomReveal = new List<Vector3>(256); private static bool _roomRevealRunning; private const float RoomRevealTolerance = 0.5f; private static bool _inventoryFixRunning; private static int _inventorySlotsFixed; private static readonly Dictionary<int, HashSet<int>> _moduleSentByActor = new Dictionary<int, HashSet<int>>(); private static readonly StateSyncEntry[] _stateSyncEntries = new StateSyncEntry[22] { S("ExtractionPoint", "StateSetRPC", castToInt: false), S("ShopKeycardDoor", "StateSetRPC"), S("UpgradeStand", "StateSetRPC"), S("ItemValuableBox", "StateSetRPC"), S("ItemMine", "StateSetRPC", castToInt: true, "state"), S("ItemMelee", "StateSetRPC"), S("ItemGun", "StateSetRPC", castToInt: true, "stateCurrent"), S("ItemDrone", "StateSetRPC"), S("ItemVehicle", "SetStateRPC"), S("ItemCartCannonMain", "StateSetRPC", castToInt: true, "stateCurrent"), S("FanTrap", "SetStateRPC", castToInt: false), S("CrystalBallValuable", "SetStateRPC", castToInt: false), S("BlenderValuable", "SetStateRPC", castToInt: false), S("FlamethrowerValuable", "SetStateRPC", castToInt: false), S("IceSawValuable", "SetStateRPC", castToInt: false), S("FireExtinguisherValuable", "SetStateRPC", castToInt: false), S("ScreamDollValuable", "SetStateRPC", castToInt: false), S("JackhammerValuable", "SetStateRPC", castToInt: false), S("TrafficLightValuable", "SetStateRPC", castToInt: false), S("ValuableWizardTimeGlass", "SetStateRPC", castToInt: false), S("ValuableArcticSnowBike", "SetStateRPC"), S("ValuableEgg", "SetStateRPC", castToInt: false) }; private static readonly FieldInfo _modTop = F(typeof(Module), "ConnectingTop"); private static readonly FieldInfo _modBottom = F(typeof(Module), "ConnectingBottom"); private static readonly FieldInfo _modRight = F(typeof(Module), "ConnectingRight"); private static readonly FieldInfo _modLeft = F(typeof(Module), "ConnectingLeft"); private static readonly FieldInfo _modFirst = F(typeof(Module), "First"); private static readonly FieldInfo _modType = F(typeof(Module), "type"); private static readonly FieldInfo _modTopRight = F(typeof(Module), "ConnectingTopRight"); private static readonly FieldInfo _modTopLeft = F(typeof(Module), "ConnectingTopLeft"); private static readonly FieldInfo _modRightTop = F(typeof(Module), "ConnectingRightTop"); private static readonly FieldInfo _modRightBot = F(typeof(Module), "ConnectingRightBot"); private static readonly FieldInfo _modBotRight = F(typeof(Module), "ConnectingBottomRight"); private static readonly FieldInfo _modBotLeft = F(typeof(Module), "ConnectingBottomLeft"); private static readonly FieldInfo _modLeftTop = F(typeof(Module), "ConnectingLeftTop"); private static readonly FieldInfo _modLeftBot = F(typeof(Module), "ConnectingLeftBot"); private static readonly FieldInfo _modDone = F(typeof(Module), "SetupDone"); private static readonly FieldInfo _lgSpawned = F(typeof(LevelGenerator), "ModulesSpawned"); private static readonly FieldInfo _lgSpawnedTarget = F(typeof(LevelGenerator), "ModulesSpawnedTarget"); private static readonly FieldInfo _lgModuleAmount = F(typeof(LevelGenerator), "ModuleAmount"); private static readonly FieldInfo _valSet = F(typeof(ValuableObject), "dollarValueSet"); private static readonly FieldInfo _valCurrent = F(typeof(ValuableObject), "dollarValueCurrent"); private static readonly FieldInfo _valDisc = F(typeof(ValuableObject), "discovered"); private static readonly FieldInfo _valHaul = F(typeof(ValuableObject), "inStartRoom"); private static readonly FieldInfo _itemValue = F(typeof(ItemAttributes), "value"); private static readonly FieldInfo _avatarMoving = F(typeof(PlayerAvatar), "isMoving"); private static readonly FieldInfo _avatarInputRaw = F(typeof(PlayerAvatar), "InputDirectionRaw"); private static readonly FieldInfo _avatarAnimDone = F(typeof(PlayerAvatar), "levelAnimationCompleted"); private static FieldInfo _epIsLockedField; private static readonly WaitForSecondsRealtime _wait2 = new WaitForSecondsRealtime(2f); private static readonly WaitForSecondsRealtime _wait15 = new WaitForSecondsRealtime(1.5f); private static bool _refreshOldPlayersBusy; private static readonly FieldInfo _phHealthField = F(typeof(PlayerHealth), "health"); private static readonly FieldInfo _phMaxHealthField = F(typeof(PlayerHealth), "maxHealth"); private static readonly FieldInfo _phHealthSetField = F(typeof(PlayerHealth), "healthSet"); private static readonly FieldInfo _avDeadSetField = F(typeof(PlayerAvatar), "deadSet"); private static readonly FieldInfo _statsDictsField = F(typeof(StatsManager), "dictionaryOfDictionaries"); private static readonly Dictionary<string, MethodInfo> _rightAwayCache = new Dictionary<string, MethodInfo>(); private static readonly FieldInfo _steamIdField = F(typeof(PlayerAvatar), "steamID"); private static readonly FieldInfo _pcJumpExtraField = F(typeof(PlayerController), "JumpExtra"); private static readonly FieldInfo _pcEnergyStartField = F(typeof(PlayerController), "EnergyStart"); private static readonly FieldInfo _pcSprintSpeedField = F(typeof(PlayerController), "SprintSpeed"); private static readonly FieldInfo _phViewField = F(typeof(PlayerHealth), "photonView"); private static readonly FieldInfo _pcColorsField = F(typeof(PlayerCosmetics), "colorsEquipped"); private static readonly FieldInfo _avatarNameField = F(typeof(PlayerAvatar), "playerName"); private static readonly FieldInfo _pcViewField = F(typeof(PlayerCosmetics), "photonView"); private static readonly Dictionary<string, int> _appliedUpgradeValues = new Dictionary<string, int>(); private static float _stuckCheckUntil; private static float _nextStuckFixAt; private static FieldInfo _avatarRbField; private static float _nextStuckAvatarCheck; private static float _shopAllSpawnedUntil; private static float _shopAllSpawnedNext; private static MethodInfo _addToStatsForcedMethod; private static readonly FieldInfo _diagNameField = F(typeof(PlayerAvatar), "playerName"); private static bool _sceneDiagDone; private static readonly Dictionary<int, bool> _playerJumpedFlags = new Dictionary<int, bool>(); public static Plugin Instance { get; private set; } internal static Dictionary<int, LateJoinEntry>.ValueCollection LateJoinEntryValues => _lateJoinEntries.Values; internal static int PendingLateJoinerCount { get { int num = 0; foreach (LateJoinEntry value in _lateJoinEntries.Values) { if (value != null && (value.State == LateJoinState.Pending || value.State == LateJoinState.Queued || value.State == LateJoinState.Processing || value.State == LateJoinState.Finalizing)) { num++; } } return num; } } internal static bool CoopModeEnabled { get { if (_coopMode != null) { return _coopMode.Value; } return true; } } internal static bool IsInChangeLevelCooldown => Time.unscaledTime < _changeLevelCooldownUntil; internal static float CooldownLeft => Mathf.Max(0f, _changeLevelCooldownUntil - Time.unscaledTime); internal static FieldInfo DeathHeadField => _deathHeadField; internal static FieldInfo TumbleField => _tumbleField; public static bool TeleportToHostOnJoinEnabled { get { if (_teleportToHostOnJoin != null) { return _teleportToHostOnJoin.Value; } return false; } } internal static bool HudEnabled { get { if (_showHud != null) { return _showHud.Value; } return true; } } internal static int HudFontSize { get { int num = ((_hudFontSize != null) ? _hudFontSize.Value : 16); if (num < 8) { num = 8; } if (num > 40) { num = 40; } return num; } } internal static int HudOpacityPercent { get { int num = ((_hudOpacity != null) ? _hudOpacity.Value : 80); if (num < 5) { num = 5; } if (num > 100) { num = 100; } return num; } } internal static int HudNamesPerLine { get { int num = ((_hudNamesPerLine != null) ? _hudNamesPerLine.Value : 5); if (num < 1) { num = 1; } if (num > 10) { num = 10; } return num; } } internal static bool HudShowPlayerCount => true; internal static bool HudShowRoomType { get { if (_showRoomType != null) { return _showRoomType.Value; } return false; } } internal static bool HudShowRoomName { get { if (_showRoomName != null) { return _showRoomName.Value; } return false; } } internal static bool ShowJoinStatusEnabled => true; internal static UiLang Lang { get { try { string text = ((_uiLanguage == null) ? null : _uiLanguage.Value); if (string.IsNullOrEmpty(text)) { return UiLang.Zh; } text = text.Trim(); if (text.Equals("繁體中文", StringComparison.OrdinalIgnoreCase) || text.Equals("Traditional Chinese", StringComparison.OrdinalIgnoreCase)) { return UiLang.ZhTw; } if (text.Equals("English", StringComparison.OrdinalIgnoreCase)) { return UiLang.En; } if (text.Equals("日本語", StringComparison.OrdinalIgnoreCase) || text.Equals("Japanese", StringComparison.OrdinalIgnoreCase)) { return UiLang.Ja; } if (text.Equals("Русский", StringComparison.OrdinalIgnoreCase) || text.Equals("Russian", StringComparison.OrdinalIgnoreCase)) { return UiLang.Ru; } if (text.Equals("Français", StringComparison.OrdinalIgnoreCase) || text.Equals("French", StringComparison.OrdinalIgnoreCase)) { return UiLang.Fr; } if (text.Equals("ไทย", StringComparison.OrdinalIgnoreCase) || text.Equals("Thai", StringComparison.OrdinalIgnoreCase)) { return UiLang.Th; } if (text.Equals("Español", StringComparison.OrdinalIgnoreCase) || text.Equals("Spanish", StringComparison.OrdinalIgnoreCase)) { return UiLang.Es; } if (text.Equals("Esperanto", StringComparison.OrdinalIgnoreCase) || text.Equals("世界语", StringComparison.OrdinalIgnoreCase)) { return UiLang.Eo; } if (text.Equals("ह\u093fन\u094dद\u0940", StringComparison.OrdinalIgnoreCase) || text.Equals("Hindi", StringComparison.OrdinalIgnoreCase)) { return UiLang.Hi; } if (text.Equals("العربية", StringComparison.OrdinalIgnoreCase) || text.Equals("Arabic", StringComparison.OrdinalIgnoreCase)) { return UiLang.Ar; } if (text.Equals("ব\u09be\u0982ল\u09be", StringComparison.OrdinalIgnoreCase) || text.Equals("Bengali", StringComparison.OrdinalIgnoreCase)) { return UiLang.Bn; } if (text.Equals("Português", StringComparison.OrdinalIgnoreCase) || text.Equals("Portuguese", StringComparison.OrdinalIgnoreCase)) { return UiLang.Pt; } if (text.Equals("Deutsch", StringComparison.OrdinalIgnoreCase) || text.Equals("German", StringComparison.OrdinalIgnoreCase)) { return UiLang.De; } if (text.Equals("اردو", StringComparison.OrdinalIgnoreCase) || text.Equals("Urdu", StringComparison.OrdinalIgnoreCase)) { return UiLang.Ur; } } catch { } return UiLang.Zh; } } internal static bool PublicRoomPrefixEnabled => true; internal static string SteamIdHash(string steamId) { try { if (string.IsNullOrEmpty(steamId)) { return null; } using SHA256 sHA = SHA256.Create(); byte[] array = sHA.ComputeHash(Encoding.UTF8.GetBytes(steamId)); StringBuilder stringBuilder = new StringBuilder(64); for (int i = 0; i < array.Length; i++) { stringBuilder.Append(array[i].ToString("X2")); } return stringBuilder.ToString().Substring(0, 16); } catch { return null; } } internal static bool IsAuthorSteamId(string steamId) { string text = SteamIdHash(steamId); if (text != null) { return text == "5DDAC0861D67BE9B"; } return false; } internal static bool AnyEntryInSpawnWindow() { try { foreach (KeyValuePair<int, LateJoinEntry> lateJoinEntry in _lateJoinEntries) { LateJoinEntry value = lateJoinEntry.Value; if (value != null && (value.State == LateJoinState.Processing || value.State == LateJoinState.Finalizing)) { return true; } } } catch { } return false; } internal static void SweepStaleEntries(float timeoutSeconds = 45f) { try { List<int> list = null; foreach (KeyValuePair<int, LateJoinEntry> lateJoinEntry in _lateJoinEntries) { LateJoinEntry value = lateJoinEntry.Value; if (value != null && (value.State == LateJoinState.Pending || value.State == LateJoinState.Queued) && !(value.CreatedAt <= 0f) && !(Time.unscaledTime - value.CreatedAt < timeoutSeconds)) { value.State = LateJoinState.Aborted; if (list == null) { list = new List<int>(); } list.Add(lateJoinEntry.Key); LogWarning("[条目清理] " + value.NickName + " 在 " + Mathf.RoundToInt(timeoutSeconds) + " 秒内没有上报 spawn,已标记中止。"); } } if (list != null) { for (int i = 0; i < list.Count; i++) { _lateJoinEntries.Remove(list[i]); } InvalidateHudNow(); } } catch { } } private IEnumerator JoinGuardLoop() { while (true) { yield return (object)new WaitForSecondsRealtime(2f); try { if (!IsStaticModEnabled()) { continue; } bool flag = false; try { flag = SemiFunc.RunIsLevel(); } catch { } bool flag2 = false; try { flag2 = (Object)(object)LevelGenerator.Instance != (Object)null && !LevelGenerator.Instance.Generated; } catch { } if (flag || flag2) { if (PhotonNetwork.InRoom && !PhotonNetwork.IsMasterClient) { JoinGuard.WatchdogTick(); } if (PhotonNetwork.InRoom && PhotonNetwork.IsMasterClient) { SweepStaleEntries(); } } } catch { } } } private IEnumerator ConfigHotReloadLoop() { yield return (object)new WaitForSecondsRealtime(2f); while (true) { try { if (string.IsNullOrEmpty(_cfgWatchPath)) { _cfgWatchPath = Path.Combine(Paths.ConfigPath, "cn_xc.LateJoinSimple.cfg"); if (File.Exists(_cfgWatchPath)) { _cfgWatchStamp = File.GetLastWriteTimeUtc(_cfgWatchPath); } } if (!string.IsNullOrEmpty(_cfgWatchPath) && File.Exists(_cfgWatchPath)) { DateTime lastWriteTimeUtc = File.GetLastWriteTimeUtc(_cfgWatchPath); if (lastWriteTimeUtc != _cfgWatchStamp) { _cfgWatchStamp = lastWriteTimeUtc; ((BaseUnityPlugin)this).Config.Reload(); try { PushLanguageToPanel(); } catch { } _hudNextRefreshAt = 0f; _mapCountsNextAt = 0f; _hudRoleLineDirty = true; if (!_cfgWatchLogOnce) { _cfgWatchLogOnce = true; LogInfo("检测到配置文件变更,已热重载(无需重启)。"); } } } } catch (Exception ex) { if (!_cfgWatchErrLogged) { _cfgWatchErrLogged = true; LogWarning("配置热重载轮询异常(已忽略一次):" + ex.Message); } } yield return (object)new WaitForSecondsRealtime(2f); } } private void Awake() { //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Expected O, but got Unknown DetachFromManager(); InstallLogRedactor(); ((MonoBehaviour)this).StartCoroutine(ConfigHotReloadLoop()); ((MonoBehaviour)this).StartCoroutine(RoomGateLoop()); ((MonoBehaviour)this).StartCoroutine(JoinGuardLoop()); Instance = this; bool num = ConfigVersionResetter.ResetIfVersionChanged(((BaseUnityPlugin)this).Config, "0.12.0", ((BaseUnityPlugin)this).Logger); BindConfig(); if (num) { try { ConfigVersionResetter.WriteVersionStamp(((BaseUnityPlugin)this).Config.ConfigFilePath, "0.12.0"); } catch { } } CompatibilityReport.Build(); try { _harmony = new Harmony("cn_xc.LateJoinSimple"); InstallPatchesSafely(); try { JoinGuard.Install(_harmony); } catch (Exception ex) { LogWarning("[联机容错] JoinGuard 安装失败:" + ex.Message); } ((BaseUnityPlugin)this).Logger.LogInfo((object)"LateJoinSimple v0.12.0 已加载。"); } catch (Exception ex2) { ((BaseUnityPlugin)this).Logger.LogError((object)("LateJoinSimple 启动失败:" + ex2.Message)); } if (CompatibilityReport.HasIssues) { ((MonoBehaviour)this).StartCoroutine(WaitAndShowCompatPopup()); } CheckConflicts("启动"); ((MonoBehaviour)this).StartCoroutine(DeferredConflictCheck()); } internal static void CheckConflicts(string phase) { if (_showConflictWarning == null || !_showConflictWarning.Value) { return; } ConflictDetect.Detect(); int count = ConflictDetect.DetectedConflictMods.Count; LogInfo("[冲突检测/" + phase + "] 扫描 " + ConflictDetect.ScannedCount + " 个插件,命中 " + count + " 个" + ((count > 0) ? (":" + string.Join(Tri("、", ", "), ConflictDetect.DetectedConflictMods)) : "")); if (count > 0 && !_conflictWarned) { _conflictWarned = true; LogWarning("检测到同类模组:" + string.Join(Tri("、", ", "), ConflictDetect.DetectedConflictMods) + "(建议只保留一个中途加入模组)"); if ((Object)(object)Instance != (Object)null) { ((MonoBehaviour)Instance).StartCoroutine(Instance.WaitAndShowConflictPopup()); } } } private IEnumerator DeferredConflictCheck() { yield return (object)new WaitForSecondsRealtime(5f); CheckConflicts("延迟复检"); } private void Update() { ShopLateJoinRescue(); try { TryHandleRoomGateKey(); } catch { } if (Time.unscaledTime >= _nextStuckAvatarCheck) { _nextStuckAvatarCheck = Time.unscaledTime + 2f; FixStuckSelfAvatar(); } if (!IsHookActive()) { return; } if (PhotonNetwork.IsMasterClient) { _enforceTimer -= Time.unscaledDeltaTime; if (!(_enforceTimer > 0f)) { _enforceTimer = 1f; EnforceLobbyState(); } } else { TryJoinSteamLobbyFromPhotonRoom(); } } private void BindConfig() { //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Expected O, but got Unknown //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Expected O, but got Unknown //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Expected O, but got Unknown //IL_02db: Unknown result type (might be due to invalid IL or missing references) //IL_03d8: Unknown result type (might be due to invalid IL or missing references) //IL_03e2: Expected O, but got Unknown JoinGuard.BindConfig(((BaseUnityPlugin)this).Config); _teleportToHostOnJoin = ((BaseUnityPlugin)this).Config.Bind<bool>("全局设置", "传送到房主", false, "开启时新加入者直接传送到房主位置;若房主死亡,则传送到最近一个活着的玩家位置。"); _allowJoinInTruck = ((BaseUnityPlugin)this).Config.Bind<bool>("场景白名单", "卡车阶段允许加入", true, "卡车阶段允许中途加入。"); _allowJoinInShop = ((BaseUnityPlugin)this).Config.Bind<bool>("场景白名单", "商店阶段允许加入", true, "默认开启。商店没有 LevelGenerator,游戏自身不会给客机发 AllPlayerSpawnedRPC,本模组会由房主主动补发(日志里表现为「商店补救」)。原版客机与装了本模组的客机均可正常加入(已实测);若极端情况下遇到卡加载,把此项关闭、改从卡车 / 关卡加入即可。"); _allowJoinInLevel = ((BaseUnityPlugin)this).Config.Bind<bool>("场景白名单", "关卡中允许加入", true, "关卡进行中允许中途加入。"); _showRoomType = ((BaseUnityPlugin)this).Config.Bind<bool>("房间信息显示", "显示房间类型", true, "显示公开/私人/单人。"); _showRoomName = ((BaseUnityPlugin)this).Config.Bind<bool>("房间信息显示", "显示房间名称", true, "显示房间名称。"); _showHud = ((BaseUnityPlugin)this).Config.Bind<bool>("房间信息显示", "显示HUD", true, "显示左下角信息框(房间类型/人数/玩家名单)。关闭后不显示,默认开启。"); _hudFontSize = ((BaseUnityPlugin)this).Config.Bind<int>("房间信息显示", "HUD字号", 20, new ConfigDescription("HUD 字体大小", (AcceptableValueBase)(object)new AcceptableValueRange<int>(8, 40), Array.Empty<object>())); _hudOpacity = ((BaseUnityPlugin)this).Config.Bind<int>("房间信息显示", "HUD透明度", 80, new ConfigDescription("HUD 透明度", (AcceptableValueBase)(object)new AcceptableValueRange<int>(5, 100), Array.Empty<object>())); _hudNamesPerLine = ((BaseUnityPlugin)this).Config.Bind<int>("房间信息显示", "每行显示人数", 5, new ConfigDescription("玩家名字每行显示几个", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 10), Array.Empty<object>())); _coopMode = ((BaseUnityPlugin)this).Config.Bind<bool>("全局设置", "协同模式", true, "自动:双端「版本号 + 协议号」一致时才启用协同补丁(补发模块、补建对象、刷新外观与语音)。不一致时自动休眠为单端模式,日志会写明原因。一般保持 true 即可;改成 false 则强制单端模式。与 LateJoinNow(原版)的协议对接已恢复,房主用 LJN 时同样可走兼容模式。"); _respectExternalGate = ((BaseUnityPlugin)this).Config.Bind<bool>("房间信息显示", "尊重外部门状态", false, "若别的模组(如 HostToolkit)写了 ljs.gate,是否采纳它的 1=开放 / 2=关闭。默认关,避免两个模组互相顶房间状态。"); _verboseLog = ((BaseUnityPlugin)this).Config.Bind<bool>("调试", "详细调试日志", false, "输出详细调试日志。"); _showConflictWarning = ((BaseUnityPlugin)this).Config.Bind<bool>("调试", "冲突检测弹窗", true, "检测到同类模组时弹警告。"); _logModuleViewIds = ((BaseUnityPlugin)this).Config.Bind<bool>("调试", "打印模块ViewID对照", false, "排查卡加载:房主打印补发的 [(ViewID,名称)],客机停滞时打印本地 [(ViewID,名称,激活,SetupDone)]。"); _fixInventorySlots = ((BaseUnityPlugin)this).Config.Bind<bool>("虚空修复", "快捷栏修复", true, "中途加入后补注册快捷栏(InventorySpot)槽位 —— 修复加入者无法把道具放进快捷栏。"); _moduleResendSeconds = ((BaseUnityPlugin)this).Config.Bind<int>("虚空修复", "模块补发秒数", 60, "后台只补发「这个加入者还没收到过」的模块,最多持续这么多秒(0 = 关闭)。每个模块只发一次,避免抬高客户端 ModulesSpawned。"); _extractionResend = ((BaseUnityPlugin)this).Config.Bind<bool>("同步精简", "补发撤离点", false, "开启后房主会向中途加入者补发撤离点激活状态。默认关闭:实测不补也正常(交易一下就刷新),且补发在某些场景可能影响加入。"); _cosmeticCatchup = ((BaseUnityPlugin)this).Config.Bind<bool>("同步精简", "补发外观箱(代币)", true, "开:房主把本局已抽取的外观箱队列补发给中途加入者,让其在结算界面正常获得代币。\n只在该客机本机队列为空时补发一次,不会重复发币。"); _closeRoomWhileLoading = ((BaseUnityPlugin)this).Config.Bind<bool>("虚空修复", "加载中关闭房间", true, "房主在切关/加载/关卡生成期间把房间设为不可加入,等这一关真正加载完成后再重新开放。"); _roomGateKey = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("房间信息显示", "房间加入快捷键", new KeyboardShortcut((KeyCode)111, Array.Empty<KeyCode>()), "手动切换「房间是否开放加入」的快捷键。只有房主能生效。(自动 → 强制关闭 → 强制开放,每次间隔 10 秒)"); _showRoomGateLine = ((BaseUnityPlugin)this).Config.Bind<bool>("房间信息显示", "显示房间加入状态", true, "在左下角 HUD 的「玩家名单」上方显示一行房间加入状态。"); _gateOnGeneration = ((BaseUnityPlugin)this).Config.Bind<bool>("虚空修复", "生成完成才放人加入", true, "关卡还在生成时先不放中途加入的人进来(等生成完成后再同步);避免客机卡在加载界面。最长等 30 秒,超时也会放行。"); _uiLanguage = ((BaseUnityPlugin)this).Config.Bind<string>("房间信息显示", "界面语言 / Language", "中文", new ConfigDescription("HUD 与提示文字的语言(15 种)。改完约 2 秒热生效。", (AcceptableValueBase)(object)new AcceptableValueList<string>(new string[15] { "中文", "繁體中文", "English", "日本語", "Русский", "Français", "ไทย", "Español", "Esperanto", "ह\u093fन\u094dद\u0940", "العربية", "ব\u09be\u0982ল\u09be", "Português", "Deutsch", "اردو" }), Array.Empty<object>())); _minimalSyncMode = ((BaseUnityPlugin)this).Config.Bind<bool>("同步精简", "最小可用模式", false, "开启后只补「模块连接 + 房间探索」,其余(物品 / 宝物 / 状态 / 电池 / 外观 / 属性)全部跳过。适合「客机大多是原版」的情况,最稳定。"); _playerHealthSync = ((BaseUnityPlugin)this).Config.Bind<bool>("虚空修复", "血量同步", true, "房主在加入者落地后,把场上每个玩家的当前血量 / 生命上限推给该加入者(调用游戏自带的 UpdateHealthRPC)—— 修复「新进来的看不到血量」。"); _playerCosmeticsSync = ((BaseUnityPlugin)this).Config.Bind<bool>("虚空修复", "外观颜色同步", false, "房主在加入者落地后,把每个玩家的外观颜色推给该加入者(调用游戏自带的 SetupColorsRPC,该 RPC 仅房主可发)。"); _applyUpgradesOnJoin = ((BaseUnityPlugin)this).Config.Bind<bool>("玩家属性", "加入时重放升级", false, "中途加入后按 StatsManager 存档重放全部升级属性(跳跃 / 体力 / 冲刺 / 力量 / 抓取范围 / 投掷 / 攀爬 / 翅膀 / 血上限 等),调用游戏自带的 PunManager.Update*RightAway。这些属性原本只在升级网络 RPC 时应用,加入者会错过。"); _hudFontSize.SettingChanged += delegate { int value = _hudFontSize.Value; int num = ((value < 8) ? 8 : ((value > 40) ? 40 : value)); if (num != value) { _hudFontSize.Value = num; } }; _hudOpacity.SettingChanged += delegate { int value = _hudOpacity.Value; int num = ((value < 5) ? 5 : ((value > 100) ? 100 : value)); if (num != value) { _hudOpacity.Value = num; } }; _hudNamesPerLine.SettingChanged += delegate { int value = _hudNamesPerLine.Value; int num = ((value < 1) ? 1 : ((value > 10) ? 10 : value)); if (num != value) { _hudNamesPerLine.Value = num; } }; _moduleResendSeconds.SettingChanged += delegate { int value = _moduleResendSeconds.Value; int num = ((value >= 0) ? ((value > 600) ? 600 : value) : 0); if (num != value) { _moduleResendSeconds.Value = num; } }; } private void InstallPatchesSafely() { Pre("ChangeLevel Pre", typeof(RunManager), "ChangeLevel", "RunManagerChangeLevelPrefix"); Post("ChangeLevel Post", typeof(RunManager), "ChangeLevel", "RunManagerChangeLevelPostfix"); Pre("RestartScene Pre", typeof(RunManager), "RestartScene", "RunManagerRestartScenePrefix"); Pre("LevelGenerator.Start Pre", typeof(LevelGenerator), "Start", "LevelGeneratorStartPrefix"); Post("PlayerAvatar.Start Post", typeof(PlayerAvatar), "Start", "PlayerAvatarStartPostfix"); Pre("LoadingUI.AnimStart Pre", typeof(LoadingUI), "LevelAnimationStart", "LoadingUILevelAnimationStartPrefix"); Pre("LoadingAnimCompleted Pre", typeof(PlayerAvatar), "LoadingLevelAnimationCompletedRPC", "PlayerAvatarLoadingLevelAnimationCompletedRPCPrefix"); Pre("OwnerOnlyRPC Pre", typeof(SemiFunc), "OwnerOnlyRPC", "SemiFuncOwnerOnlyRPCPrefix"); TryPatch("OwnerOnlyRPC Final", delegate { //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Expected O, but got Unknown MethodInfo methodInfo = AccessTools.Method(typeof(SemiFunc), "OwnerOnlyRPC", (Type[])null, (Type[])null); if (methodInfo == null) { ((BaseUnityPlugin)this).Logger.LogWarning((object)"未找到 SemiFunc.OwnerOnlyRPC,跳过 NRE 兜底。"); } else { _harmony.Patch((MethodBase)methodInfo, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, new HarmonyMethod(typeof(Hooks), "OwnerOnlyRPCFinalizer", (Type[])null)); } }); Post("OnPlayerEntered Post", typeof(NetworkManager), "OnPlayerEnteredRoom", "NetworkManagerOnPlayerEnteredRoomPostfix"); Post("OnPlayerLeft Post", typeof(NetworkManager), "OnPlayerLeftRoom", "NetworkManagerOnPlayerLeftRoomPostfix"); Pre("OnConnectedToMaster Pre", typeof(NetworkConnect), "OnConnectedToMaster", "NetworkConnectOnConnectedToMasterPrefix"); Post("ExtractionPoint.UpdateLock Post", typeof(ExtractionPoint), "UpdateLock", "ExtractionPointUpdateLockPostfix"); Post("OnJoinedRoom Post", typeof(NetworkConnect), "OnJoinedRoom", "NetworkConnectOnJoinedRoomPostfix"); Post("OnDisconnected Post", typeof(NetworkManager), "OnDisconnected", "NetworkManagerOnDisconnectedPostfix"); Pre("OnMasterClientSwitched Pre", typeof(NetworkManager), "OnMasterClientSwitched", "MasterSwitchKeepRoomPrefix"); Post("PlayerSpawnedRPC Post", typeof(NetworkManager), "PlayerSpawnedRPC", "NetworkManagerPlayerSpawnedRPCPostfix"); Pre("GumballHypnosis Pre", typeof(GumballValuable), "UpdateHypnosisLinesList", "GumballValuableUpdateHypnosisLinesListPrefix"); Pre("GumballEffectsLoop Pre", typeof(GumballValuable), "ClientEffectsLoop", "GumballValuableClientEffectsLoopPrefix"); Post("EnemyOnScreen.Awake Post", typeof(EnemyOnScreen), "Awake", "EnemyOnScreenAwakePostfix"); Post("Module.Awake Post", typeof(Module), "Awake", "ModuleAwakePostfix"); Pre("ModuleConnectionSetRPC Pre", typeof(Module), "ModuleConnectionSetRPC", "ModuleConnectionSetRPCPrefix"); TryPatch("ModuleConnectionSetMegaRPC Pre", delegate { //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Expected O, but got Unknown MethodInfo methodInfo = AccessTools.Method(typeof(Module), "ModuleConnectionSetMegaRPC", (Type[])null, (Type[])null); if (methodInfo == null) { ((BaseUnityPlugin)this).Logger.LogWarning((object)"未找到 Module.ModuleConnectionSetMegaRPC,跳过 Mega 模块去重。"); } else { _harmony.Patch((MethodBase)methodInfo, new HarmonyMethod(typeof(Hooks), "ModuleConnectionSetMegaRPCPrefix", (Type[])null), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); } }); Post("PhysGrabObj.Awake Post", typeof(PhysGrabObject), "Awake", "PhysGrabObjectAwakePostfix"); Post("ItemAttributes.Awake Post", typeof(ItemAttributes), "Awake", "ItemAttributesAwakePostfix"); Post("ValuableObject.Awake Post", typeof(ValuableObject), "Awake", "ValuableObjectAwakePostfix"); Post("PlayerAvatar.Awake Post", typeof(PlayerAvatar), "Awake", "PlayerAvatarAwakeSetOwnershipPostfix"); Post("PlayerAvatar.Destroy Post", typeof(PlayerAvatar), "OnDestroy", "PlayerAvatarOnDestroyPostfix"); Pre("LevelGen.PlayerSpawn Pre", typeof(LevelGenerator), "PlayerSpawn", "LevelGeneratorPlayerSpawnPrefix"); TryPatch("PlayerAvatar.Spawn Pre", delegate { //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Expected O, but got Unknown MethodInfo methodInfo = AccessTools.Method(typeof(PlayerAvatar), "Spawn", new Type[3] { typeof(Vector3), typeof(Quaternion), typeof(bool) }, (Type[])null); if (methodInfo == null) { ((BaseUnityPlugin)this).Logger.LogWarning((object)"未找到 PlayerAvatar.Spawn(Vector3,Quaternion,bool),跳过位置拦截。"); } else { _harmony.Patch((MethodBase)methodInfo, new HarmonyMethod(typeof(Hooks), "PlayerAvatarSpawnPrefix", (Type[])null), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); } }); Post("VoiceChat.Start Post", typeof(PlayerVoiceChat), "Start", "PlayerVoiceChatStartPostfix"); Pre("EnergyUI.Update Pre", typeof(EnergyUI), "Update", "EnergyUIUpdatePrefix"); Pre("PlayerAvatarVisuals.Update Pre", typeof(PlayerAvatarVisuals), "Update", "PlayerAvatarVisualsUpdatePrefix"); Pre("PlayerExpression.Update Pre", typeof(PlayerExpression), "Update", "PlayerExpressionUpdatePrefix"); Pre("PlayerAvatarTalkAnim.Update Pre", typeof(PlayerAvatarTalkAnimation), "Update", "PlayerAvatarTalkAnimationUpdatePrefix"); Pre("PlayerLocalCamera.GetOverride Pre", typeof(PlayerLocalCamera), "GetOverrideTransform", "PlayerLocalCameraGetOverrideTransformPrefix"); Pre("PlayerAvatarOvercharge.Update Pre", typeof(PlayerAvatarOverchargeVisuals), "Update", "PlayerAvatarOverchargeVisualsUpdatePrefix"); Pre("PlayerAvatarGrabDis.Update Pre", typeof(PlayerAvatarGrabDisableVisuals), "Update", "PlayerAvatarGrabDisableVisualsUpdatePrefix"); Pre("PhysGrabber.Update Pre", typeof(PhysGrabber), "Update", "PhysGrabberUpdatePrefix"); TryPatch("PhysGrabber.Update Trans", delegate { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Expected O, but got Unknown MethodInfo methodInfo = AccessTools.Method(typeof(PhysGrabber), "Update", (Type[])null, (Type[])null); if (!(methodInfo == null)) { _harmony.Patch((MethodBase)methodInfo, (HarmonyMethod)null, (HarmonyMethod)null, new HarmonyMethod(typeof(Plugin), "PhysGrabberUpdateTranspiler", (Type[])null), (HarmonyMethod)null); } }); Pre("PlayerAvatarLeftArm.Update Pre", typeof(PlayerAvatarLeftArm), "Update", "PlayerAvatarLeftArmUpdatePrefix"); Pre("ItemEquippable.UpdateState Pre", typeof(ItemEquippable), "RPC_UpdateItemState", "ItemEquippableUpdateItemStatePrefix"); Pre("UpdatePlayerVoiceChat Pre", typeof(PlayerAvatar), "UpdateMyPlayerVoiceChat", "PlayerAvatarUpdateMyPlayerVoiceChatPrefix"); TryPatch("SlowProjectile.DestroyRPC Trans", delegate { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Expected O, but got Unknown MethodInfo methodInfo = AccessTools.Method(typeof(SlowProjectile), "DestroyRPC", (Type[])null, (Type[])null); if (!(methodInfo == null)) { _harmony.Patch((MethodBase)methodInfo, (HarmonyMethod)null, (HarmonyMethod)null, new HarmonyMethod(typeof(Hooks), "SlowProjectileDestroyRPCTranspiler", (Type[])null), (HarmonyMethod)null); } }); Pre("PhysGrabObject.DestroyRPC Pre", typeof(PhysGrabObject), "DestroyPhysGrabObjectRPC", "PhysGrabObjectDestroyPhysGrabObjectRPCPrefix"); Pre("PlayerAvatar.JumpRPC Pre", typeof(PlayerAvatar), "JumpRPC", "PlayerAvatarJumpRPCPrefix"); Final("ExtractionPoint.StateComplete Final", typeof(ExtractionPoint), "StateComplete", "ExtractionPointStateCompleteFinalizer"); Final("LightManager.Update Final", typeof(LightManager), "Update", "LightManagerUpdateFinalizer"); Final("LightManager.LogicUpdate Final", typeof(LightManager), "LogicUpdate", "LightManagerLogicUpdateFinalizer"); Final("LightManager.Setup Final", typeof(LightManager), "Setup", "LightManagerSetupFinalizer"); Final("AmbientLightLogic Final", typeof(EnvironmentDirector), "AmbientLightLogic", "AmbientLightLogicFinalizer"); Post("LevelGen.Start Post", typeof(LevelGenerator), "Start", "LevelGeneratorStartPostfix"); Post("RunManager.UpdateLevel Post", typeof(RunManager), "UpdateLevel", "RunManagerUpdateLevelPostfix"); Pre("PlayerHealth.Update Pre", typeof(PlayerHealth), "Update", "PlayerHealthUpdatePrefix"); Pre("AmbientLightLogic Pre", typeof(EnvironmentDirector), "AmbientLightLogic", "EnvLightLogicPrefix"); Pre("FogLogic Pre", typeof(EnvironmentDirector), "FogLogic", "EnvLightLogicPrefix"); Pre("EnemyOnScreen.GetOnScreen Pre", typeof(EnemyOnScreen), "GetOnScreen", "EnemyOnScreenGetOnScreenPrefix"); Final("PlayerDeathHead.UpdateParticleColors Final", typeof(PlayerDeathHead), "UpdateParticleColors", "DeathHeadColorFinalizer"); Final("LightManager.HandleLightActivation Final", typeof(LightManager), "HandleLightActivation", "LightManagerHandleLightFinalizer"); Final("LightManager.HandleEmissionActivation Final", typeof(LightManager), "HandleEmissionActivation", "LightManagerHandleEmissionFinalizer"); TryPatch("VoiceChat.ToggleMixer Final", delegate { //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Expected O, but got Unknown MethodInfo methodInfo = AccessTools.Method(typeof(PlayerVoiceChat), "ToggleMixer", (Type[])null, (Type[])null); if (methodInfo == null) { ((BaseUnityPlugin)this).Logger.LogWarning((object)"未找到 PlayerVoiceChat.ToggleMixer,跳过语音混音守卫。"); } else { _harmony.Patch((MethodBase)methodInfo, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, new HarmonyMethod(typeof(Plugin), "VoiceMixerFinalizer", (Type[])null)); } }); ((BaseUnityPlugin)this).Logger.LogInfo((object)("补丁注册完成(失败 " + CompatibilityReport.AffectedFeatures.Count + " 项)。")); } private void Pre(string label, Type target, string methodName, string hookName) { TryPatch(label, delegate { //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Expected O, but got Unknown MethodInfo methodInfo = AccessTools.Method(target, methodName, (Type[])null, (Type[])null); if (methodInfo == null) { ((BaseUnityPlugin)this).Logger.LogWarning((object)("未找到 " + target.Name + "." + methodName + ",跳过:" + label)); } else { _harmony.Patch((MethodBase)methodInfo, new HarmonyMethod(typeof(Hooks), hookName, (Type[])null), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); } }); } private void Post(string label, Type target, string methodName, string hookName) { TryPatch(label, delegate { //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Expected O, but got Unknown MethodInfo methodInfo = AccessTools.Method(target, methodName, (Type[])null, (Type[])null); if (methodInfo == null) { ((BaseUnityPlugin)this).Logger.LogWarning((object)("未找到 " + target.Name + "." + methodName + ",跳过:" + label)); } else { _harmony.Patch((MethodBase)methodInfo, (HarmonyMethod)null, new HarmonyMethod(typeof(Hooks), hookName, (Type[])null), (HarmonyMethod)null, (HarmonyMethod)null); } }); } private void Final(string label, Type target, string methodName, string hookName) { TryPatch(label, delegate { //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Expected O, but got Unknown MethodInfo methodInfo = AccessTools.Method(target, methodName, (Type[])null, (Type[])null); if (methodInfo == null) { ((BaseUnityPlugin)this).Logger.LogWarning((object)("未找到 " + target.Name + "." + methodName + ",跳过:" + label)); } else { _harmony.Patch((MethodBase)methodInfo, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, new HarmonyMethod(typeof(Hooks), hookName, (Type[])null)); } }); } private void TryPatch(string label, Action action) { try { action(); } catch (Exception ex) { CompatibilityReport.AffectedFeatures.Add("补丁失败:" + label); CompatibilityReport.Details.Add(label + " → " + ex.Message); ((BaseUnityPlugin)this).Logger.LogWarning((object)("补丁安装失败:" + label)); } } private void PatchPostfix(Type target, string methodName, string postfixName) { //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Expected O, but got Unknown MethodInfo methodInfo = AccessTools.Method(target, methodName, (Type[])null, (Type[])null); if (methodInfo == null) { ((BaseUnityPlugin)this).Logger.LogWarning((object)("未找到 " + target.Name + "." + methodName + ",跳过该补丁。")); } else { _harmony.Patch((MethodBase)methodInfo, (HarmonyMethod)null, new HarmonyMethod(typeof(Plugin), postfixName, (Type[])null), (HarmonyMethod)null, (HarmonyMethod)null); Verbose("已注册 " + target.Name + "." + methodName + " Postfix。"); } } public static bool IsStaticModEnabled() { return true; } internal static bool IsHookActive() { if (IsStaticModEnabled()) { return CompatibilityReport.RuntimeReady; } return false; } internal static bool IsLevelTransitioning() { //IL_007d: 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) try { RunManager instance = RunManager.instance; if ((Object)(object)instance != (Object)null) { if (_rmWaitToChangeScene == null) { _rmWaitToChangeScene = AccessTools.Field(typeof(RunManager), "waitToChangeScene"); } if (_rmWaitToChangeScene != null) { object value = _rmWaitToChangeScene.GetValue(instance); bool flag = default(bool); int num; if (value is bool) { flag = (bool)value; num = 1; } else { num = 0; } if (((uint)num & (flag ? 1u : 0u)) != 0) { return true; } } try { if (instance.SceneHandoffCancelling) { return true; } } catch { } } Scene activeScene = SceneManager.GetActiveScene(); if (!((Scene)(ref activeScene)).IsValid() || !((Scene)(ref activeScene)).isLoaded) { return true; } } catch { } return false; } internal static bool HasAvatarForActor(int actor) { try { PlayerAvatar[] array = Object.FindObjectsOfType<PlayerAvatar>(); foreach (PlayerAvatar val in array) { if (!((Object)(object)val == (Object)null) && !((Object)(object)val.photonView == (Object)null) && val.photonView.OwnerActorNr == actor) { return true; } } } catch { } return false; } public static bool IsCurrentSceneAllowed() { float unscaledTime = Time.unscaledTime; if (unscaledTime < _sceneAllowedCacheUntil) { return _sceneAllowedCachedValue; } _sceneAllowedCacheUntil = unscaledTime + 0.5f; _sceneAllowedCachedValue = ComputeSceneAllowed(); return _sceneAllowedCachedValue; } private static bool ComputeSceneAllowed() { if (!IsStaticModEnabled() || !PhotonNetwork.IsMasterClient || (Object)(object)RunManager.instance == (Object)null) { return false; } try { Room currentRoom = PhotonNetwork.CurrentRoom; if (currentRoom != null && currentRoom.MaxPlayers > 0 && currentRoom.PlayerCount >= currentRoom.MaxPlayers) { return false; } if (IsLevelTransitioning()) { return false; } if (SemiFunc.RunIsLobby()) { return _allowJoinInTruck.Value; } if (SemiFunc.RunIsShop()) { return _allowJoinInShop.Value; } if (SemiFunc.RunIsArena()) { return false; } if (!SemiFunc.RunIsLevel()) { return false; } if (!_allowJoinInLevel.Value) { return false; } if ((Object)(object)RoundDirector.instance != (Object)null && _roundAllExtractionPointsCompletedField != null) { try { if ((bool)_roundAllExtractionPointsCompletedField.GetValue(RoundDirector.instance)) { return false; } } catch { } } return true; } catch (Exception ex) { if ((Object)(object)Instance != (Object)null) { ((BaseUnityPlugin)Instance).Logger.LogWarning((object)("场景判定失败:" + ex.Message)); } } return false; } private static bool IsInGame() { float unscaledTime = Time.unscaledTime; if (unscaledTime < _inGameCacheUntil) { return _inGameCachedValue; } _inGameCacheUntil = unscaledTime + 0.5f; try { _inGameCachedValue = SemiFunc.RunIsLobby() || SemiFunc.RunIsShop() || SemiFunc.RunIsLevel(); } catch { _inGameCachedValue = false; } return _inGameCachedValue; } public static boo