diff --git a/code/datums/elements/orbit_twitcher.dm b/code/datums/elements/orbit_twitcher.dm index 77a1860b5fb..998b3bb9fd1 100644 --- a/code/datums/elements/orbit_twitcher.dm +++ b/code/datums/elements/orbit_twitcher.dm @@ -30,6 +30,11 @@ else living.emote("twitch", forced = TRUE) + // if we're in a bodybag or morgue slab go up a level and shake that as well + var/obj/container = get(living, /obj/structure/bodycontainer) || get(living, /obj/structure/closet/body_bag) + if(!isnull(container)) + container.Shake(2, 1, 0.3 SECONDS, 0.1 SECONDS) + /datum/element/orbit_twitcher/proc/orbit_begin(atom/source, atom/orbiter) SIGNAL_HANDLER diff --git a/code/game/data_huds.dm b/code/game/data_huds.dm index c5836e75016..887a2cb4c7b 100644 --- a/code/game/data_huds.dm +++ b/code/game/data_huds.dm @@ -189,8 +189,8 @@ Medical HUD! Basic mode needs suit sensors on. set_hud_image_state(STATUS_HUD, "hudxeno") return FALSE - if(stat == DEAD || (HAS_TRAIT(src, TRAIT_FAKEDEATH))) - if(HAS_TRAIT(src, TRAIT_MIND_TEMPORARILY_GONE) || can_defib_client()) + if(!appears_alive()) + if(can_defib_client()) set_hud_image_state(STATUS_HUD, "huddefib") else if(HAS_TRAIT(src, TRAIT_GHOSTROLE_ON_REVIVE)) set_hud_image_state(STATUS_HUD, "hudghost") diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm index 02beb2b3e01..72159ef326e 100644 --- a/code/game/objects/structures/morgue.dm +++ b/code/game/objects/structures/morgue.dm @@ -315,18 +315,25 @@ GLOBAL_LIST_EMPTY(bodycontainers) //Let them act as spawnpoints for revenants an return for(var/mob/living/occupant as anything in stored_living) - if(occupant.stat == DEAD) - if(iscarbon(occupant)) - var/mob/living/carbon/carbon_occupant = occupant - if(!carbon_occupant.can_defib_client()) - continue - else - if(HAS_TRAIT(occupant, TRAIT_SUICIDED) || HAS_TRAIT(occupant, TRAIT_BADDNA) || (!occupant.key && !occupant.get_ghost(FALSE, TRUE))) - continue - morgue_state = MORGUE_HAS_REVIVABLE - return + if(occupant_revivable(occupant)) + morgue_state = MORGUE_HAS_REVIVABLE + return morgue_state = MORGUE_ONLY_BRAINDEAD +/obj/structure/bodycontainer/morgue/proc/occupant_revivable(mob/living/occupant) + if(occupant.stat != DEAD) + return TRUE + if(HAS_TRAIT(occupant, TRAIT_GHOSTROLE_ON_REVIVE) && length(occupant.get_all_orbiters())) + return TRUE + if(iscarbon(occupant)) + var/mob/living/carbon/carbon_occupant = occupant + return carbon_occupant.can_defib_client() + if(HAS_TRAIT(occupant, TRAIT_SUICIDED)) + return FALSE + if(!occupant.key && !occupant.get_ghost(FALSE, TRUE)) + return FALSE + return TRUE + /obj/structure/bodycontainer/morgue/proc/handle_bodybag_enter(obj/structure/closet/body_bag/arrived_bag) if(!arrived_bag.tag_name) return diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 924227483a9..3d1142537cc 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -843,7 +843,7 @@ return NONE /mob/living/carbon/proc/can_defib_client() - return (client || get_ghost(FALSE, TRUE)) && (can_defib() & DEFIB_REVIVABLE_STATES) + return (HAS_TRAIT(src, TRAIT_MIND_TEMPORARILY_GONE) || client || get_ghost(FALSE, TRUE)) && (can_defib() & DEFIB_REVIVABLE_STATES) /mob/living/carbon/harvest(mob/living/user) if(QDELETED(src))