diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm
index f4588074b39..767d86df2a5 100644
--- a/code/modules/mob/dead/observer/observer.dm
+++ b/code/modules/mob/dead/observer/observer.dm
@@ -181,19 +181,11 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
warningmsg = "You have committed suicide too early in the round"
else if(stat != DEAD)
warningmsg = "You are alive"
+ if(isAI(src))
+ warningmsg = "You are a living AI! You should probably use OOC -> Wipe Core instead."
else if(GLOB.non_respawnable_keys[ckey])
warningmsg = "You have lost your right to respawn"
- if(stat == CONSCIOUS)
-
- if(isAI(src))
- to_chat(src, "AIs cannot ghost while alive. If you must leave the round, use OOC -> Wipe Core instead.")
- return
-
- if(sees_someone_nearby())
- to_chat(src, "You cannot ghost while alive with another player nearby. Go somewhere more secluded first.")
- return
-
if(warningmsg)
var/response
var/alertmsg = "Are you -sure- you want to ghost?\n([warningmsg]. If you ghost now, you probably won't be able to rejoin the round! You can't change your mind, so choose wisely!)"
@@ -201,15 +193,9 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(response != "Ghost")
return
- var/move_to_cryo = ishuman(src) && stat == CONSCIOUS && !P && !restrained()
- if(move_to_cryo)
- if(!do_after(src, 600, 0, target = src))
- return
- if(restrained())
- move_to_cryo = FALSE
+ if(stat == CONSCIOUS)
+ player_ghosted = 1
- if(move_to_cryo)
- cryo_ssd(src)
if(warningmsg)
// Not respawnable
var/mob/dead/observer/ghost = ghostize(0) // 0 parameter stops them re-entering their body
@@ -217,8 +203,6 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
else
// Respawnable
ghostize(1)
- if(move_to_cryo)
- force_cryo_human(src)
// If mob in morgue tray, update tray
var/obj/structure/morgue/Morgue = locate() in M.loc
diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm
index 8d0261528ed..84760146f8d 100644
--- a/code/modules/mob/living/carbon/human/life.dm
+++ b/code/modules/mob/living/carbon/human/life.dm
@@ -39,6 +39,17 @@
if(life_tick == 1)
regenerate_icons() // Make sure the inventory updates
+ handle_ghosted()
+
+/mob/living/carbon/human/proc/handle_ghosted()
+ if(player_ghosted > 0 && stat == CONSCIOUS && !restrained())
+ if(key)
+ player_ghosted = 0
+ else
+ player_ghosted++
+ if(player_ghosted % 150 == 0)
+ force_cryo_human(src)
+
/mob/living/carbon/human/calculate_affecting_pressure(var/pressure)
..()
var/pressure_difference = abs( pressure - ONE_ATMOSPHERE )
diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm
index 77c74c4396e..3e9ff0b7ba6 100644
--- a/code/modules/mob/mob_defines.dm
+++ b/code/modules/mob/mob_defines.dm
@@ -173,6 +173,9 @@
//SSD var, changed it up some so people can have special things happen for different mobs when SSD.
var/player_logged = 0
+ //Ghosted var, set only if a player has manually ghosted out of this mob.
+ var/player_ghosted = 0
+
var/turf/listed_turf = null //the current turf being examined in the stat panel
var/list/shouldnt_see = list(/atom/movable/lighting_overlay) //list of objects that this mob shouldn't see in the stat panel. this silliness is needed because of AI alt+click and cult blood runes