This commit is contained in:
HarpyEagle
2015-10-17 20:53:03 -04:00
parent f9ef61ebba
commit ffc50c3cfa

View File

@@ -364,17 +364,23 @@
internals.icon_state = "internal0"
return null
get_breath_from_environment(var/volume_needed=BREATH_VOLUME)
var/datum/gas_mixture/breath = ..()
if(breath)
//exposure to extreme pressures can rupture lungs
var/check_pressure = breath.return_pressure()
if(check_pressure < ONE_ATMOSPHERE / 5 || check_pressure > ONE_ATMOSPHERE * 5)
if(is_lung_ruptured() && prob(5))
rupture_lung()
return breath
handle_breath(datum/gas_mixture/breath)
if(status_flags & GODMODE)
return
//exposure to extreme pressures can rupture lungs
if(breath && (breath.total_moles < BREATH_MOLES / 5 || breath.total_moles > BREATH_MOLES * 5))
if(!is_lung_ruptured() && prob(5))
rupture_lung()
//check if we actually need to process breath
if(!breath || (breath.total_moles == 0) || suiciding)
failed_last_breath = 1