]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Add pop sound effect when using the erase admin verb (#20988)
authorDrSmugleaf <DrSmugleaf@users.noreply.github.com>
Sat, 14 Oct 2023 09:53:02 +0000 (02:53 -0700)
committerGitHub <noreply@github.com>
Sat, 14 Oct 2023 09:53:02 +0000 (02:53 -0700)
Content.Server/Administration/Systems/AdminSystem.cs
Resources/Audio/Effects/attributions.yml
Resources/Audio/Effects/pop_high.ogg [new file with mode: 0644]
Resources/Changelog/Admin.yml

index 8a2b6d5119417e4d14d16394ea36377f49529f7f..66f7a8999b33cabfa6e30edbc551f702cd5f47fa 100644 (file)
@@ -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))
index 71a2ae2b53c0a0a09f0238fd15e5a6d8fb5d0371..556c4603a5a49ba22035cf2933584fc90fb31063 100644 (file)
   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 (file)
index 0000000..679da25
Binary files /dev/null and b/Resources/Audio/Effects/pop_high.ogg differ
index 728859e3f426b4ebb5b929080f7f1aea29637654..9aa77155cc50feedc6c1240f60ba69c81cbce0c5 100644 (file)
@@ -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'