2021-10-02 19:42:46 +10:00
|
|
|
using Content.Server.Explosion.Components;
|
|
|
|
|
using JetBrains.Annotations;
|
|
|
|
|
using Robust.Shared.GameObjects;
|
|
|
|
|
using Robust.Shared.Serialization.Manager.Attributes;
|
|
|
|
|
|
|
|
|
|
namespace Content.Server.Destructible.Thresholds.Behaviors
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// This behavior will trigger entities with <see cref="ExplosiveComponent"/> to go boom.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[UsedImplicitly]
|
|
|
|
|
[DataDefinition]
|
2022-02-16 00:23:23 -07:00
|
|
|
public sealed class ExplodeBehavior : IThresholdBehavior
|
2021-10-02 19:42:46 +10:00
|
|
|
{
|
2021-11-09 21:24:35 +01:00
|
|
|
public void Execute(EntityUid owner, DestructibleSystem system)
|
2021-10-02 19:42:46 +10:00
|
|
|
{
|
2021-11-09 21:24:35 +01:00
|
|
|
system.ExplosionSystem.SpawnExplosion(owner);
|
2021-10-02 19:42:46 +10:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|