Updates a few mask body cover flags, allows breath masks to be adjusted in hand

This commit is contained in:
mwerezak
2015-04-24 22:00:51 -04:00
parent 5f21b091cd
commit e50043fe99
3 changed files with 26 additions and 17 deletions
+1 -1
View File
@@ -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',
+24 -16
View File
@@ -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."