Add admin logs for anchoring/unanchoring (#7274)
This commit is contained in:
@@ -1,19 +1,19 @@
|
|||||||
using System;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using Content.Server.Administration.Logs;
|
||||||
using Content.Server.Construction.Components;
|
using Content.Server.Construction.Components;
|
||||||
using Content.Server.Coordinates.Helpers;
|
using Content.Server.Coordinates.Helpers;
|
||||||
using Content.Server.Pulling;
|
using Content.Server.Pulling;
|
||||||
using Content.Server.Tools;
|
using Content.Server.Tools;
|
||||||
using Content.Server.Tools.Components;
|
using Content.Server.Tools.Components;
|
||||||
|
using Content.Shared.Database;
|
||||||
using Content.Shared.Interaction;
|
using Content.Shared.Interaction;
|
||||||
using Content.Shared.Pulling.Components;
|
using Content.Shared.Pulling.Components;
|
||||||
using Robust.Shared.GameObjects;
|
|
||||||
using Robust.Shared.IoC;
|
|
||||||
|
|
||||||
namespace Content.Server.Construction
|
namespace Content.Server.Construction
|
||||||
{
|
{
|
||||||
public sealed class AnchorableSystem : EntitySystem
|
public sealed class AnchorableSystem : EntitySystem
|
||||||
{
|
{
|
||||||
|
[Dependency] private readonly AdminLogSystem _adminLogs = default!;
|
||||||
[Dependency] private readonly ToolSystem _toolSystem = default!;
|
[Dependency] private readonly ToolSystem _toolSystem = default!;
|
||||||
[Dependency] private readonly PullingSystem _pullingSystem = default!;
|
[Dependency] private readonly PullingSystem _pullingSystem = default!;
|
||||||
|
|
||||||
@@ -106,6 +106,12 @@ namespace Content.Server.Construction
|
|||||||
|
|
||||||
RaiseLocalEvent(uid, new UserAnchoredEvent(userUid, usingUid), false);
|
RaiseLocalEvent(uid, new UserAnchoredEvent(userUid, usingUid), false);
|
||||||
|
|
||||||
|
_adminLogs.Add(
|
||||||
|
LogType.Action,
|
||||||
|
LogImpact.Low,
|
||||||
|
$"{EntityManager.ToPrettyString(userUid):user} anchored {EntityManager.ToPrettyString(uid):anchored} using {EntityManager.ToPrettyString(usingUid):using}"
|
||||||
|
);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -135,6 +141,12 @@ namespace Content.Server.Construction
|
|||||||
|
|
||||||
RaiseLocalEvent(uid, new UserUnanchoredEvent(userUid, usingUid), false);
|
RaiseLocalEvent(uid, new UserUnanchoredEvent(userUid, usingUid), false);
|
||||||
|
|
||||||
|
_adminLogs.Add(
|
||||||
|
LogType.Action,
|
||||||
|
LogImpact.Low,
|
||||||
|
$"{EntityManager.ToPrettyString(userUid):user} unanchored {EntityManager.ToPrettyString(uid):anchored} using {EntityManager.ToPrettyString(usingUid):using}"
|
||||||
|
);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -67,6 +67,8 @@ public enum LogType
|
|||||||
RCD = 63,
|
RCD = 63,
|
||||||
Construction = 64,
|
Construction = 64,
|
||||||
Trigger = 65,
|
Trigger = 65,
|
||||||
|
Anchor = 66,
|
||||||
|
Unanchor = 67,
|
||||||
// haha so funny
|
// haha so funny
|
||||||
Emag = 69,
|
Emag = 69,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user