[MIRROR] Makes pressure proofing check for clothing coverage (#3191)

* Makes pressure proofing check for clothing coverage (#56612)

* Makes pressure proofing check for clothing coverage

Co-authored-by: Urumasi <Urumasi@email.cz>
This commit is contained in:
SkyratBot
2021-02-08 23:42:07 +00:00
committed by GitHub
co-authored by Urumasi
parent 3c053caf25
commit 7e0f1031e7
+10 -5
View File
@@ -55,11 +55,16 @@
/mob/living/carbon/human/calculate_affecting_pressure(pressure)
if (wear_suit && head && istype(wear_suit, /obj/item/clothing) && istype(head, /obj/item/clothing))
var/obj/item/clothing/CS = wear_suit
var/obj/item/clothing/CH = head
if (CS.clothing_flags & CH.clothing_flags & STOPSPRESSUREDAMAGE)
return ONE_ATMOSPHERE
var/chest_covered = FALSE
var/head_covered = FALSE
for(var/obj/item/clothing/equipped in get_equipped_items())
if((equipped.body_parts_covered & CHEST) && (equipped.clothing_flags & STOPSPRESSUREDAMAGE))
chest_covered = TRUE
if((equipped.body_parts_covered & HEAD) && (equipped.clothing_flags & STOPSPRESSUREDAMAGE))
head_covered = TRUE
if(chest_covered && head_covered)
return ONE_ATMOSPHERE
return pressure