mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 19:44:09 +01:00
Moves try_rupture_lung() to Human.DM next to the code for rupturing a lung, and makes it a proc for mob/living/carbon/human
This commit is contained in:
@@ -1111,6 +1111,26 @@
|
||||
src.custom_pain("You feel a stabbing pain in your chest!", 1)
|
||||
L.damage = L.min_bruised_damage
|
||||
|
||||
//Gave the rupture_lung() call it's own proc to have much more control over it.
|
||||
/mob/living/carbon/human/proc/try_lung_rupture(argBreath)
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
var/datum/gas_mixture/breath = argBreath
|
||||
var/pressure = environment.return_pressure()
|
||||
var/adjusted_pressure = calculate_affecting_pressure(pressure)
|
||||
|
||||
//High kPa
|
||||
if(!is_lung_ruptured() && breath.total_moles > BREATH_MOLES * 5)
|
||||
if(prob(5))
|
||||
rupture_lung()
|
||||
return
|
||||
//Low kPa
|
||||
else if(!is_lung_ruptured() && internal && adjusted_pressure <= species.hazard_low_pressure)
|
||||
if(internal.distribute_pressure >= species.warning_low_pressure)
|
||||
if(prob(33))
|
||||
rupture_lung()
|
||||
return
|
||||
else
|
||||
return
|
||||
/*
|
||||
/mob/living/carbon/human/verb/simulate()
|
||||
set name = "sim"
|
||||
|
||||
@@ -395,27 +395,6 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
|
||||
if(damage && organs.len)
|
||||
var/datum/organ/external/O = pick(organs)
|
||||
if(istype(O)) O.add_autopsy_data("Radiation Poisoning", damage)
|
||||
|
||||
//Gave the rupture_lung() call it's own proc to have much more control over it.
|
||||
proc/try_lung_rupture(argBreath)
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
var/datum/gas_mixture/breath = argBreath
|
||||
var/pressure = environment.return_pressure()
|
||||
var/adjusted_pressure = calculate_affecting_pressure(pressure)
|
||||
|
||||
//High kPa
|
||||
if(!is_lung_ruptured() && breath.total_moles > BREATH_MOLES * 5)
|
||||
if(prob(5))
|
||||
rupture_lung()
|
||||
return
|
||||
//Low kPa
|
||||
else if(!is_lung_ruptured() && internal && adjusted_pressure <= species.hazard_low_pressure)
|
||||
if(internal.distribute_pressure >= species.warning_low_pressure)
|
||||
if(prob(33))
|
||||
rupture_lung()
|
||||
return
|
||||
else
|
||||
return
|
||||
|
||||
proc/breathe()
|
||||
if(reagents.has_reagent("lexorin")) return
|
||||
|
||||
Reference in New Issue
Block a user