Fix masks with flash, eye, and damage protection working while being pulled down (#40331)
Fix
This commit is contained in:
@@ -22,6 +22,7 @@ using Robust.Shared.Timing;
|
||||
using System.Linq;
|
||||
using Content.Shared.Movement.Systems;
|
||||
using Content.Shared.Random.Helpers;
|
||||
using Content.Shared.Clothing.Components;
|
||||
|
||||
namespace Content.Shared.Flash;
|
||||
|
||||
@@ -258,6 +259,9 @@ public abstract class SharedFlashSystem : EntitySystem
|
||||
|
||||
private void OnFlashImmunityFlashAttempt(Entity<FlashImmunityComponent> ent, ref FlashAttemptEvent args)
|
||||
{
|
||||
if (TryComp<MaskComponent>(ent, out var mask) && mask.IsToggled)
|
||||
return;
|
||||
|
||||
if (ent.Comp.Enabled)
|
||||
args.Cancelled = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user