diff --git a/Content.Client/Lobby/LobbyState.cs b/Content.Client/Lobby/LobbyState.cs index 1ba2e318ad..a77136ae41 100644 --- a/Content.Client/Lobby/LobbyState.cs +++ b/Content.Client/Lobby/LobbyState.cs @@ -1,22 +1,19 @@ -using Content.Client.Chat.Managers; using Content.Client.GameTicking.Managers; using Content.Client.LateJoin; using Content.Client.Lobby.UI; +using Content.Client.Message; using Content.Client.Preferences; using Content.Client.Preferences.UI; using Content.Client.UserInterface.Systems.Chat; using Content.Client.Voting; using Robust.Client; using Robust.Client.Console; -using Robust.Client.Input; -using Robust.Client.Player; using Robust.Client.ResourceManagement; using Robust.Client.UserInterface; using Robust.Client.UserInterface.Controls; using Robust.Shared.Configuration; using Robust.Shared.Prototypes; using Robust.Shared.Timing; -using Content.Client.UserInterface.Systems.EscapeMenu; namespace Content.Client.Lobby @@ -199,6 +196,29 @@ namespace Content.Client.Lobby { _lobby!.ServerInfo.SetInfoBlob(_gameTicker.ServerInfoBlob); } + + if (_gameTicker.LobbySong == null) + { + _lobby!.LobbySong.SetMarkup(Loc.GetString("lobby-state-song-no-song-text")); + } + else if (_resourceCache.TryGetResource(_gameTicker.LobbySong, out var lobbySongResource)) + { + var lobbyStream = lobbySongResource.AudioStream; + + var title = string.IsNullOrEmpty(lobbyStream.Title) ? + Loc.GetString("lobby-state-song-unknown-title") : + lobbyStream.Title; + + var artist = string.IsNullOrEmpty(lobbyStream.Artist) ? + Loc.GetString("lobby-state-song-unknown-artist") : + lobbyStream.Artist; + + var markup = Loc.GetString("lobby-state-song-text", + ("songTitle", title), + ("songArtist", artist)); + + _lobby!.LobbySong.SetMarkup(markup); + } } private void UpdateLobbyBackground() diff --git a/Content.Client/Lobby/UI/LobbyGui.xaml b/Content.Client/Lobby/UI/LobbyGui.xaml index 8dbef0632a..68e974dbd5 100644 --- a/Content.Client/Lobby/UI/LobbyGui.xaml +++ b/Content.Client/Lobby/UI/LobbyGui.xaml @@ -40,8 +40,11 @@ - + + + + diff --git a/Resources/Locale/en-US/lobby/lobby-state.ftl b/Resources/Locale/en-US/lobby/lobby-state.ftl index 0e86f8ff6e..2e60b66bde 100644 --- a/Resources/Locale/en-US/lobby/lobby-state.ftl +++ b/Resources/Locale/en-US/lobby/lobby-state.ftl @@ -10,3 +10,7 @@ lobby-state-player-status-ready = Ready lobby-state-player-status-observer = Observer lobby-state-player-status-round-not-started = The round hasn't started yet lobby-state-player-status-round-time = The round time is: {$hours} hours and {$minutes} minutes +lobby-state-song-text = Playing: [color=white]{$songTitle}[/color] by [color=white]{$songArtist}[/color] +lobby-state-song-no-song-text = No lobby song playing. +lobby-state-song-unknown-title = [color=dimgray]Unknown title[/color] +lobby-state-song-unknown-artist = [color=dimgray]Unknown artist[/color]