From 7e544c17bc6e8904da056689ef63693a23e37ac7 Mon Sep 17 00:00:00 2001 From: Markolie Date: Fri, 28 Nov 2014 21:14:00 +0100 Subject: [PATCH] Fix DNA Injectors with abilities, adds mob's name to autopsy data --- code/game/objects/items/weapons/dna_injector.dm | 4 ++++ code/modules/mob/living/carbon/human/human.dm | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/code/game/objects/items/weapons/dna_injector.dm b/code/game/objects/items/weapons/dna_injector.dm index b15f656a69d..11e3d7d7f18 100644 --- a/code/game/objects/items/weapons/dna_injector.dm +++ b/code/game/objects/items/weapons/dna_injector.dm @@ -20,6 +20,10 @@ /obj/item/weapon/dnainjector/New() if(datatype && block) + buf=new + buf.dna=new + buf.types = datatype + buf.dna.ResetSE() SetValue(value) /obj/item/weapon/dnainjector/attack_paw(mob/user as mob) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 00160477134..703df1732f1 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -391,7 +391,10 @@ var/dam_zone = pick("chest", "l_hand", "r_hand", "l_leg", "r_leg") var/datum/organ/external/affecting = get_organ(ran_zone(dam_zone)) var/armor = run_armor_check(affecting, "melee") - apply_damage(damage, BRUTE, affecting, armor) + + var/datum/organ/external/affected = src.get_organ(dam_zone) + affected.add_autopsy_data(M.name, damage) // Add the mob's name to the autopsy data + apply_damage(damage, BRUTE, affecting, armor, M.name) if(armor >= 2) return