Fixes Shoe Shackle Handcuff Upgrading (#13568)

* Fixes Shoe Shackle Handcuff Upgrading

* better
This commit is contained in:
Fox McCloud
2020-06-07 17:26:23 -06:00
committed by GitHub
parent 033b03f386
commit 38403e1bc7
+20 -16
View File
@@ -86,21 +86,25 @@
name = "orange shoes"
icon_state = "orange"
item_color = "orange"
var/obj/item/restraints/handcuffs/shackles
/obj/item/clothing/shoes/orange/attack_self(mob/user as mob)
if(src.chained)
src.chained = null
src.slowdown = SHOES_SLOWDOWN
new /obj/item/restraints/handcuffs( user.loc )
src.icon_state = "orange"
return
/obj/item/clothing/shoes/orange/Destroy()
QDEL_NULL(shackles)
return ..()
/obj/item/clothing/shoes/orange/attackby(obj/H, loc, params)
..()
if(istype(H, /obj/item/restraints/handcuffs) && !chained && !(H.flags & NODROP))
if(src.icon_state != "orange") return
qdel(H)
src.chained = 1
src.slowdown = 15
src.icon_state = "orange1"
return
/obj/item/clothing/shoes/orange/attack_self(mob/user)
if(shackles)
user.put_in_hands(shackles)
shackles = null
slowdown = SHOES_SLOWDOWN
icon_state = "orange"
/obj/item/clothing/shoes/orange/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/restraints/handcuffs) && !shackles)
if(user.drop_item())
I.forceMove(src)
shackles = I
slowdown = 15
icon_state = "orange1"
return
return ..()