From d08d98979f1b27bd548cecbb8a2da4a18ff29a5d Mon Sep 17 00:00:00 2001 From: Ediblebomb <95509996+Ediblebomb@users.noreply.github.com> Date: Fri, 17 May 2024 19:38:23 -0500 Subject: [PATCH] M5 Gasmask now functions --- code/game/objects/items/props/helmetgarb.dm | 24 +++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/code/game/objects/items/props/helmetgarb.dm b/code/game/objects/items/props/helmetgarb.dm index 35558bf019..ce63aaa13a 100644 --- a/code/game/objects/items/props/helmetgarb.dm +++ b/code/game/objects/items/props/helmetgarb.dm @@ -496,6 +496,30 @@ desc = "The USCM had its funding pulled for these when it became apparent that not every deployed enlisted was wearing a helmet 24/7; much to the bafflement of UA High Command." icon_state = "helmet_gasmask" +/obj/item/prop/helmetgarb/helmet_gasmask/on_enter_storage(obj/item/storage/internal/helmet_internal_inventory) + ..() + if(!istype(helmet_internal_inventory)) + return + var/obj/item/clothing/head/helmet/helmet_item = helmet_internal_inventory.master_object + + if(!istype(helmet_item)) + return + + helmet_item.flags_inventory |= BLOCKGASEFFECT + helmet_item.flags_inv_hide |= HIDEFACE + +/obj/item/prop/helmetgarb/helmet_gasmask/on_exit_storage(obj/item/storage/internal/helmet_internal_inventory) + ..() + if(!istype(helmet_internal_inventory)) + return + var/obj/item/clothing/head/helmet/helmet_item = helmet_internal_inventory.master_object + + if(!istype(helmet_item)) + return + + helmet_item.flags_inventory &= ~(BLOCKGASEFFECT) + helmet_item.flags_inv_hide &= ~(HIDEFACE) + /obj/item/prop/helmetgarb/trimmed_wire name = "trimmed barbed wire" desc = "It is a length of barbed wire that's had most of the sharp points filed down so that it is safe to handle."