mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-10 19:01:13 +03:00
* radiosystem is funny * review Co-authored-by: slarticodefast <slarticodefast@users.noreply.github.com> Co-authored-by: moonheart08 <moonheart08@users.noreply.github.com> * dont forget your tests * dont forget your loc * networking Co-authored-by: Tayrtahn <Tayrtahn@users.noreply.github.com> * dont return because its breaks * uh * review Co-authored-by: Pok245 <113675512+Pok27@users.noreply.github.com> * more predictions and cleanup * refactor: just me, being picky about whitespaces and commetns formatting --------- Co-authored-by: slarticodefast <slarticodefast@users.noreply.github.com> Co-authored-by: moonheart08 <moonheart08@users.noreply.github.com> Co-authored-by: Tayrtahn <Tayrtahn@users.noreply.github.com> Co-authored-by: Tayrtahn <tayrtahn@gmail.com> Co-authored-by: Pok245 <113675512+Pok27@users.noreply.github.com> Co-authored-by: Fildrance <fildrance@gmail.com>
39 lines
1.4 KiB
C#
39 lines
1.4 KiB
C#
using Content.Server.Power.EntitySystems;
|
|
using Content.Server.SurveillanceCamera;
|
|
using Content.Shared.Emp;
|
|
using Content.Shared.Radio;
|
|
|
|
namespace Content.Server.Emp;
|
|
|
|
public sealed class EmpSystem : SharedEmpSystem
|
|
{
|
|
public override void Initialize()
|
|
{
|
|
base.Initialize();
|
|
|
|
SubscribeLocalEvent<EmpDisabledComponent, RadioSendAttemptEvent>(OnRadioSendAttempt);
|
|
SubscribeLocalEvent<EmpDisabledComponent, RadioReceiveAttemptEvent>(OnRadioReceiveAttempt);
|
|
SubscribeLocalEvent<EmpDisabledComponent, ApcToggleMainBreakerAttemptEvent>(OnApcToggleMainBreaker);
|
|
SubscribeLocalEvent<EmpDisabledComponent, SurveillanceCameraSetActiveAttemptEvent>(OnCameraSetActive);
|
|
}
|
|
|
|
private void OnRadioSendAttempt(EntityUid uid, EmpDisabledComponent component, ref RadioSendAttemptEvent args)
|
|
{
|
|
args.Cancelled = true;
|
|
}
|
|
|
|
private void OnRadioReceiveAttempt(EntityUid uid, EmpDisabledComponent component, ref RadioReceiveAttemptEvent args)
|
|
{
|
|
args.Cancelled = true;
|
|
}
|
|
|
|
private void OnApcToggleMainBreaker(EntityUid uid, EmpDisabledComponent component, ref ApcToggleMainBreakerAttemptEvent args)
|
|
{
|
|
args.Cancelled = true;
|
|
}
|
|
|
|
private void OnCameraSetActive(EntityUid uid, EmpDisabledComponent component, ref SurveillanceCameraSetActiveAttemptEvent args)
|
|
{
|
|
args.Cancelled = true;
|
|
}
|
|
}
|