Emp more effects (#14550)
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
This commit is contained in:
@@ -69,6 +69,15 @@ namespace Content.Server.Power.EntitySystems
|
||||
}
|
||||
private void OnToggleMainBreaker(EntityUid uid, ApcComponent component, ApcToggleMainBreakerMessage args)
|
||||
{
|
||||
var attemptEv = new ApcToggleMainBreakerAttemptEvent();
|
||||
RaiseLocalEvent(uid, ref attemptEv);
|
||||
if (attemptEv.Cancelled)
|
||||
{
|
||||
_popup.PopupCursor(Loc.GetString("apc-component-on-toggle-cancel"),
|
||||
args.Session, PopupType.Medium);
|
||||
return;
|
||||
}
|
||||
|
||||
TryComp<AccessReaderComponent>(uid, out var access);
|
||||
if (args.Session.AttachedEntity == null)
|
||||
return;
|
||||
@@ -183,8 +192,12 @@ namespace Content.Server.Power.EntitySystems
|
||||
if (component.MainBreakerEnabled)
|
||||
{
|
||||
args.Affected = true;
|
||||
args.Disabled = true;
|
||||
ApcToggleBreaker(uid, component);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[ByRefEvent]
|
||||
public record struct ApcToggleMainBreakerAttemptEvent(bool Cancelled);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user