From 409dbd2835b7efe0a8ca64bc4a80cb23649aa31d Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Wed, 17 Jun 2020 21:42:04 -0700 Subject: [PATCH] carbons and humans --- code/modules/mob/living/carbon/human/life.dm | 31 ++++++------------ code/modules/mob/living/carbon/life.dm | 34 ++++++++------------ 2 files changed, 24 insertions(+), 41 deletions(-) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index d96fd97742..56ab1f1b10 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -18,32 +18,21 @@ #define THERMAL_PROTECTION_HAND_LEFT 0.025 #define THERMAL_PROTECTION_HAND_RIGHT 0.025 -/mob/living/carbon/human/Life(seconds, times_fired) - set invisibility = 0 - if (mob_transforming) +/mob/living/carbon/human/BiologicalLife(seconds, times_fired) + if(!(. = ..())) return + handle_active_genes() + //heart attack stuff + handle_heart() + dna.species.spec_life(src) // for mutantraces + return (stat != DEAD) && !QDELETED(src) - . = ..() - - if (QDELETED(src)) - return 0 - - if(.) //not dead - handle_active_genes() - - if(stat != DEAD) - //heart attack stuff - handle_heart() - +/mob/living/carbon/human/PhysicalLife(seconds, times_fired) + if(!(. = ..())) + return //Update our name based on whether our face is obscured/disfigured name = get_visible_name() - dna.species.spec_life(src) // for mutantraces - - if(stat != DEAD) - return 1 - - /mob/living/carbon/human/calculate_affecting_pressure(pressure) var/headless = !get_bodypart(BODY_ZONE_HEAD) //should the mob be perennially headless (see dullahans), we only take the suit into account, so they can into space. if (wear_suit && istype(wear_suit, /obj/item/clothing) && (headless || (head && istype(head, /obj/item/clothing)))) diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm index 641f8887df..6e58d8ee42 100644 --- a/code/modules/mob/living/carbon/life.dm +++ b/code/modules/mob/living/carbon/life.dm @@ -1,24 +1,13 @@ -/mob/living/carbon/Life() - set invisibility = 0 - - if(mob_transforming) - return - - if(damageoverlaytemp) - damageoverlaytemp = 0 - update_damage_hud() - +/mob/living/carbon/BiologicalLife(seconds, times_fired) + if(stat == DEAD) + return FALSE //Reagent processing needs to come before breathing, to prevent edge cases. handle_organs() - - . = ..() - - if (QDELETED(src)) + if(!(. = ..())) return - - if(.) //not dead - handle_blood() - + handle_blood() + // handle_blood *could* kill us. + // we should probably have a better system for if we need to check for death or something in the future hmw if(stat != DEAD) var/bprv = handle_bodyparts() if(bprv & BODYPART_LIFE_UPDATE_HEALTH) @@ -35,12 +24,17 @@ stop_sound_channel(CHANNEL_HEARTBEAT) handle_death() rot() + . = FALSE //Updates the number of stored chemicals for powers handle_changeling() - if(stat != DEAD) - return 1 +/mob/living/carbon/PhysicalLife(seconds, times_fired) + if(!(. = ..())) + return + if(damageoverlaytemp) + damageoverlaytemp = 0 + update_damage_hud() //Procs called while dead /mob/living/carbon/proc/handle_death()