From f402b6bfe40c4aa0633e1e4ab29096d572e39ad5 Mon Sep 17 00:00:00 2001 From: Zelacks Date: Fri, 15 Aug 2014 01:34:22 +0800 Subject: [PATCH] tie fix i mean i guess this fix is okay --- code/modules/clothing/clothing.dm | 8 ++++---- code/modules/clothing/under/ties.dm | 9 +-------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 99265d6cf6f..24ed95bca8c 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -170,18 +170,18 @@ BLIND // can't see anything attachTie(I, user) ..() -/obj/item/clothing/under/proc/attachTie(obj/item/I, mob/user) +/obj/item/clothing/under/proc/attachTie(obj/item/I, mob/user, notifyAttach = 1) if(istype(I, /obj/item/clothing/tie)) if(hastie) if(user) user << "[src] already has an accessory." - return + return 0 else if(user) user.drop_item() hastie = I I.loc = src - if(user) + if(user && notifyAttach) user << "You attach [I] to [src]." I.transform *= 0.5 //halve the size so it doesn't overpower the under I.pixel_x += 8 @@ -194,7 +194,7 @@ BLIND // can't see anything var/mob/living/carbon/human/H = loc H.update_inv_w_uniform(0) - return + return 1 /obj/item/clothing/under/examine() diff --git a/code/modules/clothing/under/ties.dm b/code/modules/clothing/under/ties.dm index 0617a258039..92c6e97985a 100644 --- a/code/modules/clothing/under/ties.dm +++ b/code/modules/clothing/under/ties.dm @@ -96,19 +96,12 @@ if(M.w_uniform) var/obj/item/clothing/under/U = M.w_uniform - if(!U.hastie) //Check if he is not already wearing an accessory - user.drop_item() - U.hastie = src - src.loc = U - + if(U.attachTie(src, user, 0)) //Attach it, do not notify the user of the attachment if(user == M) user << "You attach [src] to [U]." else user.visible_message("[user] pins \the [src] on [M]'s chest.", \ "You pin \the [src] on [M]'s chest.") - M.update_inv_w_uniform(0) - - else user << "\The [U] already has an accessory." else user << "Medals can only be pinned on jumpsuits." else ..()