From 1810e44e8fd6e43e34e454710c1a9c9239b01b8b Mon Sep 17 00:00:00 2001 From: SadPencil Date: Tue, 5 Nov 2024 22:17:08 +0800 Subject: [PATCH] Add a friendly notice for migrating TSCv6 (#579) --- .../DXGUI/Multiplayer/GameLobby/GameLobbyBase.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/DXMainClient/DXGUI/Multiplayer/GameLobby/GameLobbyBase.cs b/DXMainClient/DXGUI/Multiplayer/GameLobby/GameLobbyBase.cs index 61666c817..ae6b1f9ed 100644 --- a/DXMainClient/DXGUI/Multiplayer/GameLobby/GameLobbyBase.cs +++ b/DXMainClient/DXGUI/Multiplayer/GameLobby/GameLobbyBase.cs @@ -202,7 +202,14 @@ public override void Initialize() base.Initialize(); - PlayerOptionsPanel = FindChild(nameof(PlayerOptionsPanel)); + try + { + PlayerOptionsPanel = FindChild(nameof(PlayerOptionsPanel)); + } + catch (Exception ex) + { + throw new Exception($"It seems the modders have not migrated the 'Tiberian Sun Client v6 Changes'. Please refer to https://github.com/CnCNet/xna-cncnet-client/blob/122b2de962afc404e203290d0618363d83c4264a/Docs/Migration-INI.md for more details. {ex.Message}"); + } btnLeaveGame = FindChild(nameof(btnLeaveGame)); btnLeaveGame.LeftClick += BtnLeaveGame_LeftClick;