(d071c9d60) Fixed Connections not reporting missing localizable display names during initialization, added missing displayname attributes to all connections

This commit is contained in:
Joonas Rikkonen
2019-05-18 17:45:59 +03:00
parent 4602bcd8bf
commit f36e590854
2 changed files with 2 additions and 17 deletions
@@ -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; }
@@ -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
}