diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm
index 58b74e5369..f1cbab9eb8 100644
--- a/code/__DEFINES/traits.dm
+++ b/code/__DEFINES/traits.dm
@@ -35,7 +35,7 @@
} \
};\
if (!length(_L[trait])) { \
- _L -= trait \
+ _L -= trait; \
SEND_SIGNAL(target, SIGNAL_TRAIT(trait), COMPONENT_REMOVE_TRAIT); \
}; \
if (!length(_L)) { \
@@ -51,8 +51,8 @@
for (var/_T in _L) { \
_L[_T] &= _S;\
if (!length(_L[_T])) { \
- _L -= _T } \
- SEND_SIGNAL(target, SIGNAL_TRAIT(trait), COMPONENT_REMOVE_TRAIT); \
+ _L -= _T ; \
+ SEND_SIGNAL(target, SIGNAL_TRAIT(_T), COMPONENT_REMOVE_TRAIT); } \
};\
if (!length(_L)) { \
target.status_traits = null\
diff --git a/code/modules/antagonists/bloodsucker/powers/bs_brawn.dm b/code/modules/antagonists/bloodsucker/powers/bs_brawn.dm
index 59fc1e9fd8..cf0393ff3a 100644
--- a/code/modules/antagonists/bloodsucker/powers/bs_brawn.dm
+++ b/code/modules/antagonists/bloodsucker/powers/bs_brawn.dm
@@ -72,7 +72,7 @@
if(rand(5 + powerlevel) >= 5)
target.visible_message("[user] lands a vicious punch, sending [target] away!", \
"[user] has landed a horrifying punch on you, sending you flying!!", null, COMBAT_MESSAGE_RANGE)
- target.DefaultCombatKnockdownKnockdown(min(5, rand(10, 10 * powerlevel)) )
+ target.DefaultCombatKnockdown(min(5, rand(10, 10 * powerlevel)) )
// Attack!
playsound(get_turf(target), 'sound/weapons/punch4.ogg', 60, 1, -1)
user.do_attack_animation(target, ATTACK_EFFECT_SMASH)
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index 41bdc6719e..bae7092eca 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -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
diff --git a/code/modules/mob/living/living_mobility.dm b/code/modules/mob/living/living_mobility.dm
index 6f3200dc26..3add61f766 100644
--- a/code/modules/mob/living/living_mobility.dm
+++ b/code/modules/mob/living/living_mobility.dm
@@ -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, "You are now [resting? "resting" : "getting up"].")
- update_resting(updating)
+ if(new_resting != resting)
+ resting = new_resting
+ if(!silent)
+ to_chat(src, "You are now [resting? "resting" : "getting up"].")
+ 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
diff --git a/code/modules/mob/living/simple_animal/slime/life.dm b/code/modules/mob/living/simple_animal/slime/life.dm
index 8097b2224b..d9cf4b2a09 100644
--- a/code/modules/mob/living/simple_animal/slime/life.dm
+++ b/code/modules/mob/living/simple_animal/slime/life.dm
@@ -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)
diff --git a/code/modules/photography/photos/photo.dm b/code/modules/photography/photos/photo.dm
index d51f569738..d45a119553 100644
--- a/code/modules/photography/photos/photo.dm
+++ b/code/modules/photography/photos/photo.dm
@@ -84,8 +84,12 @@
set category = "Object"
set src in usr
+ var/mob/living/L = usr
+ if(!istype(L))
+ return
+
var/n_name = stripped_input(usr, "What would you like to label the photo?", "Photo Labelling", "", MAX_NAME_LEN)
//loc.loc check is for making possible renaming photos in clipboards
- if(n_name && (loc == usr || loc.loc && loc.loc == usr) && usr.stat == CONSCIOUS && usr.canmove && !usr.restrained())
+ if(n_name && (loc == usr || loc.loc && loc.loc == usr) && CHECK_MOBILITY(L, MOBILITY_USE))
name = "photo[(n_name ? text("- '[n_name]'") : null)]"
add_fingerprint(usr)