[NO GBP] Fixes pressure-proof clothing not preventing plasmamen self-combustion (#87598)

## About The Pull Request

Closes #87515

## Changelog
🆑
fix: Fixed pressure-proof clothing not preventing plasmamen
self-combustion
/🆑
This commit is contained in:
SmArtKar
2024-11-01 17:54:05 +01:00
committed by GitHub
parent 37f23107b7
commit 3d8ffe973d
4 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -33,7 +33,7 @@
if (HAS_TRAIT(owner, TRAIT_STASIS))
return
if (owner.is_atmos_sealed(additional_flags = PLASMAMAN_PREVENT_IGNITION, check_hands = TRUE, ignore_chest_pressureprot = TRUE))
if (owner.is_atmos_sealed(additional_flags = PLASMAMAN_PREVENT_IGNITION, check_hands = TRUE, alt_flags = TRUE))
if (!owner.on_fire)
REMOVE_TRAIT(owner, TRAIT_IGNORE_FIRE_PROTECTION, REF(parent))
return
@@ -41,7 +41,7 @@
// This is weird but basically we're calling this proc once the cooldown ends in case our wearer gets set on fire again during said cooldown
// This is why we're ignoring source and instead checking by loc
var/mob/living/carbon/human/owner = loc
if (!owner.on_fire || !owner.is_atmos_sealed(additional_flags = PLASMAMAN_PREVENT_IGNITION, check_hands = TRUE, ignore_chest_pressureprot = TRUE))
if (!owner.on_fire || !owner.is_atmos_sealed(additional_flags = PLASMAMAN_PREVENT_IGNITION, check_hands = TRUE, alt_flags = TRUE))
return
if (!extinguishes_left || !COOLDOWN_FINISHED(src, extinguish_timer))
@@ -43,7 +43,7 @@
// This is weird but basically we're calling this proc once the cooldown ends in case our wearer gets set on fire again during said cooldown
// This is why we're ignoring source and instead checking by loc
var/mob/living/carbon/human/owner = loc
if (!owner.on_fire || !owner.is_atmos_sealed(additional_flags = PLASMAMAN_PREVENT_IGNITION, check_hands = TRUE, ignore_chest_pressureprot = TRUE))
if (!owner.on_fire || !owner.is_atmos_sealed(additional_flags = PLASMAMAN_PREVENT_IGNITION, check_hands = TRUE, alt_flags = TRUE))
return
if (!extinguishes_left || !COOLDOWN_FINISHED(src, extinguish_timer))
@@ -163,7 +163,7 @@
// This is weird but basically we're calling this proc once the cooldown ends in case our wearer gets set on fire again during said cooldown
// This is why we're ignoring source and instead checking by loc
var/mob/living/carbon/human/owner = loc
if (!owner.on_fire || !owner.is_atmos_sealed(additional_flags = PLASMAMAN_PREVENT_IGNITION, check_hands = TRUE, ignore_chest_pressureprot = TRUE))
if (!owner.on_fire || !owner.is_atmos_sealed(additional_flags = PLASMAMAN_PREVENT_IGNITION, check_hands = TRUE, alt_flags = TRUE))
return
if (!extinguishes_left || !COOLDOWN_FINISHED(src, extinguish_timer))
@@ -1053,7 +1053,7 @@
add_traits(list(TRAIT_NO_DNA_SCRAMBLE, TRAIT_BADDNA, TRAIT_BORN_MONKEY), SPECIES_TRAIT)
/mob/living/carbon/human/proc/is_atmos_sealed(additional_flags = null, check_hands = FALSE, ignore_chest_pressureprot = FALSE)
/mob/living/carbon/human/proc/is_atmos_sealed(additional_flags = null, check_hands = FALSE, alt_flags = FALSE)
var/chest_covered = FALSE
var/head_covered = FALSE
var/hands_covered = FALSE
@@ -1061,11 +1061,11 @@
// We don't really have space-proof gloves, so even if we're checking them we ignore the flags
if ((equipped.body_parts_covered & HANDS) && num_hands >= default_num_hands)
hands_covered = TRUE
if (!isnull(additional_flags) && !(equipped.clothing_flags & additional_flags))
if (!alt_flags && !isnull(additional_flags) && !(equipped.clothing_flags & additional_flags))
continue
if ((ignore_chest_pressureprot || (equipped.clothing_flags & STOPSPRESSUREDAMAGE)) && (equipped.body_parts_covered & CHEST))
if ((equipped.clothing_flags & (STOPSPRESSUREDAMAGE | (alt_flags ? additional_flags : NONE))) && (equipped.body_parts_covered & CHEST))
chest_covered = TRUE
if ((equipped.clothing_flags & STOPSPRESSUREDAMAGE) && (equipped.body_parts_covered & HEAD))
if ((equipped.clothing_flags & (STOPSPRESSUREDAMAGE | (alt_flags ? additional_flags : NONE))) && (equipped.body_parts_covered & HEAD))
head_covered = TRUE
if (!chest_covered)
return FALSE