let's make this work

This commit is contained in:
kevinz000
2020-02-19 07:20:16 -07:00
parent 950082f537
commit 4a537d770d
6 changed files with 19 additions and 13 deletions
+1 -1
View File
@@ -88,7 +88,7 @@
var/they_can_move = TRUE
if(isliving(M))
var/mob/living/L = M
they_can_move = L.canmove //L.mobility_flags & MOBILITY_MOVE
they_can_move = L.mobility_flags & MOBILITY_MOVE
//Also spread diseases
for(var/thing in diseases)
var/datum/disease/D = thing
+8 -6
View File
@@ -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
@@ -41,7 +41,7 @@
AIproc = 1
while(AIproc && stat != DEAD && (attacked || hungry || rabid || buckled))
if(!canmove) // !(mobility_flags & MOBILITY_MOVE) //also covers buckling. Not sure why buckled is in the while condition if we're going to immediately break, honestly
if(!(mobility_flags & MOBILITY_MOVE)) //also covers buckling. Not sure why buckled is in the while condition if we're going to immediately break, honestly
break
if(!Target || client)