(3e2eaf696) Fixed "mission failed" text still appearing in other languages due to TextManager automatically returning an English text if a text cannot be found in the selected language
This commit is contained in:
@@ -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; }
|
||||
|
||||
@@ -83,11 +83,15 @@ namespace Barotrauma
|
||||
Commonness = element.GetAttributeInt("commonness", 1);
|
||||
|
||||
SuccessMessage = TextManager.Get("MissionSuccess." + Identifier, true) ?? element.GetAttributeString("successmessage", "Mission completed successfully");
|
||||
FailureMessage =
|
||||
TextManager.Get("MissionFailure." + Identifier, true) ??
|
||||
element.GetAttributeString("failuremessage", null) ??
|
||||
TextManager.Get("missionfailed", returnNull: true) ??
|
||||
"";
|
||||
FailureMessage = TextManager.Get("MissionFailure." + Identifier, true) ?? "";
|
||||
if (string.IsNullOrEmpty(FailureMessage) && TextManager.ContainsTag("missionfailed"))
|
||||
{
|
||||
FailureMessage = TextManager.Get("missionfailed", returnNull: true) ?? "";
|
||||
}
|
||||
if (string.IsNullOrEmpty(FailureMessage) && GameMain.Config.Language == "English")
|
||||
{
|
||||
FailureMessage = element.GetAttributeString("failuremessage", "");
|
||||
}
|
||||
|
||||
SonarLabel = TextManager.Get("MissionSonarLabel." + Identifier, true) ?? element.GetAttributeString("sonarlabel", "");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user