using Content.Shared.ActionBlocker; using Content.Shared.Alert; using Content.Shared.Pulling.Components; using Content.Shared.Pulling; using JetBrains.Annotations; using Robust.Shared.GameObjects; using Robust.Shared.IoC; using Robust.Shared.Serialization.Manager.Attributes; namespace Content.Server.Alert.Click { /// /// Stop pulling something /// [UsedImplicitly] [DataDefinition] public class StopBeingPulled : IAlertClick { public void AlertClicked(ClickAlertEventArgs args) { if (!EntitySystem.Get().CanInteract(args.Player)) return; if (IoCManager.Resolve().TryGetComponent(args.Player, out var playerPullable)) { EntitySystem.Get().TryStopPull(playerPullable); } } } }