diff --git a/code/modules/clothing/masks/boxing.dm b/code/modules/clothing/masks/boxing.dm index dfa7e120f74..572baf18ce9 100644 --- a/code/modules/clothing/masks/boxing.dm +++ b/code/modules/clothing/masks/boxing.dm @@ -5,7 +5,7 @@ item_state = "balaclava" flags = BLOCKHAIR flags_inv = HIDEFACE - body_parts_covered = FACE + body_parts_covered = FACE|HEAD w_class = 2 sprite_sheets = list( "Tajara" = 'icons/mob/species/tajaran/helmet.dmi', diff --git a/code/modules/clothing/masks/breath.dm b/code/modules/clothing/masks/breath.dm index a2ed54b1d49..4fdaae19f36 100644 --- a/code/modules/clothing/masks/breath.dm +++ b/code/modules/clothing/masks/breath.dm @@ -15,26 +15,34 @@ var/hanging = 0 - verb/toggle() +/obj/item/clothing/mask/breath/proc/adjust_mask(mob/user) + if(user.canmove && !user.stat) + if(!src.hanging) + src.hanging = !src.hanging + gas_transfer_coefficient = 1 //gas is now escaping to the turf and vice versa + flags &= ~(MASKCOVERSMOUTH | AIRTIGHT) + body_parts_covered = 0 + icon_state = "breathdown" + user << "Your mask is now hanging on your neck." + + else + src.hanging = !src.hanging + gas_transfer_coefficient = initial(gas_transfer_coefficient) + flags |= MASKCOVERSMOUTH | AIRTIGHT + body_parts_covered = initial(body_parts_covered) + icon_state = "breath" + user << "You pull the mask up to cover your face." + update_clothing_icon() + +/obj/item/clothing/mask/breath/attack_self(mob/user) + adjust_mask(user) + +/obj/item/clothing/mask/breath/verb/toggle() set category = "Object" set name = "Adjust mask" set src in usr - if(usr.canmove && !usr.stat && !usr.restrained()) - if(!src.hanging) - src.hanging = !src.hanging - gas_transfer_coefficient = 1 //gas is now escaping to the turf and vice versa - flags &= ~(MASKCOVERSMOUTH | AIRTIGHT) - icon_state = "breathdown" - usr << "Your mask is now hanging on your neck." - - else - src.hanging = !src.hanging - gas_transfer_coefficient = 0.10 - flags |= MASKCOVERSMOUTH | AIRTIGHT - icon_state = "breath" - usr << "You pull the mask up to cover your face." - update_clothing_icon() + adjust_mask(usr) /obj/item/clothing/mask/breath/medical desc = "A close-fitting sterile mask that can be connected to an air supply." diff --git a/code/setup.dm b/code/setup.dm index 38836d54d52..6ddeb129185 100644 --- a/code/setup.dm +++ b/code/setup.dm @@ -192,6 +192,7 @@ #define NOBLOODY 512 // Used for items if they don't want to get a blood overlay. #define NODELAY 8192 // 1 second attack-by delay skipped (Can be used once every 0.2s). Most objects have a 1s attack-by delay, which doesn't require a flag. +//Use these flags to indicate if an item obscures the specified slots from view, whereas body_parts_covered seems to be used to indicate what body parts the item protects. #define GLASSESCOVERSEYES 256 #define MASKCOVERSEYES 256 // Get rid of some of the other retardation in these flags. #define HEADCOVERSEYES 256 // Feel free to reallocate these numbers for other purposes.