mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 10:21:18 +03:00
* IoC source gen compatibility Can be merged before or after https://github.com/space-wizards/RobustToolbox/pull/6549 doesn't really matter. * Missed a spot
30 lines
907 B
C#
30 lines
907 B
C#
using Content.Server.Explosion.EntitySystems;
|
|
using Content.Server.Anomaly.Components;
|
|
using Content.Shared.Anomaly.Components;
|
|
|
|
namespace Content.Server.Anomaly.Effects;
|
|
|
|
/// <summary>
|
|
/// This handles <see cref="ExplosionAnomalyComponent"/>
|
|
/// </summary>
|
|
public sealed partial class ExplosionAnomalySystem : EntitySystem
|
|
{
|
|
[Dependency] private ExplosionSystem _boom = default!;
|
|
|
|
public override void Initialize()
|
|
{
|
|
base.Initialize();
|
|
SubscribeLocalEvent<ExplosionAnomalyComponent, AnomalySupercriticalEvent>(OnSupercritical);
|
|
}
|
|
|
|
private void OnSupercritical(EntityUid uid, ExplosionAnomalyComponent component, ref AnomalySupercriticalEvent args)
|
|
{
|
|
_boom.QueueExplosion(
|
|
uid,
|
|
component.ExplosionPrototype,
|
|
component.TotalIntensity,
|
|
component.Dropoff,
|
|
component.MaxTileIntensity
|
|
);
|
|
}
|
|
}
|