From 230f70aa0fe3766193f897e6d2e2f25007184e8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Schr=C3=B6dinger?= <132720404+Schrodinger71@users.noreply.github.com> Date: Wed, 20 Nov 2024 22:35:10 +0000 Subject: [PATCH] =?UTF-8?q?[ADMIN]=20=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=20=D0=BB=D0=BE=D0=B3=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BD?= =?UTF-8?q?=D0=B8=D0=B5=20=D0=BD=D0=B0=20=D0=BA=D0=BE=D0=BC=D0=B0=D0=BD?= =?UTF-8?q?=D0=B4=D1=83=20"playglobalsound"=20(#812)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Описание PR Из описания всё ясно ## Почему / Баланс **Ссылка на публикацию в Discord** ## Техническая информация ## Медиа ![image](https://github.com/user-attachments/assets/abb14051-eff2-473a-87cb-263403c66db9) ## Требования - [x] Я прочитал(а) и следую [Руководство по созданию пулл реквестов](https://docs.spacestation14.com/en/general-development/codebase-info/pull-request-guidelines.html). Я понимаю, что в противном случае мой ПР может быть закрыт по усмотрению мейнтейнера. - [x] Я добавил скриншоты/видео к этому пулл реквесту, демонстрирующие его изменения в игре, **или** этот пулл реквест не требует демонстрации в игре ## Критические изменения **Чейнджлог** no cl no FUN --- .../Administration/Commands/PlayGlobalSoundCommand.cs | 10 ++++++++++ Content.Server/Tips/TipsSystem.cs | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Content.Server/Administration/Commands/PlayGlobalSoundCommand.cs b/Content.Server/Administration/Commands/PlayGlobalSoundCommand.cs index f1a5a57aa65..724cf1d1420 100644 --- a/Content.Server/Administration/Commands/PlayGlobalSoundCommand.cs +++ b/Content.Server/Administration/Commands/PlayGlobalSoundCommand.cs @@ -7,6 +7,8 @@ using Robust.Shared.ContentPack; using Robust.Shared.Player; using Robust.Shared.Prototypes; +using Content.Server.Administration.Logs; +using Content.Shared.Database; namespace Content.Server.Administration.Commands; @@ -17,6 +19,7 @@ public sealed class PlayGlobalSoundCommand : IConsoleCommand [Dependency] private readonly IPlayerManager _playerManager = default!; [Dependency] private readonly IPrototypeManager _protoManager = default!; [Dependency] private readonly IResourceManager _res = default!; + [Dependency] private readonly IAdminLogManager _adminLogger = default!; public string Command => "playglobalsound"; public string Description => Loc.GetString("play-global-sound-command-description"); @@ -89,6 +92,13 @@ public void Execute(IConsoleShell shell, string argStr, string[] args) audio = audio.AddVolume(-8); _entManager.System().PlayAdminGlobal(filter, args[0], audio, replay); + // ADT-Tweak-start: Добавил логирование на playglobalsound + _adminLogger.Add( + LogType.AdminMessage, + LogImpact.Low, + $"[АДМИНАБУЗ] {shell.Player?.Name} used the command 'playglobalsound' with path '{args[0]}'." + ); + // ADT-Tweak-end } public CompletionResult GetCompletion(IConsoleShell shell, string[] args) diff --git a/Content.Server/Tips/TipsSystem.cs b/Content.Server/Tips/TipsSystem.cs index 3864d9160cd..2f909b64e3e 100644 --- a/Content.Server/Tips/TipsSystem.cs +++ b/Content.Server/Tips/TipsSystem.cs @@ -89,7 +89,7 @@ private void SendTippy(IConsoleShell shell, string argstr, string[] args) _adminLogger.Add( LogType.AdminMessage, LogImpact.Low, - $"[АДМИНАБУЗ] {shell.Player?.Name} used the command tippy or tip." + $"[АДМИНАБУЗ] {shell.Player?.Name} used the command tippy or tip. EntityPrototype: {args[2]}" ); // ADT-Tweak-End ActorComponent? actor = null;