Round end sound now respects lobby music option toggle. (#8699)

Now it only plays when the round restarts *after* a regular roundend.
Meaning that if you spam the "restartroundnow" command, it won't play even if you have roundend sounds enabled in the options.
This commit is contained in:
Vera Aguilera Puerto
2022-06-12 03:23:28 +02:00
committed by GitHub
parent 2bc332a1b6
commit 0c337d6235
3 changed files with 25 additions and 3 deletions

View File

@@ -139,6 +139,7 @@ namespace Content.Shared.GameTicking
public int PlayerCount { get; }
public RoundEndPlayerInfo[] AllPlayersEndInfo { get; }
public string? LobbySong;
public string? RestartSound;
public RoundEndMessageEvent(
string gamemodeTitle,
@@ -147,7 +148,8 @@ namespace Content.Shared.GameTicking
int roundId,
int playerCount,
RoundEndPlayerInfo[] allPlayersEndInfo,
string? lobbySong)
string? lobbySong,
string? restartSound)
{
GamemodeTitle = gamemodeTitle;
RoundEndText = roundEndText;
@@ -156,6 +158,7 @@ namespace Content.Shared.GameTicking
PlayerCount = playerCount;
AllPlayersEndInfo = allPlayersEndInfo;
LobbySong = lobbySong;
RestartSound = restartSound;
}
}