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 @@
+
diff --git a/Content.Client/Options/UI/Tabs/ExtraTab.xaml.cs b/Content.Client/Options/UI/Tabs/ExtraTab.xaml.cs
index f68aaec965..938a26cd53 100644
--- a/Content.Client/Options/UI/Tabs/ExtraTab.xaml.cs
+++ b/Content.Client/Options/UI/Tabs/ExtraTab.xaml.cs
@@ -41,6 +41,7 @@ public sealed partial class ExtraTab : Control
Control.AddOptionCheckBox(SunriseCCVars.TapePlayerClientEnabled, TapePlayerClientCheckBox);
Control.AddOptionCheckBox(SunriseCCVars.JumpSoundDisable, JumpSoundDisableCheckBox);
Control.AddOptionCheckBox(SunriseCCVars.VoteMusicDisable, VoteMusicDisableCheckBox);
+ Control.AddOptionCheckBox(SunriseCCVars.MuteGhostRoleNotification, MuteGhostRoleNotificationCheckBox);
_cfg.OnValueChanged(SunriseCCVars.LobbyBackgroundType, OnLobbyBackgroundTypeChanged, true);
diff --git a/Content.Shared/_Sunrise/SunriseCCVars/SunriseCCVars.cs b/Content.Shared/_Sunrise/SunriseCCVars/SunriseCCVars.cs
index f47f1e4aec..303c42ba55 100644
--- a/Content.Shared/_Sunrise/SunriseCCVars/SunriseCCVars.cs
+++ b/Content.Shared/_Sunrise/SunriseCCVars/SunriseCCVars.cs
@@ -414,4 +414,11 @@ public sealed class SunriseCCVars
public static readonly CVarDef ChatPointingVisuals =
CVarDef.Create("chat_icon_pointing.enable", true, CVar.CLIENTONLY | CVar.ARCHIVE);
+
+ /*
+ * Mute new ghost role sound
+ */
+
+ public static readonly CVarDef MuteGhostRoleNotification =
+ CVarDef.Create("ghost.mute_role_notification", false, CVar.CLIENTONLY | CVar.ARCHIVE);
}
diff --git a/Resources/Locale/ru-RU/_strings/_sunrise/escape-menu/ui/options-menu.ftl b/Resources/Locale/ru-RU/_strings/_sunrise/escape-menu/ui/options-menu.ftl
index fe562e418d..cb8a05707c 100644
--- a/Resources/Locale/ru-RU/_strings/_sunrise/escape-menu/ui/options-menu.ftl
+++ b/Resources/Locale/ru-RU/_strings/_sunrise/escape-menu/ui/options-menu.ftl
@@ -14,6 +14,7 @@ ui-options-tab-extra = Экстра
ui-options-tape-player-enabled = Школьники с колонками (Нужен рестарт раунда)
ui-options-jump-sound-disable = Отключить звук прыжка
ui-options-vote-music-disable = Отключить музыку голосования
+ui-options-mute-new-ghost-roles = Отключить звук новых гост-ролей
ui-options-function-toggle-standing = Лечь/Встать
ui-options-function-cock-gun = Взвести оружие/Разрядить
ui-options-function-jump = Прыжок