From a14406f83ab6e0d0ed7b4e334b6a2556c6f45289 Mon Sep 17 00:00:00 2001 From: PsiOmega Date: Sun, 14 Jun 2015 11:14:31 +0200 Subject: [PATCH] mob/living/Life() now handles blood. --- code/modules/mob/living/carbon/human/life.dm | 4 ++-- code/modules/mob/living/life.dm | 6 ++++++ code/modules/organs/blood.dm | 4 +++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index bdada0e1ebc..aaf61f07c09 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -47,7 +47,6 @@ //to find it. blinded = null fire_alert = 0 //Reset this here, because both breathe() and handle_environment() have a chance to set it. - ..() //TODO: seperate this out // update the current life tick, can be used to e.g. only do something every 4 ticks @@ -56,6 +55,8 @@ in_stasis = istype(loc, /obj/structure/closet/body_bag/cryobag) && loc:opened == 0 if(in_stasis) loc:used++ + ..() + if(life_tick%30==15) hud_updateflag = 1022 @@ -71,7 +72,6 @@ //Organs and blood handle_organs() - handle_blood() stabilize_body_temperature() //Body temperature adjusts itself (self-regulation) //Random events (vomiting etc) diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm index b7d1fa92b8b..a0ac76b4527 100644 --- a/code/modules/mob/living/life.dm +++ b/code/modules/mob/living/life.dm @@ -18,6 +18,9 @@ //Chemicals in the body handle_chemicals_in_body() + //Blood + handle_blood() + . = 1 //Handle temperature/pressure differences between body and environment @@ -33,5 +36,8 @@ /mob/living/proc/handle_chemicals_in_body() return +/mob/living/proc/handle_blood() + return + /mob/living/proc/handle_environment(var/datum/gas_mixture/environment) return diff --git a/code/modules/organs/blood.dm b/code/modules/organs/blood.dm index 70c2281bb30..4c756ace0ce 100644 --- a/code/modules/organs/blood.dm +++ b/code/modules/organs/blood.dm @@ -35,7 +35,9 @@ var/const/BLOOD_VOLUME_SURVIVE = 122 B.color = B.data["blood_colour"] // Takes care blood loss and regeneration -/mob/living/carbon/human/proc/handle_blood() +/mob/living/carbon/human/handle_blood() + if(in_stasis) + return if(species && species.flags & NO_BLOOD) return