Enable nullability in Content.Server (#3685)

This commit is contained in:
DrSmugleaf
2021-03-16 15:50:20 +01:00
committed by GitHub
parent 90fec0ed24
commit a5ade526b7
306 changed files with 1616 additions and 1441 deletions

View File

@@ -74,20 +74,23 @@ namespace Content.Client.UserInterface
{
var playerInfoText = new RichTextLabel();
if (playerInfo.Observer)
if (playerInfo.PlayerICName != null)
{
playerInfoText.SetMarkup(
Loc.GetString("[color=gray]{0}[/color] was [color=lightblue]{1}[/color], an observer.",
playerInfo.PlayerOOCName, playerInfo.PlayerICName));
}
else
{
//TODO: On Hover display a popup detailing more play info.
//For example: their antag goals and if they completed them sucessfully.
var icNameColor = playerInfo.Antag ? "red" : "white";
playerInfoText.SetMarkup(
Loc.GetString("[color=gray]{0}[/color] was [color={1}]{2}[/color] playing role of [color=orange]{3}[/color].",
playerInfo.PlayerOOCName, icNameColor, playerInfo.PlayerICName, Loc.GetString(playerInfo.Role)));
if (playerInfo.Observer)
{
playerInfoText.SetMarkup(
Loc.GetString("[color=gray]{0}[/color] was [color=lightblue]{1}[/color], an observer.",
playerInfo.PlayerOOCName, playerInfo.PlayerICName));
}
else
{
//TODO: On Hover display a popup detailing more play info.
//For example: their antag goals and if they completed them sucessfully.
var icNameColor = playerInfo.Antag ? "red" : "white";
playerInfoText.SetMarkup(
Loc.GetString("[color=gray]{0}[/color] was [color={1}]{2}[/color] playing role of [color=orange]{3}[/color].",
playerInfo.PlayerOOCName, icNameColor, playerInfo.PlayerICName, Loc.GetString(playerInfo.Role)));
}
}
innerScrollContainer.AddChild(playerInfoText);
}