From 9e38a049f76160b6ca752ff17eefee9e415c0ac7 Mon Sep 17 00:00:00 2001 From: Aurorablade Date: Wed, 8 Feb 2017 11:45:50 -0500 Subject: [PATCH] REEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE --- code/modules/mob/living/status_procs.dm | 4 ++++ code/modules/mob/mob_helpers.dm | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/status_procs.dm b/code/modules/mob/living/status_procs.dm index 402f94e837e..7dc2d1b8d58 100644 --- a/code/modules/mob/living/status_procs.dm +++ b/code/modules/mob/living/status_procs.dm @@ -103,6 +103,7 @@ // Booleans var/resting = FALSE + var/rest_CD = 0 /* STATUS EFFECTS @@ -140,12 +141,15 @@ /mob/living/proc/StartResting(updating = 1) var/val_change = !resting resting = TRUE + rest_CD = world.time + 20//this is for tracking it for the verb + to_chat(src, "You are now resting.") if(updating && val_change) update_canmove() /mob/living/proc/StopResting(updating = 1) var/val_change = !!resting resting = FALSE + to_chat(src, "You are now getting up.") if(updating && val_change) update_canmove() diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 95fce0b9399..dc33990dcca 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -361,9 +361,10 @@ var/list/intents = list(I_HELP,I_DISARM,I_GRAB,I_HARM) set name = "Rest" set category = "IC" - resting = !resting - update_canmove() - to_chat(src, "You are now [resting ? "resting" : "getting up"].") + if(!resting) + StartResting() + else if(resting && !(rest_CD > world.time)) + StopResting() /proc/is_blind(A) if(iscarbon(A))