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 @@
+
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 = Прыжок