Отключение звука новых ролей (#1658)
This commit is contained in:
parent
ec4717482c
commit
2df43d876c
5 changed files with 24 additions and 7 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
<CheckBox Name="TapePlayerClientCheckBox" Text="{Loc 'ui-options-tape-player-enabled'}" />
|
||||
<CheckBox Name="JumpSoundDisableCheckBox" Text="{Loc 'ui-options-jump-sound-disable'}" />
|
||||
<CheckBox Name="VoteMusicDisableCheckBox" Text="{Loc 'ui-options-vote-music-disable'}" />
|
||||
<CheckBox Name="MuteGhostRoleNotificationCheckBox" Text="{Loc 'ui-options-mute-new-ghost-roles'}" />
|
||||
|
||||
<!-- Graphics -->
|
||||
<Label Text="{Loc 'ui-options-sunrise-general-graphics'}" StyleClasses="LabelKeyText"/>
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -414,4 +414,11 @@ public sealed class SunriseCCVars
|
|||
|
||||
public static readonly CVarDef<bool> ChatPointingVisuals =
|
||||
CVarDef.Create("chat_icon_pointing.enable", true, CVar.CLIENTONLY | CVar.ARCHIVE);
|
||||
|
||||
/*
|
||||
* Mute new ghost role sound
|
||||
*/
|
||||
|
||||
public static readonly CVarDef<bool> MuteGhostRoleNotification =
|
||||
CVarDef.Create("ghost.mute_role_notification", false, CVar.CLIENTONLY | CVar.ARCHIVE);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 = Прыжок
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue