diff --git a/Content.Server/Flash/FlashSystem.cs b/Content.Server/Flash/FlashSystem.cs index e3df2eb3e0..a8ababd66b 100644 --- a/Content.Server/Flash/FlashSystem.cs +++ b/Content.Server/Flash/FlashSystem.cs @@ -195,12 +195,13 @@ namespace Content.Server.Flash private void OnInventoryFlashAttempt(EntityUid uid, InventoryComponent component, FlashAttemptEvent args) { - // Forward the event to a worn helmet, if one is equipped. - if (_inventorySystem.TryGetSlotEntity(uid, "head", out var maskSlotEntity, component)) - RaiseLocalEvent(maskSlotEntity.Value, args); - // Forward the event to the glasses, if any. - if(!args.Cancelled && _inventorySystem.TryGetSlotEntity(uid, "eyes", out var eyeSlotEntity, component)) - RaiseLocalEvent(eyeSlotEntity.Value, args); + foreach (var slot in new string[]{"head", "eyes", "mask"}) + { + if (args.Cancelled) + break; + if (_inventorySystem.TryGetSlotEntity(uid, slot, out var item, component)) + RaiseLocalEvent(item.Value, args); + } } private void OnFlashImmunityFlashAttempt(EntityUid uid, FlashImmunityComponent component, FlashAttemptEvent args) diff --git a/Resources/Prototypes/Entities/Clothing/Masks/masks.yml b/Resources/Prototypes/Entities/Clothing/Masks/masks.yml index 82efdc12b0..ef5d73db85 100644 --- a/Resources/Prototypes/Entities/Clothing/Masks/masks.yml +++ b/Resources/Prototypes/Entities/Clothing/Masks/masks.yml @@ -42,6 +42,7 @@ - type: IngestionBlocker - type: DiseaseProtection protection: 0.05 + - type: FlashImmunity - type: entity parent: ClothingMaskBase