1
0

PortalSystem.cs 827 B

123456789101112131415161718192021
  1. using Content.Shared.Administration.Logs;
  2. using Content.Shared.Database;
  3. using Content.Shared.Ghost;
  4. using Content.Shared.Mind.Components;
  5. using Content.Shared.Teleportation.Systems;
  6. using Robust.Shared.Map;
  7. namespace Content.Server.Teleportation;
  8. public sealed class PortalSystem : SharedPortalSystem
  9. {
  10. [Dependency] private readonly ISharedAdminLogManager _adminLogger = default!;
  11. // TODO Move to shared
  12. protected override void LogTeleport(EntityUid portal, EntityUid subject, EntityCoordinates source,
  13. EntityCoordinates target)
  14. {
  15. if (HasComp<MindContainerComponent>(subject) && !HasComp<GhostComponent>(subject))
  16. _adminLogger.Add(LogType.Teleport, LogImpact.Low, $"{ToPrettyString(subject):player} teleported via {ToPrettyString(portal)} from {source} to {target}");
  17. }
  18. }