Add round id to lobby and round end summary (#7547)

This commit is contained in:
ShadowCommander
2022-04-14 11:40:26 -07:00
committed by GitHub
parent 86535b4766
commit a57e0ca199
7 changed files with 23 additions and 30 deletions

View File

@@ -1,10 +1,9 @@
using System;
using System.Linq;
using Content.Client.Message;
using Content.Shared.GameTicking;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.CustomControls;
using Robust.Shared.Localization;
using Robust.Shared.Utility;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.RoundEnd
@@ -12,7 +11,8 @@ namespace Content.Client.RoundEnd
public sealed class RoundEndSummaryWindow : DefaultWindow
{
public RoundEndSummaryWindow(string gm, string roundEnd, TimeSpan roundTimeSpan, RoundEndMessageEvent.RoundEndPlayerInfo[] info)
public RoundEndSummaryWindow(string gm, string roundEnd, TimeSpan roundTimeSpan, int roundId,
RoundEndMessageEvent.RoundEndPlayerInfo[] info)
{
MinSize = SetSize = (520, 580);
@@ -25,7 +25,7 @@ namespace Content.Client.RoundEnd
// Also good for serious info.
var roundEndTabs = new TabContainer();
roundEndTabs.AddChild(MakeRoundEndSummaryTab(gm, roundEnd, roundTimeSpan));
roundEndTabs.AddChild(MakeRoundEndSummaryTab(gm, roundEnd, roundTimeSpan, roundId));
roundEndTabs.AddChild(MakePlayerManifestoTab(info));
Contents.AddChild(roundEndTabs);
@@ -34,7 +34,7 @@ namespace Content.Client.RoundEnd
MoveToFront();
}
private BoxContainer MakeRoundEndSummaryTab(string gamemode, string roundEnd, TimeSpan roundDuration)
private BoxContainer MakeRoundEndSummaryTab(string gamemode, string roundEnd, TimeSpan roundDuration, int roundId)
{
var roundEndSummaryTab = new BoxContainer
{
@@ -53,7 +53,11 @@ namespace Content.Client.RoundEnd
//Gamemode Name
var gamemodeLabel = new RichTextLabel();
gamemodeLabel.SetMarkup(Loc.GetString("round-end-summary-window-gamemode-name-label", ("gamemode", gamemode)));
var gamemodeMessage = new FormattedMessage();
gamemodeMessage.AddMarkup(Loc.GetString("round-end-summary-window-round-id-label", ("roundId", roundId)));
gamemodeMessage.AddText(" ");
gamemodeMessage.AddMarkup(Loc.GetString("round-end-summary-window-gamemode-name-label", ("gamemode", gamemode)));
gamemodeLabel.SetMessage(gamemodeMessage);
roundEndSummaryContainer.AddChild(gamemodeLabel);
//Duration