diff --git a/Content.Client/Ghost/GhostSystem.cs b/Content.Client/Ghost/GhostSystem.cs index f4f7e3459f..24210187db 100644 --- a/Content.Client/Ghost/GhostSystem.cs +++ b/Content.Client/Ghost/GhostSystem.cs @@ -1,9 +1,11 @@ using Content.Client.Movement.Systems; using Content.Shared.Actions; using Content.Shared.Ghost; +using Robust.Client.Audio; using Robust.Client.Console; using Robust.Client.GameObjects; using Robust.Client.Player; +using Robust.Shared.Audio; using Robust.Shared.Player; namespace Content.Client.Ghost @@ -14,6 +16,7 @@ namespace Content.Client.Ghost [Dependency] private readonly IPlayerManager _playerManager = default!; [Dependency] private readonly SharedActionsSystem _actions = default!; [Dependency] private readonly ContentEyeSystem _contentEye = default!; + [Dependency] private readonly AudioSystem _audioSystem = default!; public int AvailableGhostRoleCount { get; private set; } @@ -156,6 +159,17 @@ 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) + ); + } + AvailableGhostRoleCount = msg.AvailableGhostRoles; GhostRoleCountUpdated?.Invoke(msg); } diff --git a/Content.Client/UserInterface/Systems/Ghost/Controls/Roles/GhostRoleButtonsBox.xaml.cs b/Content.Client/UserInterface/Systems/Ghost/Controls/Roles/GhostRoleButtonsBox.xaml.cs index 7df0243416..830e91cbce 100644 --- a/Content.Client/UserInterface/Systems/Ghost/Controls/Roles/GhostRoleButtonsBox.xaml.cs +++ b/Content.Client/UserInterface/Systems/Ghost/Controls/Roles/GhostRoleButtonsBox.xaml.cs @@ -14,6 +14,7 @@ namespace Content.Client.UserInterface.Systems.Ghost.Controls.Roles { private SpriteSystem _spriteSystem; public event Action? OnRoleSelected; + public event Action? OnRoleRules; public event Action? OnRoleFollow; public GhostRoleButtonsBox(bool hasAccess, FormattedMessage? reason, IEnumerable roles, SpriteSystem spriteSystem) @@ -25,6 +26,7 @@ namespace Content.Client.UserInterface.Systems.Ghost.Controls.Roles { var button = new GhostRoleEntryButtons(role); button.RequestButton.OnPressed += _ => OnRoleSelected?.Invoke(role); + button.RulesButton.OnPressed += _ => OnRoleRules?.Invoke(role); button.FollowButton.OnPressed += _ => OnRoleFollow?.Invoke(role); if (!hasAccess) diff --git a/Content.Client/UserInterface/Systems/Ghost/Controls/Roles/GhostRoleEntryButtons.xaml b/Content.Client/UserInterface/Systems/Ghost/Controls/Roles/GhostRoleEntryButtons.xaml index 05c52deef1..917c3929e1 100644 --- a/Content.Client/UserInterface/Systems/Ghost/Controls/Roles/GhostRoleEntryButtons.xaml +++ b/Content.Client/UserInterface/Systems/Ghost/Controls/Roles/GhostRoleEntryButtons.xaml @@ -6,10 +6,17 @@ Text="{Loc 'ghost-roles-window-request-role-button'}" StyleClasses="OpenRight" HorizontalExpand="True" - SizeFlagsStretchRatio="3"/> + SizeFlagsStretchRatio="2"/> +