2021-10-02 19:42:46 +10:00
|
|
|
using Content.Server.Destructible.Thresholds.Behaviors;
|
2019-06-07 16:15:20 +05:00
|
|
|
using Robust.Shared.GameObjects;
|
2021-03-05 01:08:38 +01:00
|
|
|
using Robust.Shared.Serialization.Manager.Attributes;
|
2019-06-07 16:15:20 +05:00
|
|
|
|
2021-06-09 22:19:39 +02:00
|
|
|
namespace Content.Server.Explosion.Components
|
2019-06-07 16:15:20 +05:00
|
|
|
{
|
2021-07-25 20:09:08 +10:00
|
|
|
/// <summary>
|
2021-10-02 19:42:46 +10:00
|
|
|
/// Specifies an explosion range should this entity be exploded.
|
2021-07-25 20:09:08 +10:00
|
|
|
/// </summary>
|
2021-10-02 19:42:46 +10:00
|
|
|
/// <remarks>
|
|
|
|
|
/// Explosions can be caused by:
|
|
|
|
|
/// <list type="bullet">
|
|
|
|
|
/// <item>Reaching a damage threshold that causes a <see cref="ExplodeBehavior"/></item>
|
|
|
|
|
/// <item>Being triggered via the <see cref="ExplodeOnTriggerComponent"/></item>
|
|
|
|
|
/// <item>Manually by some other system via functions in <see cref="ExplosionHelper"/> (for example, chemistry's
|
|
|
|
|
/// <see cref="ExplosionReactionEffect"/>).</item>
|
|
|
|
|
/// </list>
|
|
|
|
|
/// </remarks>
|
2019-07-31 15:02:36 +02:00
|
|
|
[RegisterComponent]
|
2021-07-25 20:09:08 +10:00
|
|
|
public class ExplosiveComponent : Component
|
2019-06-07 16:15:20 +05:00
|
|
|
{
|
|
|
|
|
public override string Name => "Explosive";
|
2019-12-15 14:12:23 +01:00
|
|
|
|
2021-03-05 01:08:38 +01:00
|
|
|
[DataField("devastationRange")]
|
|
|
|
|
public int DevastationRange;
|
|
|
|
|
[DataField("heavyImpactRange")]
|
|
|
|
|
public int HeavyImpactRange;
|
|
|
|
|
[DataField("lightImpactRange")]
|
|
|
|
|
public int LightImpactRange;
|
|
|
|
|
[DataField("flashRange")]
|
|
|
|
|
public int FlashRange;
|
2019-06-07 16:15:20 +05:00
|
|
|
|
2021-07-25 20:09:08 +10:00
|
|
|
public bool Exploding { get; set; } = false;
|
2019-06-07 16:15:20 +05:00
|
|
|
}
|
|
|
|
|
}
|