Merge remote-tracking branch 'upstream/master' into kiltborg

This commit is contained in:
Zxaber
2020-09-29 03:54:41 -07:00
90 changed files with 335 additions and 331 deletions
+2 -2
View File
@@ -167,8 +167,8 @@
if(LAZYLEN(buckled_mobs) >= max_buckled_mobs)
return FALSE
// If the buckle requires restraints, make sure the target is actually restrained while ignoring grab restraint.
if(buckle_requires_restraints && !target.restrained(TRUE))
// If the buckle requires restraints, make sure the target is actually restrained.
if(buckle_requires_restraints && !HAS_TRAIT(target, TRAIT_RESTRAINED))
return FALSE
return TRUE
+1 -1
View File
@@ -261,7 +261,7 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
set category = "Object"
set src in oview(1)
if(!isturf(loc) || usr.stat || usr.restrained())
if(!isturf(loc) || usr.stat != CONSCIOUS || HAS_TRAIT(usr, TRAIT_HANDS_BLOCKED))
return
if(isliving(usr))
+8 -7
View File
@@ -9,7 +9,7 @@
if(iscarbon(loc))
var/mob/living/carbon/M = loc
if(M.handcuffed == src)
M.handcuffed = null
M.set_handcuffed(null)
M.update_handcuffed()
if(M.buckled && M.buckled.buckle_requires_restraints)
M.buckled.unbuckle_mob(M)
@@ -91,7 +91,7 @@
cuffs = new type()
cuffs.forceMove(target)
target.handcuffed = cuffs
target.set_handcuffed(cuffs)
target.update_handcuffed()
if(trashtype && !dispense)
@@ -238,11 +238,12 @@
return (BRUTELOSS)
/obj/item/restraints/legcuffs/beartrap/attack_self(mob/user)
..()
if(ishuman(user) && !user.stat && !user.restrained())
armed = !armed
update_icon()
to_chat(user, "<span class='notice'>[src] is now [armed ? "armed" : "disarmed"]</span>")
. = ..()
if(!ishuman(user) || user.stat != CONSCIOUS || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))
return
armed = !armed
update_icon()
to_chat(user, "<span class='notice'>[src] is now [armed ? "armed" : "disarmed"]</span>")
/obj/item/restraints/legcuffs/beartrap/proc/close_trap()
armed = FALSE
+1 -1
View File
@@ -57,7 +57,7 @@
/obj/item/paint/anycolor/attack_self(mob/user)
var/t1 = input(user, "Please select a color:", "[src]", null) in sortList(list( "red", "blue", "green", "yellow", "violet", "black", "white"))
if ((user.get_active_held_item() != src || user.stat || user.restrained()))
if ((user.get_active_held_item() != src || user.stat != CONSCIOUS || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED)))
return
switch(t1)
if("red")
+1 -1
View File
@@ -31,7 +31,7 @@
/obj/item/teleportation_scroll/Topic(href, href_list)
..()
if (usr.stat || usr.restrained() || src.loc != usr)
if (usr.stat != CONSCIOUS || HAS_TRAIT(usr, TRAIT_HANDS_BLOCKED) || src.loc != usr)
return
if (!ishuman(usr))
return 1
+1 -1
View File
@@ -80,7 +80,7 @@
/obj/item/storage/secure/Topic(href, href_list)
..()
if ((usr.stat || usr.restrained()) || (get_dist(src, usr) > 1))
if (usr.stat != CONSCIOUS || HAS_TRAIT(usr, TRAIT_HANDS_BLOCKED) || (get_dist(src, usr) > 1))
return
if (href_list["type"])
if (href_list["type"] == "E")
+1 -1
View File
@@ -82,7 +82,7 @@
user.visible_message("<span class='warning'>[user] starts climbing onto [src].</span>", \
"<span class='notice'>You start climbing onto [src]...</span>")
var/adjusted_climb_time = climb_time
if(user.restrained()) //climbing takes twice as long when restrained.
if(HAS_TRAIT(user, TRAIT_HANDS_BLOCKED)) //climbing takes twice as long without help from the hands.
adjusted_climb_time *= 2
if(isalien(user))
adjusted_climb_time *= 0.25 //aliens are terrifyingly fast
+2 -2
View File
@@ -58,7 +58,7 @@
..()
usr.set_machine(src)
if(href_list["remove"])
if((usr.stat || usr.restrained())) //For when a player is handcuffed while they have the notice window open
if(usr.stat != CONSCIOUS || HAS_TRAIT(usr, TRAIT_HANDS_BLOCKED)) //For when a player is handcuffed while they have the notice window open
return
var/obj/item/I = locate(href_list["remove"]) in contents
if(istype(I) && I.loc == src)
@@ -68,7 +68,7 @@
icon_state = "nboard0[notices]"
if(href_list["write"])
if((usr.stat || usr.restrained())) //For when a player is handcuffed while they have the notice window open
if(usr.stat != CONSCIOUS || HAS_TRAIT(usr, TRAIT_HANDS_BLOCKED)) //For when a player is handcuffed while they have the notice window open
return
var/obj/item/P = locate(href_list["write"]) in contents
if(istype(P) && P.loc == src)
+1 -1
View File
@@ -67,7 +67,7 @@
var/users_in_range = 0
for(var/mob/living/L in orange(1,src))
if(L.ckey && L.client)
if((world.time - L.client.inactivity) < (world.time - 300) || L.stat != CONSCIOUS || L.restrained())//no playing with braindeads or corpses or handcuffed dudes.
if((world.time - L.client.inactivity) < (world.time - 300) || L.stat != CONSCIOUS || HAS_TRAIT(L, TRAIT_HANDS_BLOCKED))//no playing with braindeads or corpses or handcuffed dudes.
to_chat(M, "<span class='warning'>[L] doesn't seem to be paying attention...</span>")
else
users_in_range++
@@ -338,7 +338,7 @@
set name = "Flip Windoor Assembly"
set category = "Object"
set src in oview(1)
if(usr.stat || usr.restrained())
if(usr.stat != CONSCIOUS || HAS_TRAIT(usr, TRAIT_HANDS_BLOCKED))
return
if(isliving(usr))