From 3d8ffe973d8066b84f5e641d03dda5cd1cda5fd9 Mon Sep 17 00:00:00 2001 From: SmArtKar <44720187+SmArtKar@users.noreply.github.com> Date: Fri, 1 Nov 2024 17:54:05 +0100 Subject: [PATCH] [NO GBP] Fixes pressure-proof clothing not preventing plasmamen self-combustion (#87598) ## About The Pull Request Closes #87515 ## Changelog :cl: fix: Fixed pressure-proof clothing not preventing plasmamen self-combustion /:cl: --- code/datums/components/self_ignition.dm | 2 +- code/modules/clothing/spacesuits/plasmamen.dm | 2 +- .../clothing/under/jobs/Plasmaman/civilian_service.dm | 4 ++-- code/modules/mob/living/carbon/human/human.dm | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/code/datums/components/self_ignition.dm b/code/datums/components/self_ignition.dm index db03b62d172..a1635bcf715 100644 --- a/code/datums/components/self_ignition.dm +++ b/code/datums/components/self_ignition.dm @@ -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 diff --git a/code/modules/clothing/spacesuits/plasmamen.dm b/code/modules/clothing/spacesuits/plasmamen.dm index 616ff463d8d..0a672d5566a 100644 --- a/code/modules/clothing/spacesuits/plasmamen.dm +++ b/code/modules/clothing/spacesuits/plasmamen.dm @@ -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)) diff --git a/code/modules/clothing/under/jobs/Plasmaman/civilian_service.dm b/code/modules/clothing/under/jobs/Plasmaman/civilian_service.dm index 1d2166653ae..c25f6f77929 100644 --- a/code/modules/clothing/under/jobs/Plasmaman/civilian_service.dm +++ b/code/modules/clothing/under/jobs/Plasmaman/civilian_service.dm @@ -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)) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index ba3ecbf83cf..9cd25b44604 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -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