(d071c9d60) Fixed Connections not reporting missing localizable display names during initialization, added missing displayname attributes to all connections
This commit is contained in:
@@ -218,22 +218,6 @@ namespace Barotrauma
|
|||||||
return true;
|
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)
|
private bool SelectServer(GUIComponent component, object obj)
|
||||||
{
|
{
|
||||||
if (obj == null || waitingForRefresh) { return false; }
|
if (obj == null || waitingForRefresh) { return false; }
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ namespace Barotrauma.Items.Components
|
|||||||
string prefabConnectionName = element.GetAttributeString("name", (IsOutput) ? "output" : "input");
|
string prefabConnectionName = element.GetAttributeString("name", (IsOutput) ? "output" : "input");
|
||||||
if (prefabConnectionName == Name)
|
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))
|
if (string.IsNullOrEmpty(DisplayName))
|
||||||
{
|
{
|
||||||
DebugConsole.ThrowError("Missing display name in connection " + item.Name + ": " + Name);
|
DebugConsole.ThrowError("Missing display name in connection " + item.Name + ": " + Name);
|
||||||
|
DisplayName = Name;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user