Files
crystall-punk-14/Content.Server/Destructible/Thresholds/Behaviors/GibBehavior.cs
DrSmugleaf 69969bbdc6 Remove IBody, IBodyPart, IMechanism and IMechanismBehavior (#4187)
* Remove IBody, IBodyPart, IMechanism and IMechanismBehavior interfaces

* Summary cleanup
2021-06-17 00:44:38 +10:00

23 lines
614 B
C#

using Content.Shared.Body.Components;
using JetBrains.Annotations;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization.Manager.Attributes;
namespace Content.Server.Destructible.Thresholds.Behaviors
{
[UsedImplicitly]
[DataDefinition]
public class GibBehavior : IThresholdBehavior
{
[DataField("recursive")] private bool _recursive = true;
public void Execute(IEntity owner, DestructibleSystem system)
{
if (owner.TryGetComponent(out SharedBodyComponent? body))
{
body.Gib(_recursive);
}
}
}
}