From 698425a987cb98bdcbc070e3ca8b662f83107012 Mon Sep 17 00:00:00 2001 From: Cael_Aislinn Date: Tue, 30 Oct 2012 23:46:54 +1000 Subject: [PATCH] readd ssd sleep Signed-off-by: Cael_Aislinn --- code/modules/mob/living/carbon/human/life.dm | 3 ++- code/modules/mob/living/logout.dm | 2 ++ code/modules/mob/mob_defines.dm | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index f3a0bdebce9..65bb48db29d 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -1078,7 +1078,8 @@ else if(sleeping) handle_dreams() adjustHalLoss(-5) - sleeping = max(sleeping-1, 0) + if(mind.active || immune_to_ssd) + sleeping = max(sleeping-1, 0) blinded = 1 stat = UNCONSCIOUS if( prob(10) && health && !hal_crit ) diff --git a/code/modules/mob/living/logout.dm b/code/modules/mob/living/logout.dm index b766df1b4bd..0391fa5dbf9 100644 --- a/code/modules/mob/living/logout.dm +++ b/code/modules/mob/living/logout.dm @@ -2,3 +2,5 @@ ..() if(!key && mind) //key and mind have become seperated. mind.active = 0 //This is to stop say, a mind.transfer_to call on a corpse causing a ghost to re-enter its body. + if(!immune_to_ssd && sleeping < 2) + sleeping = 2 diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index f28dc77e2e7..a92c19b2b94 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -223,3 +223,5 @@ var/has_limbs = 1 //Whether this mob have any limbs he can move with var/can_stand = 1 //Whether this mob have ability to stand + + var/immune_to_ssd = 0