Make fuel tanks explodey again (#4670)
* make fuel tanks explodey again * tanks now take damage from lit welders,
This commit is contained in:
@@ -1,11 +1,21 @@
|
||||
using Content.Server.Destructible.Thresholds.Behaviors;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
|
||||
namespace Content.Server.Explosion.Components
|
||||
{
|
||||
/// <summary>
|
||||
/// Specifies an explosion range should this entity be exploded.
|
||||
/// Specifies an explosion range should this entity be exploded.
|
||||
/// </summary>
|
||||
/// <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>
|
||||
[RegisterComponent]
|
||||
public class ExplosiveComponent : Component
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using Content.Server.Explosion.Components;
|
||||
using Content.Server.Flash;
|
||||
using Content.Server.Flash.Components;
|
||||
@@ -43,16 +43,9 @@ namespace Content.Server.Explosion
|
||||
SubscribeLocalEvent<SoundOnTriggerComponent, TriggerEvent>(HandleSoundTrigger);
|
||||
SubscribeLocalEvent<ExplodeOnTriggerComponent, TriggerEvent>(HandleExplodeTrigger);
|
||||
SubscribeLocalEvent<FlashOnTriggerComponent, TriggerEvent>(HandleFlashTrigger);
|
||||
|
||||
SubscribeLocalEvent<ExplosiveComponent, DestructionEventArgs>(HandleDestruction);
|
||||
}
|
||||
|
||||
#region Explosions
|
||||
private void HandleDestruction(EntityUid uid, ExplosiveComponent component, DestructionEventArgs args)
|
||||
{
|
||||
Explode(uid, component);
|
||||
}
|
||||
|
||||
private void HandleExplodeTrigger(EntityUid uid, ExplodeOnTriggerComponent component, TriggerEvent args)
|
||||
{
|
||||
if (!EntityManager.TryGetComponent(uid, out ExplosiveComponent? explosiveComponent)) return;
|
||||
|
||||
Reference in New Issue
Block a user