2021-03-08 12:10:48 +11:00
|
|
|
using Content.Shared.Alert;
|
2021-06-09 22:19:39 +02:00
|
|
|
using Content.Shared.Pulling.Components;
|
2021-10-04 16:10:54 +01:00
|
|
|
using Content.Shared.Pulling;
|
2021-03-08 12:10:48 +11:00
|
|
|
using JetBrains.Annotations;
|
2021-10-04 16:10:54 +01:00
|
|
|
using Robust.Shared.GameObjects;
|
2021-03-08 12:10:48 +11:00
|
|
|
using Robust.Shared.Serialization.Manager.Attributes;
|
|
|
|
|
|
|
|
|
|
namespace Content.Server.Alert.Click
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Stop pulling something
|
|
|
|
|
/// </summary>
|
|
|
|
|
[UsedImplicitly]
|
|
|
|
|
[DataDefinition]
|
|
|
|
|
public class StopBeingPulled : IAlertClick
|
|
|
|
|
{
|
|
|
|
|
public void AlertClicked(ClickAlertEventArgs args)
|
|
|
|
|
{
|
2021-10-04 16:10:54 +01:00
|
|
|
if (args.Player.TryGetComponent<SharedPullableComponent>(out var playerPullable))
|
|
|
|
|
{
|
2021-10-05 14:29:03 +11:00
|
|
|
EntitySystem.Get<SharedPullingSystem>().TryStopPull(playerPullable);
|
2021-10-04 16:10:54 +01:00
|
|
|
}
|
2021-03-08 12:10:48 +11:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|