[MIRROR] Moblity refactor: hands blocked and restrained edition. (#1051)

* Moblity refactor: hands blocked and restrained edition.

* Update carbon_defense.dm

* Update emotes.dm

Co-authored-by: Rohesie <rohesie@gmail.com>
Co-authored-by: Azarak <azarak10@gmail.com>
This commit is contained in:
SkyratBot
2020-09-29 13:57:02 +02:00
committed by GitHub
co-authored by Rohesie Azarak
parent bf45bab485
commit 9be3a7b8f6
79 changed files with 270 additions and 292 deletions
+2 -2
View File
@@ -117,9 +117,9 @@
var/atom/movable/AM = parent
var/mob/AMM = AM
var/kick_us_off
if((ride_check_rider_restrained && M.restrained(TRUE)) || (ride_check_rider_incapacitated && M.incapacitated(TRUE, TRUE)))
if((ride_check_rider_restrained && HAS_TRAIT(M, TRAIT_RESTRAINED)) || (ride_check_rider_incapacitated && M.incapacitated(TRUE, TRUE)))
kick_us_off = TRUE
if(kick_us_off || (istype(AMM) && ((ride_check_ridden_restrained && AMM.restrained(TRUE)) || (ride_check_ridden_incapacitated && AMM.incapacitated(TRUE, TRUE)))))
if(kick_us_off || (istype(AMM) && ((ride_check_ridden_restrained && HAS_TRAIT(AMM, TRAIT_RESTRAINED)) || (ride_check_ridden_incapacitated && AMM.incapacitated(TRUE, TRUE)))))
M.visible_message("<span class='warning'>[M] falls off of [AM]!</span>", \
"<span class='warning'>You fall off of [AM]!</span>")
AM.unbuckle_mob(M)
+1 -1
View File
@@ -81,7 +81,7 @@
to_chat(user, "<span class='warning'>You're too angry to remember how to tackle!</span>")
return
if(user.restrained())
if(HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))
to_chat(user, "<span class='warning'>You need free use of your hands to tackle!</span>")
return