Severe burns cause bloodloss

This commit is contained in:
Anewbe
2016-08-06 19:06:00 -05:00
parent eff90ea309
commit 1e0dccd137
3 changed files with 48 additions and 5 deletions

View File

@@ -135,16 +135,18 @@ var/const/BLOOD_VOLUME_SURVIVE = 40
drip(blood_max)
//Makes a blood drop, leaking amt units of blood from the mob
/mob/living/carbon/human/proc/drip(var/amt as num)
/mob/living/carbon/human/proc/drip(var/amt)
if(remove_blood(amt))
blood_splatter(src,src)
/mob/living/carbon/human/proc/remove_blood(var/amt)
if(!should_have_organ(O_HEART)) //TODO: Make drips come from the reagents instead.
return
return 0
if(!amt)
return
return 0
vessel.remove_reagent("blood",amt)
blood_splatter(src,src)
return vessel.remove_reagent("blood",amt * (src.mob_size/MOB_MEDIUM))
/****************************************************
BLOOD TRANSFERS

View File

@@ -474,6 +474,11 @@ This function completely restores a damaged organ to perfect condition.
wounds += I
owner.custom_pain("You feel something rip in your [name]!", 1)
//Burn damage can cause fluid loss due to blistering and cook-off
if((damage > 5 || damage + burn_dam >= 15) && type == BURN && (robotic < ORGAN_ROBOT))
var/fluid_loss = (damage/(owner.maxHealth - config.health_threshold_dead)) * owner.species.blood_volume*(1 - BLOOD_VOLUME_SURVIVE/100)
owner.remove_blood(fluid_loss)
// first check whether we can widen an existing wound
if(wounds.len > 0 && prob(max(50+(number_wounds-1)*10,90)))
if((type == CUT || type == BRUISE) && damage >= 5)