Add pop sound effect when using the erase admin verb (#20988)
This commit is contained in:
@@ -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))
|
||||
|
||||
@@ -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/"
|
||||
|
||||
BIN
Resources/Audio/Effects/pop_high.ogg
Normal file
BIN
Resources/Audio/Effects/pop_high.ogg
Normal file
Binary file not shown.
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user