diff --git a/Content.Server/Flash/FlashSystem.cs b/Content.Server/Flash/FlashSystem.cs index 200647aaa9..460f2f14f0 100644 --- a/Content.Server/Flash/FlashSystem.cs +++ b/Content.Server/Flash/FlashSystem.cs @@ -236,7 +236,7 @@ namespace Content.Server.Flash public readonly EntityUid Target; public readonly EntityUid? User; public readonly EntityUid? Used; - public readonly bool IgnoreProtection; //DeltaV: allow flashing to ignore flash protection + public bool IgnoreProtection; //DeltaV: allow flashing to ignore flash protection public FlashAttemptEvent(EntityUid target, EntityUid? user, EntityUid? used, bool ignoreProtection) //DeltaV: allow flashing to ignore flash protection { diff --git a/Content.Server/_DV/Overlays/NightVisionSystem.cs b/Content.Server/_DV/Overlays/NightVisionSystem.cs new file mode 100644 index 0000000000..dfc41def34 --- /dev/null +++ b/Content.Server/_DV/Overlays/NightVisionSystem.cs @@ -0,0 +1,25 @@ +using Content.Server.Flash; +using Content.Server.Flash.Components; +using Content.Shared._Goobstation.Overlays; +using Content.Shared.Inventory; + +namespace Content.Server._DV.Overlays; + +public sealed partial class NightVisionSystem : EntitySystem +{ + public override void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent(OnFlashAttempt); + } + + private void OnFlashAttempt(Entity ent, ref FlashAttemptEvent args) + { + if (!ent.Comp.IsActive) + return; + + args.Uncancel(); + args.IgnoreProtection = true; + } +}