diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 6e8d6c9b96d..f75c6a6dc20 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -281,19 +281,30 @@ Works together with spawning an observer, noted above. */ /mob/proc/ghostize(can_reenter_corpse = TRUE) - if(key) - if(key[1] != "@") // Skip aghosts. - if(HAS_TRAIT(src, TRAIT_CORPSELOCKED) && can_reenter_corpse) //If you can re-enter the corpse you can't leave when corpselocked - return - stop_sound_channel(CHANNEL_HEARTBEAT) //Stop heartbeat sounds because You Are A Ghost Now - var/mob/dead/observer/ghost = new(src) // Transfer safety to observer spawning proc. - SStgui.on_transfer(src, ghost) // Transfer NanoUIs. - ghost.can_reenter_corpse = can_reenter_corpse - ghost.key = key - ghost.client?.init_verbs() - if(!can_reenter_corpse)// Disassociates observer mind from the body mind - ghost.mind = null - return ghost + if(!key) + return + if(key[1] == "@") // Skip aghosts. + return + + if(HAS_TRAIT(src, TRAIT_CORPSELOCKED)) + if(can_reenter_corpse) //If you can re-enter the corpse you can't leave when corpselocked + return + if(ishuman(usr)) //following code only applies to those capable of having an ethereal heart, ie humans + var/mob/living/carbon/human/crystal_fella = usr + var/our_heart = crystal_fella.getorganslot(ORGAN_SLOT_HEART) + if(istype(our_heart, /obj/item/organ/heart/ethereal)) //so you got the heart? + var/obj/item/organ/heart/ethereal/ethereal_heart = our_heart + ethereal_heart.stop_crystalization_process(crystal_fella) //stops the crystallization process + + stop_sound_channel(CHANNEL_HEARTBEAT) //Stop heartbeat sounds because You Are A Ghost Now + var/mob/dead/observer/ghost = new(src) // Transfer safety to observer spawning proc. + SStgui.on_transfer(src, ghost) // Transfer NanoUIs. + ghost.can_reenter_corpse = can_reenter_corpse + ghost.key = key + ghost.client?.init_verbs() + if(!can_reenter_corpse)// Disassociates observer mind from the body mind + ghost.mind = null + return ghost /mob/living/ghostize(can_reenter_corpse = TRUE) . = ..() @@ -312,8 +323,9 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp if(stat != DEAD) succumb() if(stat == DEAD) - ghostize(TRUE) - return TRUE + if(!HAS_TRAIT(src, TRAIT_CORPSELOCKED)) //corpse-locked have to confirm with the alert below + ghostize(TRUE) + return TRUE // SKYRAT EDIT ADDITION -- Free Ghost Cafe Ghosting if(HAS_TRAIT(src, TRAIT_FREE_GHOST)) ghostize(TRUE) // Can return with TRUE