From 2df43d876cd4b1d7fd3e79bf6cd8783b08641bbf Mon Sep 17 00:00:00 2001 From: Babaev <129369024+babaevlsdd@users.noreply.github.com> Date: Fri, 4 Apr 2025 15:38:31 +0600 Subject: [PATCH] =?UTF-8?q?=D0=9E=D1=82=D0=BA=D0=BB=D1=8E=D1=87=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D0=B7=D0=B2=D1=83=D0=BA=D0=B0=20=D0=BD?= =?UTF-8?q?=D0=BE=D0=B2=D1=8B=D1=85=20=D1=80=D0=BE=D0=BB=D0=B5=D0=B9=20(#1?= =?UTF-8?q?658)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Content.Client/Ghost/GhostSystem.cs | 21 ++++++++++++------- Content.Client/Options/UI/Tabs/ExtraTab.xaml | 1 + .../Options/UI/Tabs/ExtraTab.xaml.cs | 1 + .../_Sunrise/SunriseCCVars/SunriseCCVars.cs | 7 +++++++ .../_sunrise/escape-menu/ui/options-menu.ftl | 1 + 5 files changed, 24 insertions(+), 7 deletions(-) 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 @@ +