Ice anomaly (#15925)

Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
This commit is contained in:
ThunderBear2006
2023-05-03 14:37:33 -04:00
committed by GitHub
parent d52184a561
commit 8951b9f26a
18 changed files with 472 additions and 65 deletions

View File

@@ -0,0 +1,30 @@
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 class ExplosionAnomalySystem : EntitySystem
{
[Dependency] private readonly 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
);
}
}