From 5b90e4afc67a9bbbea5cfcce0065eb1915bdbbef Mon Sep 17 00:00:00 2001 From: mwerezak Date: Thu, 31 Jul 2014 17:01:06 -0400 Subject: [PATCH] Allows the use of stun weapons to show up in autopsies --- code/game/objects/items/weapons/stunbaton.dm | 2 +- code/modules/mob/living/carbon/human/human_defense.dm | 5 ++--- code/modules/mob/living/living_defense.dm | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/code/game/objects/items/weapons/stunbaton.dm b/code/game/objects/items/weapons/stunbaton.dm index 03609a29cb..3f365b4615 100644 --- a/code/game/objects/items/weapons/stunbaton.dm +++ b/code/game/objects/items/weapons/stunbaton.dm @@ -151,7 +151,7 @@ if (contact) msg_admin_attack("[key_name(user)] attempted to stun [key_name(L)] with the [src].") - L.stun_effect_act(stun, agony, target_zone) + L.stun_effect_act(stun, agony, target_zone, src) playsound(loc, 'sound/weapons/Egloves.ogg', 50, 1, -1) msg_admin_attack("[key_name(user)] stunned [key_name(L)] with the [src].") diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index dba82e561c..1fff2f9086 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -57,13 +57,12 @@ emp_act return -1 // complete projectile permutation - //BEGIN BOOK'S TASER NERF. + //Tasers if(istype(P, /obj/item/projectile/beam/stun)) - stun_effect_act(0, P.agony, def_zone) + stun_effect_act(0, P.agony, def_zone, P) src <<"\red You have been hit by [P]!" del P return - //END TASER NERF //Shrapnel if (P.damage_type == BRUTE) diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index e5c965c8b1..bfea9396dd 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -66,7 +66,7 @@ return absorb //Handles the effects of "stun" weapons -/mob/living/proc/stun_effect_act(var/stun_amount, var/agony_amount, var/def_zone) +/mob/living/proc/stun_effect_act(var/stun_amount, var/agony_amount, var/def_zone, var/used_weapon=null) flash_pain() if (stun_amount) @@ -76,7 +76,7 @@ apply_effect(EYE_BLUR, stun_amount) if (agony_amount) - apply_effect(agony_amount, AGONY,0) + apply_damage(agony_amount, HALLOSS, def_zone, 0, used_weapon) apply_effect(STUTTER, agony_amount/10) apply_effect(EYE_BLUR, agony_amount/10)