diff --git a/Content.Server/Ghost/GhostSystem.cs b/Content.Server/Ghost/GhostSystem.cs index 2f4269a05d00..77cf813b56b4 100644 --- a/Content.Server/Ghost/GhostSystem.cs +++ b/Content.Server/Ghost/GhostSystem.cs @@ -1,3 +1,5 @@ +using System.Linq; +using System.Numerics; using Content.Server.Administration.Logs; using Content.Server.Chat.Managers; using Content.Server.GameTicking; @@ -32,14 +34,13 @@ using Robust.Shared.Player; using Robust.Shared.Prototypes; using Robust.Shared.Timing; -using System.Linq; -using System.Numerics; namespace Content.Server.Ghost { public sealed class GhostSystem : SharedGhostSystem { [Dependency] private readonly SharedActionsSystem _actions = default!; + [Dependency] private readonly IAdminLogManager _adminLog = default!; [Dependency] private readonly SharedEyeSystem _eye = default!; [Dependency] private readonly FollowerSystem _followerSystem = default!; [Dependency] private readonly IGameTiming _gameTiming = default!; @@ -323,6 +324,8 @@ private void OnGhostnadoRequest(GhostnadoRequestEvent msg, EntitySessionEventArg private void WarpTo(EntityUid uid, EntityUid target) { + _adminLog.Add(LogType.GhostWarp, $"{ToPrettyString(uid)} ghost warped to {ToPrettyString(target)}"); + if ((TryComp(target, out WarpPointComponent? warp) && warp.Follow) || HasComp(target)) { _followerSystem.StartFollowingEntity(uid, target); diff --git a/Content.Shared.Database/LogType.cs b/Content.Shared.Database/LogType.cs index 5fedf3c7d4b9..91887addeabb 100644 --- a/Content.Shared.Database/LogType.cs +++ b/Content.Shared.Database/LogType.cs @@ -115,10 +115,14 @@ public enum LogType /// Storage & entity-storage related interactions /// Storage = 93, - + /// /// A player got hit by an explosion and was dealt damage. /// ExplosionHit = 94, + /// + /// A ghost warped to an entity through the ghost warp menu. + /// + GhostWarp = 95, }