diff --git a/Content.Client/GameTicking/Managers/ClientGameTicker.cs b/Content.Client/GameTicking/Managers/ClientGameTicker.cs index b1451b73e8..7609b71d0c 100644 --- a/Content.Client/GameTicking/Managers/ClientGameTicker.cs +++ b/Content.Client/GameTicking/Managers/ClientGameTicker.cs @@ -1,5 +1,3 @@ -using System; -using System.Collections.Generic; using Content.Client.Lobby; using Content.Client.RoundEnd; using Content.Client.Viewport; @@ -9,12 +7,8 @@ using Content.Shared.Station; using JetBrains.Annotations; using Robust.Client.Graphics; using Robust.Client.State; -using Robust.Shared.ContentPack; -using Robust.Shared.IoC; -using Robust.Shared.Log; using Robust.Shared.Network; using Robust.Shared.Utility; -using Robust.Shared.ViewVariables; namespace Content.Client.GameTicking.Managers { @@ -129,7 +123,7 @@ namespace Content.Client.GameTicking.Managers private void RoundEnd(RoundEndMessageEvent message) { //This is not ideal at all, but I don't see an immediately better fit anywhere else. - var roundEnd = new RoundEndSummaryWindow(message.GamemodeTitle, message.RoundEndText, message.RoundDuration, message.AllPlayersEndInfo); + var roundEnd = new RoundEndSummaryWindow(message.GamemodeTitle, message.RoundEndText, message.RoundDuration, message.RoundId, message.AllPlayersEndInfo); } } } diff --git a/Content.Client/RoundEnd/RoundEndSummaryWindow.cs b/Content.Client/RoundEnd/RoundEndSummaryWindow.cs index 7958a414f9..94ba34a23c 100644 --- a/Content.Client/RoundEnd/RoundEndSummaryWindow.cs +++ b/Content.Client/RoundEnd/RoundEndSummaryWindow.cs @@ -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 diff --git a/Content.Server/GameTicking/GameTicker.Lobby.cs b/Content.Server/GameTicking/GameTicker.Lobby.cs index bc826ebf9d..16fb5ea038 100644 --- a/Content.Server/GameTicking/GameTicker.Lobby.cs +++ b/Content.Server/GameTicking/GameTicker.Lobby.cs @@ -1,13 +1,8 @@ -using System; -using System.Collections.Generic; -using System.Linq; using Content.Shared.GameTicking; using Robust.Server.Player; -using Robust.Shared.Localization; using Robust.Shared.Network; using Robust.Shared.Player; using Robust.Shared.Players; -using Robust.Shared.ViewVariables; namespace Content.Server.GameTicking { @@ -50,7 +45,7 @@ namespace Content.Server.GameTicking var mapName = map?.MapName ?? Loc.GetString("game-ticker-no-map-selected"); var gmTitle = Loc.GetString(_preset.ModeTitle); var desc = Loc.GetString(_preset.Description); - return Loc.GetString("game-ticker-get-info-text",("playerCount", playerCount),("mapName", mapName),("gmTitle", gmTitle),("desc", desc)); + return Loc.GetString("game-ticker-get-info-text",("roundId", RoundId), ("playerCount", playerCount),("mapName", mapName),("gmTitle", gmTitle),("desc", desc)); } private TickerLobbyReadyEvent GetStatusSingle(ICommonSession player, LobbyPlayerStatus status) diff --git a/Content.Server/GameTicking/GameTicker.RoundFlow.cs b/Content.Server/GameTicking/GameTicker.RoundFlow.cs index a33e8f2c2a..3d14b5c61d 100644 --- a/Content.Server/GameTicking/GameTicker.RoundFlow.cs +++ b/Content.Server/GameTicking/GameTicker.RoundFlow.cs @@ -366,7 +366,7 @@ namespace Content.Server.GameTicking // This ordering mechanism isn't great (no ordering of minds) but functions var listOfPlayerInfoFinal = listOfPlayerInfo.OrderBy(pi => pi.PlayerOOCName).ToArray(); _playersInGame.Clear(); - RaiseNetworkEvent(new RoundEndMessageEvent(gamemodeTitle, roundEndText, roundDuration, listOfPlayerInfoFinal.Length, listOfPlayerInfoFinal)); + RaiseNetworkEvent(new RoundEndMessageEvent(gamemodeTitle, roundEndText, roundDuration, RoundId, listOfPlayerInfoFinal.Length, listOfPlayerInfoFinal)); } public void RestartRound() diff --git a/Content.Shared/GameTicking/SharedGameTicker.cs b/Content.Shared/GameTicking/SharedGameTicker.cs index ed7a6c7d74..46271cc2ea 100644 --- a/Content.Shared/GameTicking/SharedGameTicker.cs +++ b/Content.Shared/GameTicking/SharedGameTicker.cs @@ -1,8 +1,4 @@ - -using System; -using System.Collections.Generic; -using Content.Shared.Station; -using Robust.Shared.GameObjects; +using Content.Shared.Station; using Robust.Shared.Network; using Robust.Shared.Serialization; @@ -139,15 +135,17 @@ namespace Content.Shared.GameTicking public string GamemodeTitle { get; } public string RoundEndText { get; } public TimeSpan RoundDuration { get; } + public int RoundId { get; } public int PlayerCount { get; } public RoundEndPlayerInfo[] AllPlayersEndInfo { get; } - public RoundEndMessageEvent(string gamemodeTitle, string roundEndText, TimeSpan roundDuration, int playerCount, - RoundEndPlayerInfo[] allPlayersEndInfo) + public RoundEndMessageEvent(string gamemodeTitle, string roundEndText, TimeSpan roundDuration, int roundId, + int playerCount, RoundEndPlayerInfo[] allPlayersEndInfo) { GamemodeTitle = gamemodeTitle; RoundEndText = roundEndText; RoundDuration = roundDuration; + RoundId = roundId; PlayerCount = playerCount; AllPlayersEndInfo = allPlayersEndInfo; } diff --git a/Resources/Locale/en-US/game-ticking/game-ticker.ftl b/Resources/Locale/en-US/game-ticking/game-ticker.ftl index b6e3a5bef8..2c3ed3a50b 100644 --- a/Resources/Locale/en-US/game-ticking/game-ticker.ftl +++ b/Resources/Locale/en-US/game-ticking/game-ticker.ftl @@ -10,9 +10,10 @@ game-ticker-pause-start = Round start has been paused. game-ticker-pause-start-resumed = Round start countdown is now resumed. game-ticker-player-join-game-message = Welcome to Space Station 14! If this is your first time playing, be sure to press F1 on your keyboard and read the game rules, and don't be afraid to ask for help in OOC. game-ticker-get-info-text = Hi and welcome to [color=white]Space Station 14![/color] + The current round is: [color=white]#{$roundId}[/color] The current player count is: [color=white]{$playerCount}[/color] The current map is: [color=white]{$mapName}[/color] - The current game mode is: [color=white]{$gmTitle}[/color]. + The current game mode is: [color=white]{$gmTitle}[/color] >[color=yellow]{$desc}[/color] game-ticker-no-map-selected = [color=red]No map selected![/color] game-ticker-player-no-jobs-available-when-joining = When attempting to join to the game, no jobs were available. diff --git a/Resources/Locale/en-US/round-end/round-end-summary-window.ftl b/Resources/Locale/en-US/round-end/round-end-summary-window.ftl index 52c38d3e64..8069838e11 100644 --- a/Resources/Locale/en-US/round-end/round-end-summary-window.ftl +++ b/Resources/Locale/en-US/round-end/round-end-summary-window.ftl @@ -1,7 +1,8 @@ round-end-summary-window-title = Round End Summary round-end-summary-window-round-end-summary-tab-title = Round Information round-end-summary-window-player-manifesto-tab-title = Player Manifesto -round-end-summary-window-gamemode-name-label = Round of [color=white]{$gamemode}[/color] has ended. +round-end-summary-window-round-id-label = Round [color=white]#{$roundId}[/color] has ended. +round-end-summary-window-gamemode-name-label = The game mode was [color=white]{$gamemode}[/color]. round-end-summary-window-duration-label = It lasted for [color=yellow]{$hours} hours, {$minutes} minutes, and {$seconds} seconds. round-end-summary-window-player-info-if-observer-text = [color=gray]{$playerOOCName}[/color] was [color=lightblue]{$playerICName}[/color], an observer. -round-end-summary-window-player-info-if-not-observer-text = [color=gray]{$playerOOCName}[/color] was [color={$icNameColor}]{$playerICName}[/color] playing role of [color=orange]{$playerRole}[/color]. \ No newline at end of file +round-end-summary-window-player-info-if-not-observer-text = [color=gray]{$playerOOCName}[/color] was [color={$icNameColor}]{$playerICName}[/color] playing role of [color=orange]{$playerRole}[/color].