Make Night Vision Goggles cause you to ignore Flash Protection (#4378)

* Using NVGs now make you VERY flash vulnerable

* Removed redundant After

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
William Lemon 2025-09-22 15:46:44 +10:00 committed by GitHub
parent 3f5c69a083
commit 3d0655ef8a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 26 additions and 1 deletions

View File

@ -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
{

View File

@ -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<NightVisionComponent, FlashAttemptEvent>(OnFlashAttempt);
}
private void OnFlashAttempt(Entity<NightVisionComponent> ent, ref FlashAttemptEvent args)
{
if (!ent.Comp.IsActive)
return;
args.Uncancel();
args.IgnoreProtection = true;
}
}