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
@@ -55,14 +55,12 @@
/obj/effect/proc_holder/changeling/biodegrade/proc/dissolve_handcuffs(mob/living/carbon/human/user, obj/O)
if(O && user.handcuffed == O)
user.visible_message("<span class='warning'>[O] dissolve[O.gender==PLURAL?"":"s"] into a puddle of sizzling goop.</span>")
user.uncuff()
new /obj/effect/decal/cleanable/greenglow(O.drop_location())
qdel(O)
/obj/effect/proc_holder/changeling/biodegrade/proc/dissolve_straightjacket(mob/living/carbon/human/user, obj/S)
if(S && user.wear_suit == S)
user.visible_message("<span class='warning'>[S] dissolves into a puddle of sizzling goop.</span>")
user.uncuff()
new /obj/effect/decal/cleanable/greenglow(S.drop_location())
qdel(S)
+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
+2 -9
View File
@@ -365,16 +365,9 @@
to_chat(src, "<span class='notice'>You successfully [cuff_break ? "break" : "remove"] [I].</span>")
if(cuff_break)
. = !((I == handcuffed) || (I == legcuffed))
qdel(I)
if(I == handcuffed)
handcuffed = null
update_handcuffed()
return
else if(I == legcuffed)
legcuffed = null
update_inv_legcuffed()
return
return TRUE
return
else
if(I == handcuffed)