diff --git a/Barotrauma/BarotraumaClient/Source/Screens/ServerListScreen.cs b/Barotrauma/BarotraumaClient/Source/Screens/ServerListScreen.cs index 0344ba7c1..1f146ab06 100644 --- a/Barotrauma/BarotraumaClient/Source/Screens/ServerListScreen.cs +++ b/Barotrauma/BarotraumaClient/Source/Screens/ServerListScreen.cs @@ -218,6 +218,22 @@ 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 7f357dffc..d12dfc5a9 100644 --- a/Barotrauma/BarotraumaShared/Source/Items/Components/Signal/Connection.cs +++ b/Barotrauma/BarotraumaShared/Source/Items/Components/Signal/Connection.cs @@ -133,39 +133,6 @@ namespace Barotrauma.Items.Components DisplayName = Name; } - //if displayname is not present, attempt to find it from the prefab - if (element.Attribute("displayname") == null) - { - foreach (XElement subElement in item.Prefab.ConfigElement.Elements()) - { - if (subElement.Name.ToString().ToLowerInvariant() != "connectionpanel") { continue; } - - foreach (XElement connectionElement in subElement.Elements()) - { - if (connectionElement.Name.ToString() != element.Name.ToString()) { continue; } - - string prefabConnectionName = element.GetAttributeString("name", (IsOutput) ? "output" : "input"); - if (prefabConnectionName == Name) - { - DisplayName = TextManager.GetServerMessage(connectionElement.GetAttributeString("displayname", "")); - } - } - } -#if DEBUG - if (string.IsNullOrEmpty(DisplayName)) - { - DebugConsole.ThrowError("Missing display name in connection " + item.Name + ": " + Name); - DisplayName = Name; - } -#endif - } - else - { - DisplayName = TextManager.GetServerMessage(element.GetAttributeString("displayname", Name)); - } - - - IsPower = Name == "power_in" || Name == "power" || Name == "power_out"; effects = new List();