Merge pull request #41262 from ShizCalev/canusetopic

Fixes mobs being able to use UIs, pull other mobs, use items, ect, while handcuffed
This commit is contained in:
oranges
2018-11-01 09:13:04 +13:00
committed by GitHub
2 changed files with 8 additions and 2 deletions
+1
View File
@@ -783,6 +783,7 @@
update_action_buttons_icon() //some of our action buttons might be unusable when we're handcuffed.
update_inv_handcuffed()
update_hud_handcuffed()
update_mobility()
/mob/living/carbon/fully_heal(admin_revive = FALSE)
if(reagents)
+7 -2
View File
@@ -981,6 +981,7 @@
var/stat_conscious = (stat == CONSCIOUS) || stat_softcrit
var/conscious = !IsUnconscious() && stat_conscious && !has_trait(TRAIT_DEATHCOMA)
var/chokehold = pulledby && pulledby.grab_state >= GRAB_NECK
var/restrained = restrained()
var/has_legs = get_num_legs()
var/has_arms = get_num_arms()
var/paralyzed = IsParalyzed()
@@ -996,13 +997,17 @@
var/canstand = canstand_involuntary && !resting
if(canstand)
mobility_flags |= (MOBILITY_STAND | MOBILITY_UI | MOBILITY_PULL)
mobility_flags |= MOBILITY_STAND
lying = 0
if(!restrained)
mobility_flags |= (MOBILITY_UI | MOBILITY_PULL)
else
mobility_flags &= ~(MOBILITY_UI | MOBILITY_PULL)
else
mobility_flags &= ~(MOBILITY_STAND | MOBILITY_UI | MOBILITY_PULL)
if(!lying)
lying = pick(90, 270)
var/canitem = !paralyzed && !stun && conscious && !chokehold && has_arms
var/canitem = !paralyzed && !stun && conscious && !chokehold && !restrained && has_arms
if(canitem)
mobility_flags |= (MOBILITY_USE | MOBILITY_PICKUP | MOBILITY_STORAGE)
else