From b8332f1e6e9a00f236d13691a4b79e6c3b812d95 Mon Sep 17 00:00:00 2001 From: Markolie Date: Wed, 24 Dec 2014 01:29:08 +0100 Subject: [PATCH] Additional autopsy data --- code/game/verbs/suicide.dm | 7 +++++++ .../mob/living/carbon/human/human_damage.dm | 1 + code/modules/mob/living/carbon/human/life.dm | 20 +++++++++++++------ 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/code/game/verbs/suicide.dm b/code/game/verbs/suicide.dm index 0b351b7619a..b4677fee1b6 100644 --- a/code/game/verbs/suicide.dm +++ b/code/game/verbs/suicide.dm @@ -61,6 +61,9 @@ //If something went wrong, just do normal oxyloss if(!(damagetype | BRUTELOSS) && !(damagetype | FIRELOSS) && !(damagetype | TOXLOSS) && !(damagetype | OXYLOSS)) adjustOxyLoss(max(175 - getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0)) + + var/datum/organ/external/affected = get_organ("head") + affected.add_autopsy_data("Suicide by [held_item]", 175) updatehealth() return @@ -71,6 +74,10 @@ "\red [src] is twisting \his own neck! It looks like \he's trying to commit suicide.", \ "\red [src] is holding \his breath! It looks like \he's trying to commit suicide.") adjustOxyLoss(max(175 - getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0)) + + var/datum/organ/external/affected = get_organ("head") + affected.add_autopsy_data("Suicide", 175) + updatehealth() /mob/living/carbon/brain/verb/suicide() diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm index 8fe6358a05d..b03f75a168e 100644 --- a/code/modules/mob/living/carbon/human/human_damage.dm +++ b/code/modules/mob/living/carbon/human/human_damage.dm @@ -135,6 +135,7 @@ var/datum/organ/external/O = pick(candidates) O.mutate() src << "Something is not right with your [O.display_name]..." + O.add_autopsy_data("Mutation", amount) return else if (prob(heal_prob)) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 43a59c86d09..42e89c638fc 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -379,7 +379,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc if(75 to 100) radiation -= 3 adjustToxLoss(3) - damage = 1 + damage = 3 if(prob(1)) src << "\red You mutate!" randmutb(src) @@ -390,7 +390,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc else radiation -= 5 adjustToxLoss(5) - damage = 1 + damage = 5 if(prob(1)) src << "\red You mutate!" randmutb(src) @@ -422,6 +422,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc if(istype(loc, /obj/)) var/obj/location_as_object = loc location_as_object.handle_internal_lifeform(src, 0) + else //First, check for air from internal atmosphere (using an air tank and mask generally) breath = get_breath_from_internal(BREATH_VOLUME) // Super hacky -- TLE @@ -509,19 +510,26 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc return 0 if(!breath || (breath.total_moles() == 0) || suiciding) + var/oxyloss = 0 if(reagents.has_reagent("inaprovaline")) return - if(suiciding) - adjustOxyLoss(2)//If you are suiciding, you should die a little bit faster + if(suiciding) + oxyloss = 2 + adjustOxyLoss(oxyloss)//If you are suiciding, you should die a little bit faster failed_last_breath = 1 oxygen_alert = max(oxygen_alert, 1) return 0 if(health > 0) - adjustOxyLoss(HUMAN_MAX_OXYLOSS) + oxyloss = HUMAN_MAX_OXYLOSS + adjustOxyLoss(oxyloss) failed_last_breath = 1 else - adjustOxyLoss(HUMAN_CRIT_MAX_OXYLOSS) + oxyloss = HUMAN_CRIT_MAX_OXYLOSS + adjustOxyLoss(oxyloss) failed_last_breath = 1 + + var/datum/organ/external/affected = get_organ("chest") + affected.add_autopsy_data("Suffocation", oxyloss) oxygen_alert = max(oxygen_alert, 1)