mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-21 12:02:31 +01:00
Fixes inhalers having odd interactions with masks (#4988)
The code for whether or not gas could be inhaled wasn't good. This fixes that.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user