Fixed buckled, handcuffed and legcuffed alert buttons not calling resist.

This commit is contained in:
xxalpha
2015-11-02 18:57:52 +00:00
parent 282dae922e
commit c313bd2c46
4 changed files with 7 additions and 12 deletions
+4 -9
View File
@@ -303,24 +303,19 @@ so as to remain in compliance with the most up-to-date laws."
//OBJECT-BASED
/obj/screen/alert/buckled
/obj/screen/alert/restrained/buckled
name = "Buckled"
desc = "You've been buckled to something and can't move. Click the alert to unbuckle unless you're handcuffed."
/obj/screen/alert/handcuffed
/obj/screen/alert/restrained/handcuffed
name = "Handcuffed"
desc = "You're handcuffed and can't act. If anyone drags you, you won't be able to move. Click the alert to free yourself."
/obj/screen/alert/handcuffed/Click()
if(isliving(usr))
var/mob/living/L = usr
return L.resist()
/obj/screen/alert/legcuffed
/obj/screen/alert/restrained/legcuffed
name = "Legcuffed"
desc = "You're legcuffed, which slows you down considerably. Click the alert to free yourself."
/obj/screen/alert/legcuffed/Click()
/obj/screen/alert/restrained/Click()
if(isliving(usr))
var/mob/living/L = usr
return L.resist()
+1 -1
View File
@@ -42,7 +42,7 @@
buckled_mob = M
M.update_canmove()
post_buckle_mob(M)
M.throw_alert("buckled", /obj/screen/alert/buckled, new_master = src)
M.throw_alert("buckled", /obj/screen/alert/restrained/buckled, new_master = src)
return 1
@@ -396,7 +396,7 @@ Please contact me on #coderbus IRC. ~Carnie x
if(legcuffed)
overlays_standing[LEGCUFF_LAYER] = image("icon"='icons/mob/mob.dmi', "icon_state"="legcuff1", "layer"=-LEGCUFF_LAYER)
apply_overlay(LEGCUFF_LAYER)
throw_alert("legcuffed", /obj/screen/alert/legcuffed, new_master = src.legcuffed)
throw_alert("legcuffed", /obj/screen/alert/restrained/legcuffed, new_master = src.legcuffed)
/mob/living/carbon/human/update_hud() //TODO: do away with this if possible
@@ -134,7 +134,7 @@
drop_r_hand()
drop_l_hand()
stop_pulling() //TODO: should be handled elsewhere
throw_alert("handcuffed", /obj/screen/alert/handcuffed, new_master = src.handcuffed)
throw_alert("handcuffed", /obj/screen/alert/restrained/handcuffed, new_master = src.handcuffed)
if(hud_used) //hud handcuff icons
var/obj/screen/inventory/R = hud_used.r_hand_hud_object
var/obj/screen/inventory/L = hud_used.l_hand_hud_object