Add voice changer logs (#14040)
* add set voice log * add used identity to chat message logs * please tell me there's a better way
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
using Content.Server.Administration.Logs;
|
||||
using Content.Server.Chat.Systems;
|
||||
using Content.Server.Popups;
|
||||
using Content.Shared.Actions;
|
||||
using Content.Shared.Database;
|
||||
using Content.Shared.Inventory.Events;
|
||||
using Content.Shared.Preferences;
|
||||
using Content.Shared.Verbs;
|
||||
@@ -14,6 +16,7 @@ public sealed partial class VoiceMaskSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly UserInterfaceSystem _uiSystem = default!;
|
||||
[Dependency] private readonly PopupSystem _popupSystem = default!;
|
||||
[Dependency] private readonly IAdminLogManager _adminLogger = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
@@ -39,6 +42,10 @@ public sealed partial class VoiceMaskSystem : EntitySystem
|
||||
}
|
||||
|
||||
component.VoiceName = message.Name;
|
||||
if (message.Session.AttachedEntity != null)
|
||||
_adminLogger.Add(LogType.Action, LogImpact.Medium, $"{ToPrettyString(message.Session.AttachedEntity.Value):player} set voice of {ToPrettyString(uid):mask}: {component.VoiceName}");
|
||||
else
|
||||
_adminLogger.Add(LogType.Action, LogImpact.Medium, $"Voice of {ToPrettyString(uid):mask} set: {component.VoiceName}");
|
||||
|
||||
_popupSystem.PopupCursor(Loc.GetString("voice-mask-popup-success"), message.Session);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user