2020-12-13 14:28:20 -08:00
|
|
|
|
using Content.Shared.Alert;
|
|
|
|
|
|
using Content.Shared.GameObjects.Components.Pulling;
|
|
|
|
|
|
using Content.Shared.GameObjects.EntitySystems;
|
|
|
|
|
|
using JetBrains.Annotations;
|
2021-02-11 01:13:03 -08:00
|
|
|
|
using Robust.Shared.GameObjects;
|
2021-02-04 17:44:49 +01:00
|
|
|
|
using Robust.Shared.Serialization;
|
2020-12-13 14:28:20 -08:00
|
|
|
|
|
|
|
|
|
|
namespace Content.Server.Alert.Click
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Stop pulling something
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[UsedImplicitly]
|
|
|
|
|
|
public class StopPulling : IAlertClick
|
|
|
|
|
|
{
|
2021-02-04 17:44:49 +01:00
|
|
|
|
void IExposeData.ExposeData(ObjectSerializer serializer) { }
|
2020-12-13 14:28:20 -08:00
|
|
|
|
|
|
|
|
|
|
public void AlertClicked(ClickAlertEventArgs args)
|
|
|
|
|
|
{
|
|
|
|
|
|
EntitySystem
|
|
|
|
|
|
.Get<SharedPullingSystem>()
|
|
|
|
|
|
.GetPulled(args.Player)?
|
|
|
|
|
|
.GetComponentOrNull<SharedPullableComponent>()?
|
|
|
|
|
|
.TryStopPull();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|