using Content.Server.Electrocution;
+using Content.Server.Emp;
using Content.Server.Lightning;
using Content.Server.Power.Components;
using Content.Shared.Anomaly.Components;
[Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly LightningSystem _lightning = default!;
[Dependency] private readonly ElectrocutionSystem _electrocution = default!;
+ [Dependency] private readonly EmpSystem _emp = default!;
[Dependency] private readonly EntityLookupSystem _lookup = default!;
/// <inheritdoc/>
{
_lightning.ShootLightning(uid, ent);
}
+
+ var empRange = component.MaxElectrocuteRange * 3;
+ _emp.EmpPulse(Transform(uid).MapPosition, empRange, component.EmpEnergyConsumption);
}
public override void Update(float frameTime)
/// </summary>
[DataField("nextSecond", customTypeSerializer: typeof(TimeOffsetSerializer)), ViewVariables(VVAccess.ReadWrite)]
public TimeSpan NextSecond = TimeSpan.Zero;
+
+ /// <summary>
+ /// Energy consumed from devices by the emp pulse upon going supercritical.
+ /// <summary>
+ [DataField("empEnergyConsumption"), ViewVariables(VVAccess.ReadWrite)]
+ public float EmpEnergyConsumption = 100000f;
}