diff --git a/code/modules/mob/_modifiers/medical.dm b/code/modules/mob/_modifiers/medical.dm index df365dd6d2..cfa4193fd6 100644 --- a/code/modules/mob/_modifiers/medical.dm +++ b/code/modules/mob/_modifiers/medical.dm @@ -29,6 +29,19 @@ stacks = MODIFIER_STACK_EXTEND pulse_set_level = PULSE_SLOW + var/mob/living/carbon/human/human_being_pumped + +//The meat and +/datum/modifier/bloodpump_corpse/proc/process_blood() + holder.handle_chemicals_in_body() // Circulates chemicals throughout the body. + if(human_being_pumped) //Specialty human procs. + human_being_pumped.handle_organs() //Things like antibiotics will work. And since we're circulating, it makes infections get worse if we don't treat them! + human_being_pumped.handle_heartbeat() //We can hear our own heart being pumped! This makes a pretty neat sound effect. + +/datum/modifier/bloodpump_corpse/on_applied() + if(ishuman(holder)) + human_being_pumped = holder + return /datum/modifier/bloodpump_corpse/check_if_valid() ..() @@ -38,9 +51,8 @@ //This INTENTIONALLY only happens on DEAD people. Alive people are metabolizing already (and can be healed quicker through things like brute packs) meaning they don't need this extra assistance! //Why does it not make you bleed out? Because we'll let medical have a few benefits that don't come with innate downsides. It takes 2 seconds to resleeve someone. It takes a good amount of time to repair a corpse. Let's make the latter more appealing. /datum/modifier/bloodpump_corpse/tick() - var/i = 5 //It's a controlled machine. It pumps at a nice, steady rate. - while(i-- > 0) - holder.handle_chemicals_in_body() // Circulates chemicals throughout the body. + for(var/i in 1 to 5) //It's a controlled machine. 5 pumps per tick. + process_blood() // Circulates chemicals throughout the body. /* * Modifiers caused by chemicals or organs specifically. */ @@ -49,10 +61,10 @@ desc = "Your blood flows thanks to the wonderful power of CPR." pulse_set_level = PULSE_NONE //No pulse. You're acting as their pulse. -/datum/modifier/bloodpump_corpse/tick() - var/i = rand(4,7) //CPR isn't perfect. You get some randomization in there. - while(i-- > 0) - holder.handle_chemicals_in_body() // Circulates chemicals throughout the body. +/datum/modifier/bloodpump_corpse/cpr/tick() + var/randomization = rand(4,7) //CPR isn't perfect. You get some randomization in there. + for(var/i in 1 to randomization) + process_blood() /datum/modifier/cryogelled name = "cryogelled" diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index 102e26ac74..73b8ecd79e 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -670,14 +670,9 @@ This function completely restores a damaged organ to perfect condition. /obj/item/organ/external/process() if(owner) - //Dismemberment - //if(parent && parent.is_stump()) //should never happen - // warning("\The [src] ([src.type]) belonging to [owner] ([owner.type]) was attached to a stump") - // remove() - // return // Process wounds, doing healing etc. Only do this every few ticks to save processing power - if(owner.life_tick % wound_update_accuracy == 0) + if(owner.stat != DEAD && owner.life_tick % wound_update_accuracy == 0) update_wounds() //Chem traces slowly vanish