mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 20:48:56 +01:00
[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:
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user