Files
OldThink/Content.Server/Construction/Completions/DestroyEntity.cs

23 lines
648 B
C#
Raw Normal View History

using Content.Shared.Construction;
using JetBrains.Annotations;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization.Manager.Attributes;
using System.Threading.Tasks;
2021-06-09 22:19:39 +02:00
using Content.Server.Destructible;
namespace Content.Server.Construction.Completions
{
[UsedImplicitly]
[DataDefinition]
public class DestroyEntity : IGraphAction
{
public async Task PerformAction(IEntity entity, IEntity? user)
{
if (entity.Deleted) return;
var destructibleSystem = EntitySystem.Get<DestructibleSystem>();
destructibleSystem.ActSystem.HandleDestruction(entity);
}
}
}