2020-10-08 17:41:23 +02:00
|
|
|
|
#nullable enable
|
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
using Content.Shared.Construction;
|
|
|
|
|
|
using JetBrains.Annotations;
|
2021-02-11 01:13:03 -08:00
|
|
|
|
using Robust.Shared.GameObjects;
|
2020-10-08 17:41:23 +02:00
|
|
|
|
using Robust.Shared.Serialization;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Content.Server.Construction.Completions
|
|
|
|
|
|
{
|
|
|
|
|
|
[UsedImplicitly]
|
|
|
|
|
|
public class DeleteEntity : IGraphAction
|
|
|
|
|
|
{
|
2021-02-04 17:44:49 +01:00
|
|
|
|
void IExposeData.ExposeData(ObjectSerializer serializer)
|
2020-10-08 17:41:23 +02:00
|
|
|
|
{
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public async Task PerformAction(IEntity entity, IEntity? user)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (entity.Deleted) return;
|
|
|
|
|
|
|
|
|
|
|
|
entity.Delete();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|