From f36e590854eafa2853ac7131333437d51325a3a8 Mon Sep 17 00:00:00 2001 From: Joonas Rikkonen Date: Sat, 18 May 2019 17:45:59 +0300 Subject: [PATCH] (d071c9d60) Fixed Connections not reporting missing localizable display names during initialization, added missing displayname attributes to all connections --- .../Source/Screens/ServerListScreen.cs | 16 ---------------- .../Source/Items/Components/Signal/Connection.cs | 3 ++- 2 files changed, 2 insertions(+), 17 deletions(-) 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; } diff --git a/Barotrauma/BarotraumaShared/Source/Items/Components/Signal/Connection.cs b/Barotrauma/BarotraumaShared/Source/Items/Components/Signal/Connection.cs index 49bd96bc6..c996f1e2d 100644 --- a/Barotrauma/BarotraumaShared/Source/Items/Components/Signal/Connection.cs +++ b/Barotrauma/BarotraumaShared/Source/Items/Components/Signal/Connection.cs @@ -96,7 +96,7 @@ namespace Barotrauma.Items.Components string prefabConnectionName = element.GetAttributeString("name", (IsOutput) ? "output" : "input"); if (prefabConnectionName == Name) { - DisplayName = TextManager.GetServerMessage(connectionElement.GetAttributeString("displayname", Name)); + DisplayName = TextManager.GetServerMessage(connectionElement.GetAttributeString("displayname", "")); } } } @@ -104,6 +104,7 @@ namespace Barotrauma.Items.Components if (string.IsNullOrEmpty(DisplayName)) { DebugConsole.ThrowError("Missing display name in connection " + item.Name + ": " + Name); + DisplayName = Name; } #endif }