Allow specifying a text to be shown to players in the summary when ending the round. (#1818)

* Allow specifying a text to be shown to players when ending the round.
Also sets text

* Fix comment
This commit is contained in:
Víctor Aguilera Puerto
2020-08-20 18:09:29 +02:00
committed by GitHub
parent de61a01703
commit 9e7d698145
7 changed files with 47 additions and 11 deletions

View File

@@ -326,7 +326,7 @@ namespace Content.Server.GameTicking
(HumanoidCharacterProfile) (await _prefsManager.GetPreferencesAsync(p.SessionId.Username))
.SelectedCharacter;
public void EndRound()
public void EndRound(string roundEndText = "")
{
DebugTools.Assert(RunLevel == GameRunLevel.InRound);
Logger.InfoS("ticker", "Ending round!");
@@ -336,6 +336,7 @@ namespace Content.Server.GameTicking
//Tell every client the round has ended.
var roundEndMessage = _netManager.CreateNetMessage<MsgRoundEndMessage>();
roundEndMessage.GamemodeTitle = MakeGamePreset(null).ModeTitle;
roundEndMessage.RoundEndText = roundEndText;
//Get the timespan of the round.
roundEndMessage.RoundDuration = IoCManager.Resolve<IGameTiming>().RealTime.Subtract(_roundStartTimeSpan);