Displaying of player characters in the round end statistics (#9006)

* All in one

* using fix

* Update GameTicker.RoundFlow.cs

Co-authored-by: Paul Ritter <ritter.paul1@googlemail.com>
This commit is contained in:
KIBORG04
2022-06-23 16:32:06 +07:00
committed by GitHub
parent bdc656200a
commit 58da937259
6 changed files with 67 additions and 5 deletions

View File

@@ -262,6 +262,11 @@ namespace Content.Server.GameTicking
RunLevel = GameRunLevel.PostRound;
ShowRoundEndScoreboard(text);
}
public void ShowRoundEndScoreboard(string text = "")
{
//Tell every client the round has ended.
var gamemodeTitle = Preset != null ? Loc.GetString(Preset.ModeTitle) : string.Empty;
@@ -314,6 +319,7 @@ namespace Content.Server.GameTicking
PlayerOOCName = contentPlayerData?.Name ?? "(IMPOSSIBLE: REGISTERED MIND WITH NO OWNER)",
// Character name takes precedence over current entity name
PlayerICName = playerIcName,
PlayerEntityUid = mind.OwnedEntity,
Role = antag
? mind.AllRoles.First(role => role.Antagonist).Name
: mind.AllRoles.FirstOrDefault()?.Name ?? Loc.GetString("game-ticker-unknown-role"),
@@ -370,7 +376,7 @@ namespace Content.Server.GameTicking
ReqWindowAttentionAll();
}
}
/// <summary>
/// Cleanup that has to run to clear up anything from the previous round.
/// Stuff like wiping the previous map clean.