From 896dd9469cda7dd5db9252d5018ba5c3b8273e94 Mon Sep 17 00:00:00 2001 From: Joonas Rikkonen Date: Sat, 18 May 2019 17:55:58 +0300 Subject: [PATCH] (b13f5d345) If the "mysteries lie ahead" text that pops up when clicking the location at the center of the map is not available in the selected language, show the campaign roadmap (which mentions the center location not being reachable) instead --- .../BarotraumaClient/Source/Map/Map/Map.cs | 20 +++++++++++++++---- .../Source/Screens/ServerListScreen.cs | 16 --------------- 2 files changed, 16 insertions(+), 20 deletions(-) diff --git a/Barotrauma/BarotraumaClient/Source/Map/Map/Map.cs b/Barotrauma/BarotraumaClient/Source/Map/Map/Map.cs index 8bb06d630..27ae86b7a 100644 --- a/Barotrauma/BarotraumaClient/Source/Map/Map/Map.cs +++ b/Barotrauma/BarotraumaClient/Source/Map/Map/Map.cs @@ -624,10 +624,22 @@ namespace Barotrauma if (mouseOn && PlayerInput.LeftButtonClicked() && !messageBoxOpen) { - //TODO: translate or replace - var messageBox = new GUIMessageBox("Mysteries lie ahead...", "This area is unreachable in this version of Barotrauma. Please wait for future updates!"); - messageBoxOpen = true; - CoroutineManager.StartCoroutine(WaitForMessageBoxClosed(messageBox)); + if (TextManager.ContainsTag("centerarealockedheader") && TextManager.ContainsTag("centerarealockedtext") ) + { + var messageBox = new GUIMessageBox( + TextManager.Get("centerarealockedheader"), + TextManager.Get("centerarealockedtext")); + messageBoxOpen = true; + CoroutineManager.StartCoroutine(WaitForMessageBoxClosed(messageBox)); + } + else + { + //if the message cannot be shown in the selected language, + //show the campaign roadmap (which mentions the center location not being reachable) + var messageBox = new GUIMessageBox(TextManager.Get("CampaignRoadMapTitle"), TextManager.Get("CampaignRoadMapText")); + messageBoxOpen = true; + CoroutineManager.StartCoroutine(WaitForMessageBoxClosed(messageBox)); + } } } diff --git a/Barotrauma/BarotraumaClient/Source/Screens/ServerListScreen.cs b/Barotrauma/BarotraumaClient/Source/Screens/ServerListScreen.cs index 1f146ab06..0344ba7c1 100644 --- a/Barotrauma/BarotraumaClient/Source/Screens/ServerListScreen.cs +++ b/Barotrauma/BarotraumaClient/Source/Screens/ServerListScreen.cs @@ -218,22 +218,6 @@ namespace Barotrauma return true; } - private bool RefreshJoinButtonState(GUIComponent component, object obj) - { - if (obj == null || waitingForRefresh) { return false; } - - if (!string.IsNullOrWhiteSpace(clientNameBox.Text) && !string.IsNullOrWhiteSpace(ipBox.Text)) - { - joinButton.Enabled = true; - } - else - { - joinButton.Enabled = false; - } - - return true; - } - private bool SelectServer(GUIComponent component, object obj) { if (obj == null || waitingForRefresh) { return false; }