diff --git a/Content.Benchmarks/DeviceNetworkingBenchmark.cs b/Content.Benchmarks/DeviceNetworkingBenchmark.cs index 16805c2684f..bb2a22312ea 100644 --- a/Content.Benchmarks/DeviceNetworkingBenchmark.cs +++ b/Content.Benchmarks/DeviceNetworkingBenchmark.cs @@ -4,8 +4,8 @@ using Content.IntegrationTests; using Content.IntegrationTests.Pair; using Content.IntegrationTests.Tests.DeviceNetwork; -using Content.Server.DeviceNetwork; using Content.Server.DeviceNetwork.Systems; +using Content.Shared.DeviceNetwork; using Robust.Shared; using Robust.Shared.Analyzers; using Robust.Shared.GameObjects; diff --git a/Content.Client/Audio/BackgroundAudioSystem.cs b/Content.Client/Audio/BackgroundAudioSystem.cs index 27b2dcb1b73..29279830627 100644 --- a/Content.Client/Audio/BackgroundAudioSystem.cs +++ b/Content.Client/Audio/BackgroundAudioSystem.cs @@ -25,8 +25,10 @@ public sealed class BackgroundAudioSystem : EntitySystem [Dependency] private readonly IStateManager _stateManager = default!; private readonly AudioParams _lobbyParams = new(-5f, 1, "Master", 0, 0, 0, true, 0f); + private readonly AudioParams _roundEndParams = new(-5f, 1, "Master", 0, 0, 0, false, 0f); - public EntityUid? LobbyStream; + public EntityUid? LobbyMusicStream; + public EntityUid? LobbyRoundRestartAudioStream; public override void Initialize() { @@ -115,7 +117,7 @@ public void RestartLobbyMusic() public void StartLobbyMusic() { - if (LobbyStream != null || !_configManager.GetCVar(CCVars.LobbyMusicEnabled)) + if (LobbyMusicStream != null || !_configManager.GetCVar(CCVars.LobbyMusicEnabled)) return; var file = _gameTicker.LobbySong; @@ -124,18 +126,21 @@ public void StartLobbyMusic() return; } - LobbyStream = _audio.PlayGlobal(file, Filter.Local(), false, + LobbyMusicStream = _audio.PlayGlobal( + file, + Filter.Local(), + false, _lobbyParams.WithVolume(_lobbyParams.Volume + SharedAudioSystem.GainToVolume(_configManager.GetCVar(CCVars.LobbyMusicVolume))))?.Entity; } private void EndLobbyMusic() { - LobbyStream = _audio.Stop(LobbyStream); + LobbyMusicStream = _audio.Stop(LobbyMusicStream); } private void PlayRestartSound(RoundRestartCleanupEvent ev) { - if (!_configManager.GetCVar(CCVars.LobbyMusicEnabled)) + if (!_configManager.GetCVar(CCVars.RestartSoundsEnabled)) return; var file = _gameTicker.RestartSound; @@ -144,10 +149,11 @@ private void PlayRestartSound(RoundRestartCleanupEvent ev) return; } - var volume = _lobbyParams.WithVolume(_lobbyParams.Volume + - SharedAudioSystem.GainToVolume( - _configManager.GetCVar(CCVars.LobbyMusicVolume))); - - _audio.PlayGlobal(file, Filter.Local(), false, volume); + LobbyRoundRestartAudioStream = _audio.PlayGlobal( + file, + Filter.Local(), + false, + _roundEndParams.WithVolume(_roundEndParams.Volume + SharedAudioSystem.GainToVolume(_configManager.GetCVar(CCVars.LobbyMusicVolume))) + )?.Entity; } } diff --git a/Content.Client/Audio/ContentAudioSystem.cs b/Content.Client/Audio/ContentAudioSystem.cs index 7006524b9e6..6b89e5ccb9e 100644 --- a/Content.Client/Audio/ContentAudioSystem.cs +++ b/Content.Client/Audio/ContentAudioSystem.cs @@ -51,15 +51,24 @@ private void OnRoundCleanup(RoundRestartCleanupEvent ev) _fadingOut.Clear(); // Preserve lobby music but everything else should get dumped. - var lobbyStream = EntityManager.System().LobbyStream; - TryComp(lobbyStream, out AudioComponent? audioComp); - var oldGain = audioComp?.Gain; + var lobbyMusic = EntityManager.System().LobbyMusicStream; + TryComp(lobbyMusic, out AudioComponent? lobbyMusicComp); + var oldMusicGain = lobbyMusicComp?.Gain; + + var restartAudio = EntityManager.System().LobbyRoundRestartAudioStream; + TryComp(restartAudio, out AudioComponent? restartComp); + var oldAudioGain = restartComp?.Gain; SilenceAudio(); - if (oldGain != null) + if (oldMusicGain != null) + { + Audio.SetGain(lobbyMusic, oldMusicGain.Value, lobbyMusicComp); + } + + if (oldAudioGain != null) { - Audio.SetGain(lobbyStream, oldGain.Value, audioComp); + Audio.SetGain(restartAudio, oldAudioGain.Value, restartComp); } } diff --git a/Content.Client/CartridgeLoader/Cartridges/LogProbeUiEntry.xaml b/Content.Client/CartridgeLoader/Cartridges/LogProbeUiEntry.xaml index 5712b301c38..598acf36e7a 100644 --- a/Content.Client/CartridgeLoader/Cartridges/LogProbeUiEntry.xaml +++ b/Content.Client/CartridgeLoader/Cartridges/LogProbeUiEntry.xaml @@ -4,16 +4,16 @@ Orientation="Vertical"> diff --git a/Content.Client/CartridgeLoader/Cartridges/LogProbeUiFragment.xaml b/Content.Client/CartridgeLoader/Cartridges/LogProbeUiFragment.xaml index d369a33c6ce..d12fb55cdce 100644 --- a/Content.Client/CartridgeLoader/Cartridges/LogProbeUiFragment.xaml +++ b/Content.Client/CartridgeLoader/Cartridges/LogProbeUiFragment.xaml @@ -9,10 +9,10 @@ BorderColor="#5a5a5a" BorderThickness="0 0 0 1"/> - -