Seperate EMAG into EMAG and Authentication Disruptor (#34337)

This commit is contained in:
ScarKy0
2025-02-14 16:09:47 +00:00
committed by deltanedas
parent 800de3d4b2
commit fd77e8d86b
67 changed files with 530 additions and 274 deletions
@@ -10,6 +10,7 @@ namespace Content.Shared.Pinpointer;
public abstract class SharedPinpointerSystem : EntitySystem
{
[Dependency] private readonly ISharedAdminLogManager _adminLogger = default!;
[Dependency] private readonly EmagSystem _emag = default!;
public override void Initialize()
{
@@ -137,6 +138,15 @@ public abstract class SharedPinpointerSystem : EntitySystem
private void OnEmagged(EntityUid uid, PinpointerComponent component, ref GotEmaggedEvent args)
{
if (!_emag.CompareFlag(args.Type, EmagType.Interaction))
return;
if (_emag.CheckFlag(uid, EmagType.Interaction))
return;
if (component.CanRetarget)
return;
args.Handled = true;
component.CanRetarget = true;
}