From b12e0941122bb6299c2dde824f0d068c7e8021d9 Mon Sep 17 00:00:00 2001 From: mwerezak Date: Sat, 5 Dec 2015 22:30:10 -0500 Subject: [PATCH] Removes unreachable return in organ/external/remove(), smaller embedded items are no longer deleted. Implants changed to w_class 1 because seriously a w_class 3 implant makes no sense at all. --- .../objects/items/weapons/implants/implant.dm | 1 + code/modules/organs/organ_external.dm | 19 ++++++++----------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/code/game/objects/items/weapons/implants/implant.dm b/code/game/objects/items/weapons/implants/implant.dm index 6465a055785..2e156e7e967 100644 --- a/code/game/objects/items/weapons/implants/implant.dm +++ b/code/game/objects/items/weapons/implants/implant.dm @@ -6,6 +6,7 @@ name = "implant" icon = 'icons/obj/device.dmi' icon_state = "implant" + w_class = 1 var/implanted = null var/mob/imp_in = null var/obj/item/organ/external/part = null diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index e0e1eaa7057..fbf78f3b360 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -687,14 +687,11 @@ Note that amputating the affected organ does in fact remove the infection from t ****************************************************/ //Handles dismemberment -/obj/item/organ/external/proc/droplimb(var/clean, var/disintegrate, var/ignore_children) +/obj/item/organ/external/proc/droplimb(var/clean, var/disintegrate = DROPLIMB_EDGE, var/ignore_children = null) if(cannot_amputate || !owner) return - if(!disintegrate) - disintegrate = DROPLIMB_EDGE - switch(disintegrate) if(DROPLIMB_EDGE) if(!clean) @@ -942,7 +939,7 @@ Note that amputating the affected organ does in fact remove the infection from t H.drop_from_inventory(W) W.loc = owner -/obj/item/organ/external/removed(var/mob/living/user, var/ignore_children) +/obj/item/organ/external/removed(var/mob/living/user, var/ignore_children = 0) if(!owner) return @@ -954,11 +951,11 @@ Note that amputating the affected organ does in fact remove the infection from t status |= ORGAN_DESTROYED victim.bad_external_organs -= src - for(var/obj/item/implant in implants) - if(!istype(implant)) - return - if(implant.w_class <= 2) - qdel(implant) + for(var/atom/movable/implant in implants) + //large items and non-item objs fall to the floor, everything else stays + var/obj/item/I = implant + if(istype(I) && I.w_class < 3) + implant.loc = get_turf(victim.loc) else implant.loc = src implants.Cut() @@ -1050,7 +1047,7 @@ Note that amputating the affected organ does in fact remove the infection from t if(wound_descriptors.len) var/list/flavor_text = list() var/list/no_exclude = list("gaping wound", "big gaping wound", "massive wound", "large bruise",\ - "huge bruise", "massive bruise", "severe burn", "large burn", "deep burn", "carbonised area") + "huge bruise", "massive bruise", "severe burn", "large burn", "deep burn", "carbonised area") //note to self make this more robust for(var/wound in wound_descriptors) switch(wound_descriptors[wound]) if(1)