From: DrSmugleaf Date: Sat, 14 Oct 2023 09:53:02 +0000 (-0700) Subject: Add pop sound effect when using the erase admin verb (#20988) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=8639df7a74ee7c0a408e3acd9922272fe900c195;p=space-station-14.git Add pop sound effect when using the erase admin verb (#20988) --- diff --git a/Content.Server/Administration/Systems/AdminSystem.cs b/Content.Server/Administration/Systems/AdminSystem.cs index 8a2b6d5119..66f7a8999b 100644 --- a/Content.Server/Administration/Systems/AdminSystem.cs +++ b/Content.Server/Administration/Systems/AdminSystem.cs @@ -25,6 +25,7 @@ using Content.Shared.StationRecords; 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; @@ -38,6 +39,7 @@ namespace Content.Server.Administration.Systems [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!; @@ -336,6 +338,9 @@ namespace Content.Server.Administration.Systems 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)) diff --git a/Resources/Audio/Effects/attributions.yml b/Resources/Audio/Effects/attributions.yml index 71a2ae2b53..556c4603a5 100644 --- a/Resources/Audio/Effects/attributions.yml +++ b/Resources/Audio/Effects/attributions.yml @@ -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/" diff --git a/Resources/Audio/Effects/pop_high.ogg b/Resources/Audio/Effects/pop_high.ogg new file mode 100644 index 0000000000..679da25078 Binary files /dev/null and b/Resources/Audio/Effects/pop_high.ogg differ diff --git a/Resources/Changelog/Admin.yml b/Resources/Changelog/Admin.yml index 728859e3f4..9aa77155cc 100644 --- a/Resources/Changelog/Admin.yml +++ b/Resources/Changelog/Admin.yml @@ -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'