Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pop sound effect when using the erase admin verb #20988

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Content.Server/Administration/Systems/AdminSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
using Content.Shared.Throwing;
using Robust.Server.GameObjects;
using Robust.Server.Player;
using Robust.Shared.Audio;
using Robust.Shared.Configuration;
using Robust.Shared.Enums;
using Robust.Shared.Network;
Expand All @@ -38,6 +39,7 @@ public sealed class AdminSystem : EntitySystem
[Dependency] private readonly IChatManager _chat = default!;
[Dependency] private readonly IConfigurationManager _config = default!;
[Dependency] private readonly IPlayerManager _playerManager = default!;
[Dependency] private readonly AudioSystem _audio = default!;
[Dependency] private readonly HandsSystem _hands = default!;
[Dependency] private readonly SharedJobSystem _jobs = default!;
[Dependency] private readonly InventorySystem _inventory = default!;
Expand Down Expand Up @@ -336,6 +338,9 @@ public void Erase(IPlayerSession player)
var coordinates = _transform.GetMoverCoordinates(entity.Value, transform);
var name = Identity.Entity(entity.Value, EntityManager);
_popup.PopupCoordinates(Loc.GetString("admin-erase-popup", ("user", name)), coordinates, PopupType.LargeCaution);
var filter = Filter.Pvs(coordinates, 1, EntityManager, _playerManager);
var audioParams = new AudioParams().WithVolume(3);
_audio.Play("/Audio/Effects/pop_high.ogg", filter, coordinates, true, audioParams);
}

foreach (var item in _inventory.GetHandOrInventoryEntities(entity.Value))
Expand Down
9 changes: 7 additions & 2 deletions Resources/Audio/Effects/attributions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,13 @@
license: "CC-BY-SA-3.0"
copyright: "Taken from tgstation"
source: "https://github.com/tgstation/tgstation/blob/e3a835b96043fad1269ee7b0c3a6cb340a466f3a/sound/effects/break_stone.ogg"

- files: ["waterswirl.ogg"]
license: "CC0-1.0"
license: "CC-BY-4.0"
copyright: "Taken from InspectorJ via freesound.org and mixed from stereo to mono."
source: "https://freesound.org/people/InspectorJ/sounds/398703/"

- files: ["pop_high.ogg"]
license: "CC-BY-4.0"
copyright: "Taken from InspectorJ via freesound.org and mixed from stereo to mono."
source: "https://freesound.org/people/InspectorJ/sounds/411642/"
Binary file added Resources/Audio/Effects/pop_high.ogg
Binary file not shown.
5 changes: 5 additions & 0 deletions Resources/Changelog/Admin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,8 @@ Entries:
- {message: 'Added message tooltip to the erase verb.', type: Tweak}
id: 5
time: '2023-10-14T09:21:00.0000000+00:00'
- author: DrSmugleaf
changes:
- {message: 'Add pop sound effect when using the erase admin verb.', type: Tweak}
id: 5
time: '2023-10-14T09:47:00.0000000+00:00'