let's make this work
This commit is contained in:
@@ -10,10 +10,13 @@
|
||||
|
||||
//Force-set resting variable, without needing to resist/etc.
|
||||
/mob/living/proc/set_resting(new_resting, silent = FALSE, updating = TRUE)
|
||||
resting = new_resting
|
||||
if(!silent)
|
||||
to_chat(src, "<span class='notice'>You are now [resting? "resting" : "getting up"].</span>")
|
||||
update_resting(updating)
|
||||
if(new_resting != resting)
|
||||
resting = new_resting
|
||||
if(!silent)
|
||||
to_chat(src, "<span class='notice'>You are now [resting? "resting" : "getting up"].</span>")
|
||||
update_resting(updating)
|
||||
if(has_gravity() && resting)
|
||||
playsound(src, "bodyfall", 20, 1)
|
||||
|
||||
/mob/living/proc/update_resting(update_mobility = TRUE)
|
||||
if(update_mobility)
|
||||
@@ -168,8 +171,7 @@
|
||||
//Handle lying down, voluntary or involuntary
|
||||
density = !lying
|
||||
if(lying)
|
||||
if(!lying_prev)
|
||||
set_resting(TRUE, TRUE, FALSE)
|
||||
set_resting(TRUE, TRUE, FALSE)
|
||||
if(layer == initial(layer)) //to avoid special cases like hiding larvas.
|
||||
layer = LYING_MOB_LAYER //so mob lying always appear behind standing mobs
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user