From 53f17613b3992a37a683e9c7234bf614a236e117 Mon Sep 17 00:00:00 2001 From: Fox-McCloud Date: Thu, 11 Feb 2016 08:19:57 -0500 Subject: [PATCH 1/2] Gibbing Throws Internal Organs --- code/datums/martial.dm | 5 ----- code/modules/mob/living/carbon/carbon.dm | 7 +++++++ code/modules/mob/living/death.dm | 3 ++- code/modules/spells/spell_types/godhand.dm | 7 ------- code/modules/spells/spell_types/inflict_handler.dm | 9 --------- 5 files changed, 9 insertions(+), 22 deletions(-) diff --git a/code/datums/martial.dm b/code/datums/martial.dm index 8d3a3d1d773..b5340aab968 100644 --- a/code/datums/martial.dm +++ b/code/datums/martial.dm @@ -249,11 +249,6 @@ A.say("PLASMA FIST!") D.visible_message("[A] has hit [D] with THE PLASMA FIST TECHNIQUE!", \ "[A] has hit [D] with THE PLASMA FIST TECHNIQUE!") - var/obj/item/organ/internal/brain/B = D.getorgan(/obj/item/organ/internal/brain) - if(B) - B.loc = get_turf(D) - B.transfer_identity(D) - D.internal_organs -= B D.gib() return diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 72ed1487238..5dbf5f462e9 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -72,6 +72,13 @@ src.gib() /mob/living/carbon/gib(animation = 1) + death(1) + for(var/obj/item/organ/internal/I in internal_organs) + if(I) + I.Remove(src) + I.loc = get_turf(src) + I.throw_at_fast(get_edge_target_turf(src,pick(alldirs)),rand(1,3),5) + for(var/mob/M in src) if(M in stomach_contents) stomach_contents.Remove(M) diff --git a/code/modules/mob/living/death.dm b/code/modules/mob/living/death.dm index 281f88e01cf..041554e6aa8 100644 --- a/code/modules/mob/living/death.dm +++ b/code/modules/mob/living/death.dm @@ -1,6 +1,7 @@ /mob/living/gib(animation = 1) var/prev_lying = lying - death(1) + if(stat != DEAD) + death(1) if(buckled) buckled.unbuckle_mob() //to update alien nest overlay. diff --git a/code/modules/spells/spell_types/godhand.dm b/code/modules/spells/spell_types/godhand.dm index 465f9b0489b..63664489869 100644 --- a/code/modules/spells/spell_types/godhand.dm +++ b/code/modules/spells/spell_types/godhand.dm @@ -50,13 +50,6 @@ if(!proximity || target == user || !ismob(target) || !iscarbon(user) || user.lying || user.handcuffed) //exploding after touching yourself would be bad return var/mob/M = target - if(ishuman(M) || ismonkey(M)) - var/mob/living/carbon/C_target = M - var/obj/item/organ/internal/brain/B = C_target.getorgan(/obj/item/organ/internal/brain) - if(B) - B.loc = get_turf(C_target) - B.transfer_identity(C_target) - C_target.internal_organs -= B var/datum/effect_system/spark_spread/sparks = new sparks.set_up(4, 0, M.loc) //no idea what the 0 is sparks.start() diff --git a/code/modules/spells/spell_types/inflict_handler.dm b/code/modules/spells/spell_types/inflict_handler.dm index 480ad8b2c97..2db9715cd57 100644 --- a/code/modules/spells/spell_types/inflict_handler.dm +++ b/code/modules/spells/spell_types/inflict_handler.dm @@ -26,15 +26,6 @@ switch(destroys) if("gib") target.gib() - if("gib_brain") - if(ishuman(target) || ismonkey(target)) - var/mob/living/carbon/C_target = target - var/obj/item/organ/internal/brain/B = C_target.getorgan(/obj/item/organ/internal/brain) - if(B) - B.loc = get_turf(C_target) - B.transfer_identity(C_target) - C_target.internal_organs -= B - target.gib() if("disintegrate") target.dust() From d2c433d1479c62ea6c2a780eebd339866a865d7f Mon Sep 17 00:00:00 2001 From: Fox-McCloud Date: Sat, 20 Feb 2016 17:10:06 -0500 Subject: [PATCH 2/2] update --- code/modules/mob/living/carbon/carbon.dm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 5dbf5f462e9..a8fdfe06a76 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -71,9 +71,11 @@ stomach_contents.Remove(A) src.gib() -/mob/living/carbon/gib(animation = 1) +/mob/living/carbon/gib(animation = 1, var/no_brain = 0) death(1) for(var/obj/item/organ/internal/I in internal_organs) + if(no_brain && istype(I, /obj/item/organ/internal/brain)) + continue if(I) I.Remove(src) I.loc = get_turf(src)