diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 718071062e9..239b42b03ac 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -606,3 +606,16 @@ // It receives the curent mob of the player s argument and MUST return the mob the player has been assigned. /atom/proc/assign_player(var/mob/user) return + +/atom/proc/get_contained_external_atoms() + . = contents + +/atom/proc/dump_contents() + for(var/thing in get_contained_external_atoms()) + var/atom/movable/AM = thing + AM.dropInto(loc) + if(ismob(AM)) + var/mob/M = AM + if(M.client) + M.client.eye = M.client.mob + M.client.perspective = MOB_PERSPECTIVE \ No newline at end of file diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index 25c8d142cf8..32339952765 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -106,17 +106,15 @@ return 0 return 1 -/obj/structure/closet/proc/dump_contents() +/obj/structure/closet/dump_contents() //Cham Projector Exception - for(var/obj/effect/dummy/chameleon/AD in src) + for(var/obj/effect/dummy/chameleon/AD in contents) AD.forceMove(loc) - for(var/obj/I in src) - if(linked_teleporter && I == linked_teleporter) - continue + for(var/obj/I in contents - linked_teleporter) I.forceMove(loc) - for(var/mob/M in src) + for(var/mob/M in contents) M.forceMove(loc) if(M.client) M.client.eye = M.client.mob diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 1f55822d256..b59ff16e3b4 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -492,4 +492,7 @@ /mob/living/carbon/flash_eyes(intensity = FLASH_PROTECTION_MODERATE, override_blindness_check = FALSE, affect_silicon = FALSE, visual = FALSE, type = /obj/screen/fullscreen/flash) if(eyecheck() < intensity || override_blindness_check) - return ..() \ No newline at end of file + return ..() + +/mob/living/carbon/get_contained_external_atoms() + . = contents - internal_organs \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/death.dm b/code/modules/mob/living/carbon/human/death.dm index f991d0aeaef..135edc63b1b 100644 --- a/code/modules/mob/living/carbon/human/death.dm +++ b/code/modules/mob/living/carbon/human/death.dm @@ -131,4 +131,15 @@ /mob/living/carbon/human/proc/vr_disconnect() if(remote_network) SSvirtualreality.remove_robot(src, remote_network) - remote_network = null \ No newline at end of file + remote_network = null + +/mob/living/carbon/human/proc/drop_all_limbs(var/droplimb_type = DROPLIMB_BLUNT) + for(var/thing in organs) + var/obj/item/organ/external/limb = thing + var/limb_can_amputate = (limb.limb_flags & ORGAN_CAN_AMPUTATE) + limb.limb_flags |= ORGAN_CAN_AMPUTATE + limb.droplimb(TRUE, droplimb_type, TRUE, TRUE) + if(!QDELETED(limb) && !limb_can_amputate) + limb.limb_flags &= ~ORGAN_CAN_AMPUTATE + dump_contents() + qdel(src) \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/human_helpers.dm b/code/modules/mob/living/carbon/human/human_helpers.dm index 864d14b5d4b..dfd8b12c2d9 100644 --- a/code/modules/mob/living/carbon/human/human_helpers.dm +++ b/code/modules/mob/living/carbon/human/human_helpers.dm @@ -272,4 +272,7 @@ if(species?.respawn_type) set_death_time(species.respawn_type, world.time) else - set_death_time(CREW, world.time) \ No newline at end of file + set_death_time(CREW, world.time) + +/mob/living/carbon/human/get_contained_external_atoms() + . = ..() - organs \ No newline at end of file diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 0de437c0919..d84db3ee587 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -1207,6 +1207,16 @@ proc/is_blind(A) /mob/proc/get_antag_datum(var/antag_role) return +/mob/dump_contents() + for(var/thing in get_contained_external_atoms()) + var/atom/movable/AM = thing + drop_from_inventory(AM, loc) + if(ismob(AM)) + var/mob/M = AM + if(M.client) + M.client.eye = M.client.mob + M.client.perspective = MOB_PERSPECTIVE + /mob/proc/in_neck_grab() for(var/thing in grabbed_by) var/obj/item/grab/G = thing diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index 244cc74f80b..2ea7f0afff0 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -901,7 +901,10 @@ Note that amputating the affected organ does in fact remove the infection from t victim.shock_stage += min_broken_damage victim.flash_strong_pain() + var/mob/living/carbon/human/last_owner = owner removed(null, ignore_children) + if(istype(last_owner) && !QDELETED(last_owner) && length(last_owner.organs) <= 1) + last_owner.drop_all_limbs(disintegrate) // drops the last remaining part, usually the torso, as an item if(parent_organ) var/datum/wound/lost_limb/W = new(src, disintegrate, clean) diff --git a/html/changelogs/geeves-dismemberment.yml b/html/changelogs/geeves-dismemberment.yml new file mode 100644 index 00000000000..8af95b0fa44 --- /dev/null +++ b/html/changelogs/geeves-dismemberment.yml @@ -0,0 +1,6 @@ +author: Geeves + +delete-after: True + +changes: + - rscadd: "You can now completely get rid of bodies by dismembering all their limbs, including the lower body." \ No newline at end of file