2023-08-30 21:46:11 -07:00
using Content.Shared.Administration.Logs ;
2023-02-16 18:27:43 -06:00
using Content.Shared.Database ;
2023-08-25 18:50:46 +10:00
using Content.Shared.Ghost ;
2023-08-30 21:46:11 -07:00
using Content.Shared.Mind.Components ;
2023-02-16 18:27:43 -06:00
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-08-15 13:56:14 -07:00
if ( HasComp < MindContainerComponent > ( subject ) & & ! HasComp < GhostComponent > ( 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}" ) ;
}
}