From 57ef5e93a1fefb4ead7f304f678dbbaa0c721b8c Mon Sep 17 00:00:00 2001 From: Tastyfish Date: Mon, 26 Dec 2011 05:34:34 -0500 Subject: [PATCH] fixes to coats --- code/game/objects/storage/coat.dm | 36 ++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/code/game/objects/storage/coat.dm b/code/game/objects/storage/coat.dm index cab3c8bfd02..65d7e8697e4 100644 --- a/code/game/objects/storage/coat.dm +++ b/code/game/objects/storage/coat.dm @@ -33,10 +33,30 @@ user.client.screen -= src.closer user.client.screen -= src.contents -/obj/item/clothing/suit/storage/MouseDrop(atom/A) - if(istype(A,/mob/living/carbon)) - src.view_inv(A) - src.orient_objs(7,7,9,7) +/obj/item/clothing/suit/storage/MouseDrop(atom/over_object) + if(ishuman(usr)) + var/mob/living/carbon/human/M = usr + if (!( istype(over_object, /obj/screen) )) + return ..() + playsound(src.loc, "rustle", 50, 1, -5) + if ((!( M.restrained() ) && !( M.stat ) && M.wear_suit == src)) + if (over_object.name == "r_hand") + if (!( M.r_hand )) + M.u_equip(src) + M.r_hand = src + else + if (over_object.name == "l_hand") + if (!( M.l_hand )) + M.u_equip(src) + M.l_hand = src + M.update_clothing() + src.add_fingerprint(usr) + return + if(over_object == usr && in_range(src, usr) || usr.contents.Find(src)) + src.view_inv(over_object) + src.orient_objs(7,7,9,7) + return + return /obj/item/clothing/suit/storage/attackby(obj/item/weapon/W as obj, mob/user as mob) if(W.w_class > 2 || src.loc == W ) @@ -76,13 +96,13 @@ /obj/item/clothing/suit/storage/proc/orient2hud(mob/user as mob) if (src == user.l_hand) - src.orient_objs(3, 11, 3, 9) + src.orient_objs(3, 5, 3, 3) else if (src == user.r_hand) - src.orient_objs(1, 11, 1, 9) + src.orient_objs(1, 5, 1, 3) else if (istype(user,/mob/living/carbon/human) && src == user:wear_suit) - src.orient_objs(1, 11, 3, 11) + src.orient_objs(1, 3, 3, 3) else - src.orient_objs(4, 10, 4, 8) + src.orient_objs(4, 4, 4, 2) return /obj/item/clothing/suit/storage/proc/orient_objs(tx, ty, mx, my)