Fixes deleting handcuffs (#33821)

* Fixes deleting handcuffs

* cleanup
This commit is contained in:
ShizCalev
2017-12-26 01:12:40 -05:00
committed by CitadelStationBot
parent 072e5b32ae
commit 3ea4e84719
4 changed files with 15 additions and 15 deletions
+13
View File
@@ -1,6 +1,19 @@
/obj/item/restraints
breakouttime = 600
/obj/item/restraints/Destroy()
if(iscarbon(loc))
var/mob/living/carbon/M = loc
if(M.handcuffed == src)
M.handcuffed = null
M.update_handcuffed()
if(M.buckled && M.buckled.buckle_requires_restraints)
M.buckled.unbuckle_mob(M)
if(M.legcuffed == src)
M.legcuffed = null
M.update_inv_legcuffed()
return ..()
//Handcuffs
/obj/item/restraints/handcuffs
@@ -32,10 +32,6 @@
/obj/item/wirecutters/attack(mob/living/carbon/C, mob/user)
if(istype(C) && C.handcuffed && istype(C.handcuffed, /obj/item/restraints/handcuffs/cable))
user.visible_message("<span class='notice'>[user] cuts [C]'s restraints with [src]!</span>")
qdel(C.handcuffed)
C.handcuffed = null
if(C.buckled && C.buckled.buckle_requires_restraints)
C.buckled.unbuckle_mob(C)
qdel(C.handcuffed)
return
else