diff --git a/Content.Server/_White/ExperimentalSyndicateTeleporter/ExperimentalSyndicateTeleporter.cs b/Content.Server/_White/ExperimentalSyndicateTeleporter/ExperimentalSyndicateTeleporter.cs index ba7d5b976b..8e161d9df3 100644 --- a/Content.Server/_White/ExperimentalSyndicateTeleporter/ExperimentalSyndicateTeleporter.cs +++ b/Content.Server/_White/ExperimentalSyndicateTeleporter/ExperimentalSyndicateTeleporter.cs @@ -11,6 +11,7 @@ using Content.Shared.Maps; using Content.Shared.Popups; using Content.Shared.Pulling.Components; using Robust.Server.Audio; +using Robust.Server.Containers; using Robust.Server.GameObjects; using Robust.Shared.Map; using Robust.Shared.Map.Components; @@ -28,6 +29,7 @@ public sealed class ExperimentalSyndicateTeleporter : EntitySystem [Dependency] private readonly IGameTiming _timing = default!; [Dependency] private readonly PopupSystem _popupSystem = default!; [Dependency] private readonly PullingSystem _pullingSystem = default!; + [Dependency] private readonly ContainerSystem _containerSystem = default!; [Dependency] private readonly IRobustRandom _random = default!; public override void Initialize() @@ -90,6 +92,12 @@ public sealed class ExperimentalSyndicateTeleporter : EntitySystem _pullingSystem.TryStopPull(subjectPulling); } + if (_containerSystem.IsEntityInContainer(args.User)) + { + if(!_containerSystem.TryRemoveFromContainer(args.User)) + return; + } + var oldCoords = xform.Coordinates; var random = _random.Next(component.MinTeleportRange, component.MaxTeleportRange);