Files
tbd-station-14/Content.Server/Teleportation/PortalSystem.cs
2023-02-17 01:27:43 +01:00

21 lines
753 B
C#

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}");
}
}