diff --git a/Content.Client/Ghost/GhostSystem.cs b/Content.Client/Ghost/GhostSystem.cs index a7618ff4be..810677766c 100644 --- a/Content.Client/Ghost/GhostSystem.cs +++ b/Content.Client/Ghost/GhostSystem.cs @@ -1,12 +1,14 @@ using Content.Client.Movement.Systems; using Content.Shared.Actions; using Content.Shared.Ghost; +using Content.Shared._Sunrise.SunriseCCVars; // Sunrise-Edit using Robust.Client.Audio; using Robust.Client.Console; using Robust.Client.GameObjects; using Robust.Client.Player; using Robust.Shared.Audio; using Robust.Shared.Player; +using Robust.Shared.Configuration; // Sunrise-Edit namespace Content.Client.Ghost { @@ -18,6 +20,7 @@ namespace Content.Client.Ghost [Dependency] private readonly PointLightSystem _pointLightSystem = default!; [Dependency] private readonly ContentEyeSystem _contentEye = default!; [Dependency] private readonly AudioSystem _audioSystem = default!; + [Dependency] private readonly IConfigurationManager _cfg = default!; // Sunrise-Edit public int AvailableGhostRoleCount { get; private set; } @@ -179,15 +182,19 @@ namespace Content.Client.Ghost private void OnUpdateGhostRoleCount(GhostUpdateGhostRoleCountEvent msg) { - if (msg.AvailableGhostRoles > AvailableGhostRoleCount && IsGhost) { - _audioSystem.PlayGlobal( - "/Audio/_Sunrise/Misc/ping.ogg", - Filter.Local(), - false, - new AudioParams().WithVolume(10f) - ); + // Sunrise-Edit-Start + if (!_cfg.GetCVar(SunriseCCVars.MuteGhostRoleNotification)) + { + _audioSystem.PlayGlobal( + "/Audio/_Sunrise/Misc/ping.ogg", + Filter.Local(), + false, + new AudioParams().WithVolume(10f) + ); + } + // Sunrise-Edit-End } AvailableGhostRoleCount = msg.AvailableGhostRoles; diff --git a/Content.Client/Options/UI/Tabs/ExtraTab.xaml b/Content.Client/Options/UI/Tabs/ExtraTab.xaml index cfd41d240c..19348d4d4f 100644 --- a/Content.Client/Options/UI/Tabs/ExtraTab.xaml +++ b/Content.Client/Options/UI/Tabs/ExtraTab.xaml @@ -30,6 +30,7 @@ +