Skip to content

Commit

Permalink
Added Comp EMP test
Browse files Browse the repository at this point in the history
  • Loading branch information
dvir001 committed Nov 5, 2023
1 parent 2715bba commit 68b5eaf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Content.Server/Power/EntitySystems/ApcSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
using Robust.Shared.Audio;
using Robust.Shared.Timing;
using Content.Shared.Tools.Components;
using Content.Shared.Emp;

namespace Content.Server.Power.EntitySystems;

Expand Down Expand Up @@ -204,6 +205,9 @@ private void OnEmpPulse(EntityUid uid, ApcComponent component, ref EmpPulseEvent

private void OnToolUseAttempt(EntityUid uid, ApcComponent component, ToolUseAttemptEvent args)
{
if (!HasComp<EmpDisabledComponent>(uid))
return;

// prevent reconstruct exploit to skip cooldowns
if (!component.MainBreakerEnabled)
args.Cancel();
Expand Down
3 changes: 3 additions & 0 deletions Content.Server/Shuttles/Systems/ShuttleConsoleSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,9 @@ private void OnEmpPulse(EntityUid uid, ShuttleConsoleComponent component, ref Em

private void OnToolUseAttempt(EntityUid uid, ShuttleConsoleComponent component, ToolUseAttemptEvent args)
{
if (!HasComp<EmpDisabledComponent>(uid))
return;

// prevent reconstruct exploit to skip cooldowns
if (!component.MainBreakerEnabled)
args.Cancel();
Expand Down

0 comments on commit 68b5eaf

Please sign in to comment.