Merge pull request #11804 from Akrilla/beepsky-tie

Fixes beepsky ziptie weirdness
This commit is contained in:
Ghom
2020-04-11 13:40:24 +02:00
committed by GitHub
@@ -235,10 +235,11 @@ Auto Patrol: []"},
playsound(src, 'sound/weapons/cablecuff.ogg', 30, TRUE, -2)
C.visible_message("<span class='danger'>[src] is trying to put zipties on [C]!</span>",\
"<span class='userdanger'>[src] is trying to put zipties on you!</span>")
addtimer(CALLBACK(src, .proc/attempt_handcuff, C), 60)
if(do_after(src, 60, FALSE, C))
attempt_handcuff(C)
/mob/living/simple_animal/bot/secbot/proc/attempt_handcuff(mob/living/carbon/C)
if( !on || !Adjacent(C) || !isturf(C.loc) ) //if he's in a closet or not adjacent, we cancel cuffing.
if (!on)
return
if(!C.handcuffed)
C.handcuffed = new /obj/item/restraints/handcuffs/cable/zipties/used(C)