Add teleporter logs (#13375)

This commit is contained in:
Chief-Engineer
2023-02-16 18:27:43 -06:00
committed by GitHub
parent d44730a267
commit 061d4de1e4
6 changed files with 52 additions and 2 deletions

View File

@@ -0,0 +1,20 @@
using Content.Server.Mind.Components;
using Content.Shared.Administration.Logs;
using Content.Shared.Database;
using Content.Shared.Teleportation.Systems;
using Robust.Shared.Map;
namespace Content.Server.Teleportation;
public sealed class PortalSystem : SharedPortalSystem
{
[Dependency] private readonly ISharedAdminLogManager _adminLogger = default!;
// TODO Move to shared
protected override void LogTeleport(EntityUid portal, EntityUid subject, EntityCoordinates source,
EntityCoordinates target)
{
if (HasComp<MindComponent>(subject))
_adminLogger.Add(LogType.Teleport, LogImpact.Low, $"{ToPrettyString(subject):player} teleported via {ToPrettyString(portal)} from {source} to {target}");
}
}