From fb60cfde4ce10f4006048be649ccccda9c9797e3 Mon Sep 17 00:00:00 2001 From: PsiOmegaDelta Date: Fri, 3 Jul 2015 16:25:37 +0200 Subject: [PATCH] Rejuvenation now clears chemicals in mobs. Fixes #9921. --- code/modules/mob/living/carbon/carbon.dm | 6 ++++++ code/modules/mob/living/carbon/human/life.dm | 4 ++++ code/modules/mob/living/living.dm | 10 +++------- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index f59fa5bf56..ab97fb12c0 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -23,6 +23,12 @@ qdel(food) return ..() +/mob/living/carbon/rejuvenate() + bloodstr.clear_reagents() + ingested.clear_reagents() + touching.clear_reagents() + ..() + /mob/living/carbon/Move(NewLoc, direct) . = ..() if(.) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index d603232f40..605ecbed39 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -1753,5 +1753,9 @@ if (thermal_protection < 1 && bodytemperature < burn_temperature) bodytemperature += round(BODYTEMP_HEATING_MAX*(1-thermal_protection), 1) +/mob/living/carbon/human/rejuvenate() + restore_blood() + ..() + #undef HUMAN_MAX_OXYLOSS #undef HUMAN_CRIT_MAX_OXYLOSS diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 80902ddaa9..d3e1749876 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -399,6 +399,7 @@ default behaviour is: fire_stacks = 0 /mob/living/proc/rejuvenate() + reagents.clear_reagents() // shut down various types of badness setToxLoss(0) @@ -424,16 +425,11 @@ default behaviour is: ear_damage = 0 heal_overall_damage(getBruteLoss(), getFireLoss()) - // restore all of a human's blood - if(ishuman(src)) - var/mob/living/carbon/human/human_mob = src - human_mob.restore_blood() - // fix all of our organs restore_all_organs() // remove the character from the list of the dead - if(stat == 2) + if(stat == DEAD) dead_mob_list -= src living_mob_list += src tod = null @@ -609,7 +605,7 @@ default behaviour is: /mob/living/proc/escape_inventory(obj/item/weapon/holder/H) if(H != src.loc) return - + var/mob/M = H.loc //Get our mob holder (if any). if(istype(M))