Fixed submarine & location names not being replaced in the round summary popup

This commit is contained in:
Joonas Rikkonen
2018-01-08 15:37:22 +02:00
parent 778b1a78ad
commit 78e0647ed3
@@ -41,14 +41,14 @@ namespace Barotrauma
string summaryText = TextManager.Get(gameOver ? "RoundSummaryGameOver" : string summaryText = TextManager.Get(gameOver ? "RoundSummaryGameOver" :
(progress ? "RoundSummaryProgress" : "RoundSummaryReturn")); (progress ? "RoundSummaryProgress" : "RoundSummaryReturn"));
summaryText.Replace("[sub]", Submarine.MainSub.Name); summaryText = summaryText
summaryText.Replace("[location]", GameMain.GameSession.StartLocation.Name); .Replace("[sub]", Submarine.MainSub.Name)
.Replace("[location]", GameMain.GameSession.StartLocation.Name);
var infoText = new GUITextBlock(new Rectangle(0, y, 0, 50), summaryText, "", innerFrame, true); var infoText = new GUITextBlock(new Rectangle(0, y, 0, 50), summaryText, "", innerFrame, true);
y += infoText.Rect.Height; y += infoText.Rect.Height;
} }
if (!string.IsNullOrWhiteSpace(endMessage)) if (!string.IsNullOrWhiteSpace(endMessage))
{ {
var endText = new GUITextBlock(new Rectangle(0, y, 0, 30), endMessage, "", innerFrame, true); var endText = new GUITextBlock(new Rectangle(0, y, 0, 30), endMessage, "", innerFrame, true);