Fixed footcuff creation glitch

Before this fix, you could  make multiple shackled orange shoes from a single pair
of handcuffs because the pair of handcuffs was never removed from the user's
inventory before it got added to the shoes' contents.
This commit is contained in:
Melvin Kicchi
2014-09-17 18:01:04 +02:00
parent 6621dde3e3
commit d20eb6e2cc

View File

@@ -86,29 +86,32 @@
item_color = "orange"
var/obj/item/weapon/handcuffs/chained = null
/obj/item/clothing/shoes/orange/proc/attach_cuffs(var/obj/item/weapon/handcuffs/cuffs)
/obj/item/clothing/shoes/orange/proc/attach_cuffs(var/obj/item/weapon/handcuffs/cuffs, mob/user as mob)
if (src.chained) return
user.drop_item()
cuffs.loc = src
src.chained = cuffs
src.slowdown = 15
src.icon_state = "orange1"
/obj/item/clothing/shoes/orange/proc/remove_cuffs()
/obj/item/clothing/shoes/orange/proc/remove_cuffs(mob/user as mob)
if (!src.chained) return
src.chained.loc = get_turf(src)
user.put_in_hands(src.chained)
src.chained.add_fingerprint(user)
src.slowdown = initial(slowdown)
src.icon_state = "orange"
src.chained = null
/obj/item/clothing/shoes/orange/attack_self(mob/user as mob)
..()
remove_cuffs()
remove_cuffs(user)
/obj/item/clothing/shoes/orange/attackby(H as obj, mob/user as mob)
..()
if (istype(H, /obj/item/weapon/handcuffs))
attach_cuffs(H)
attach_cuffs(H, user)