Files
OldThink/Content.Server/Teleportation/PortalSystem.cs

21 lines
762 B
C#
Raw Normal View History

2023-02-16 18:27:43 -06:00
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)
{
2023-06-18 11:33:19 -07:00
if (HasComp<MindContainerComponent>(subject))
2023-02-16 18:27:43 -06:00
_adminLogger.Add(LogType.Teleport, LogImpact.Low, $"{ToPrettyString(subject):player} teleported via {ToPrettyString(portal)} from {source} to {target}");
}
}