diff --git a/code/modules/mob/living/carbon/breathe.dm b/code/modules/mob/living/carbon/breathe.dm index 461a655fb30..82d1068caea 100644 --- a/code/modules/mob/living/carbon/breathe.dm +++ b/code/modules/mob/living/carbon/breathe.dm @@ -5,13 +5,16 @@ if(SSair.times_fired%4==2 || failed_last_breath || (health < config.health_threshold_crit)) //First, resolve location and get a breath breathe() -/mob/living/carbon/proc/inhale(var/datum/reagents/from, var/datum/reagents/target, var/amount = 1, var/multiplier = 1, var/copy = 0) +/mob/living/carbon/proc/inhale(var/datum/reagents/from, var/datum/reagents/target, var/amount = 1, var/multiplier = 1, var/copy = 0, var/bypass_mask = FALSE) if(species && (species.flags & NO_BREATHE)) //Check for species return 0 - if (contents.Find(internal) && wear_mask && (wear_mask.item_flags & AIRTIGHT)) //Check for internals - return 0 + if(!bypass_mask) + if(wear_mask && wear_mask.item_flags & BLOCK_GAS_SMOKE_EFFECT) //Check if the gasmask blocks an effect + return 0 + if (internals && internals.icon_state == "internal1") //Check for internals + return 0 return from.trans_to_holder(target,amount,multiplier,copy) //complete transfer diff --git a/code/modules/reagents/Chemistry-Holder.dm b/code/modules/reagents/Chemistry-Holder.dm index 351558de2a3..fef9a74a08d 100644 --- a/code/modules/reagents/Chemistry-Holder.dm +++ b/code/modules/reagents/Chemistry-Holder.dm @@ -385,7 +385,7 @@ return trans_to_mob(target, amount*0.75, CHEM_TOUCH, multiplier, copy) + trans_to_mob(target, amount*0.25, CHEM_BREATHE, multiplier, copy) -/datum/reagents/proc/trans_to_mob(var/mob/target, var/amount = 1, var/type = CHEM_BLOOD, var/multiplier = 1, var/copy = 0) // Transfer after checking into which holder... +/datum/reagents/proc/trans_to_mob(var/mob/target, var/amount = 1, var/type = CHEM_BLOOD, var/multiplier = 1, var/copy = 0, var/bypass_checks = FALSE) // Transfer after checking into which holder... if(!target || !istype(target) || !target.simulated) return 0 @@ -394,7 +394,7 @@ if(istype(C)) if(type == CHEM_BREATHE) var/datum/reagents/R = C.breathing - return C.inhale(src, R, amount, multiplier, copy) + return C.inhale(src, R, amount, multiplier, copy, bypass_checks) if(type == CHEM_BLOOD) var/datum/reagents/R = C.reagents return trans_to_holder(R, amount, multiplier, copy) diff --git a/code/modules/reagents/reagent_containers/inhaler.dm b/code/modules/reagents/reagent_containers/inhaler.dm index ec8ff6edb5e..f1a27f0e329 100644 --- a/code/modules/reagents/reagent_containers/inhaler.dm +++ b/code/modules/reagents/reagent_containers/inhaler.dm @@ -63,7 +63,7 @@ if(M.reagents) var/contained = reagentlist() - var/trans = reagents.trans_to_mob(M, amount_per_transfer_from_this, CHEM_BREATHE) + var/trans = reagents.trans_to_mob(M, amount_per_transfer_from_this, CHEM_BREATHE, bypass_mask = TRUE) admin_inject_log(user, M, src, contained, trans) playsound(src.loc, 'sound/items/stimpack.ogg', 50, 1) to_chat(user,"[trans] units injected. [reagents.total_volume] units remaining in \the [src].") diff --git a/html/changelogs/burgerbb-gasmaskfixes.yml b/html/changelogs/burgerbb-gasmaskfixes.yml new file mode 100644 index 00000000000..c27d777b039 --- /dev/null +++ b/html/changelogs/burgerbb-gasmaskfixes.yml @@ -0,0 +1,37 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +# balance +################################# + +# Your name. +author: BurgerBB + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - bugfix: "Fixes inhalers having odd gasmask interaction."