diff --git a/code/modules/mob/living/carbon/human/death.dm b/code/modules/mob/living/carbon/human/death.dm index 7be42b5a51..65fa5c522e 100644 --- a/code/modules/mob/living/carbon/human/death.dm +++ b/code/modules/mob/living/carbon/human/death.dm @@ -6,11 +6,9 @@ I.throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,3),30) for(var/obj/item/organ/external/E in src.organs) - if(E.cannot_amputate) - E.removed() - del(E) - continue - E.droplimb() + E.droplimb(0,0,1) + + sleep(1) ..(species.gibbed_anim) gibs(loc, viruses, dna, null, species.flesh_color, species.blood_color) diff --git a/code/modules/organs/organ.dm b/code/modules/organs/organ.dm index 206b030a03..5d307fffcf 100644 --- a/code/modules/organs/organ.dm +++ b/code/modules/organs/organ.dm @@ -2,6 +2,8 @@ var/list/organ_cache = list() /obj/item/organ name = "organ" + icon = 'icons/obj/surgery.dmi' + var/mob/living/carbon/human/owner = null var/status = 0 var/vital //Lose a vital limb, die immediately. diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index 602f353ee6..5b86cfffdc 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -599,7 +599,7 @@ 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) +/obj/item/organ/external/proc/droplimb(var/clean, var/disintegrate, var/ignore_children) if(cannot_amputate || !owner) return @@ -625,7 +625,7 @@ Note that amputating the affected organ does in fact remove the infection from t "Your [src.name] explodes in a shower of gore!",\ "You hear the sickening splatter of gore.") - src.removed() + src.removed(null, ignore_children) if(parent) parent.children -= src @@ -658,6 +658,12 @@ Note that amputating the affected organ does in fact remove the infection from t gore.basecolor = owner.species.blood_color gore.update_icon() gore.throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,3),30) + + for(var/obj/item/organ/I in internal_organs) + I.removed() + if(istype(loc,/turf)) + I.throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,3),30) + del(src) /**************************************************** @@ -827,7 +833,7 @@ Note that amputating the affected organ does in fact remove the infection from t H.drop_item() W.loc = owner -/obj/item/organ/external/removed() +/obj/item/organ/external/removed(var/mob/living/user, var/ignore_children) var/is_robotic = status & ORGAN_ROBOT ..() @@ -839,9 +845,10 @@ Note that amputating the affected organ does in fact remove the infection from t del(implant) // Attached organs also fly off. - for(var/obj/item/organ/external/O in children) - O.removed() - O.loc = src + if(!ignore_children) + for(var/obj/item/organ/external/O in children) + O.removed() + O.loc = src // Grab all the internal giblets too. for(var/obj/item/organ/organ in internal_organs) diff --git a/code/modules/organs/organ_icon.dm b/code/modules/organs/organ_icon.dm index 9361ec3f4a..be11eec925 100644 --- a/code/modules/organs/organ_icon.dm +++ b/code/modules/organs/organ_icon.dm @@ -3,15 +3,6 @@ var/global/list/limb_icon_cache = list() /obj/item/organ/external/set_dir() return -/obj/item/organ/proc/get_icon(var/image/supplied) - var/key = "internal-[icon_state]" - var/image/I - if(organ_cache[key]) - I = organ_cache[key] - else - I = image(icon, "[icon_state]") - return I - /obj/item/organ/external/proc/compile_icon() overlays.Cut() get_icon() @@ -22,7 +13,7 @@ var/global/list/limb_icon_cache = list() overlays += child.get_icon() overlays += organ.get_icon() -/obj/item/organ/external/get_icon(var/skeletal) +/obj/item/organ/external/proc/get_icon(var/skeletal) if(!owner) mob_icon = new /icon('icons/mob/human_races/r_human.dmi', "[icon_name][gendered_icon ? "_f" : ""]")