Merge pull request #4428 from Zelacks/medalssuck

Fixes medals changing size on mob attachment
This commit is contained in:
Alex
2014-08-16 13:49:13 +01:00
2 changed files with 5 additions and 12 deletions
+4 -4
View File
@@ -171,18 +171,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 << "<span class='warning'>[src] already has an accessory.</span>"
return
return 0
else
if(user)
user.drop_item()
hastie = I
I.loc = src
if(user)
if(user && notifyAttach)
user << "<span class='notice'>You attach [I] to [src].</span>"
I.transform *= 0.5 //halve the size so it doesn't overpower the under
I.pixel_x += 8
@@ -195,7 +195,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()
+1 -8
View File
@@ -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 << "<span class='notice'>You attach [src] to [U].</span>"
else
user.visible_message("<span class='notice'>[user] pins \the [src] on [M]'s chest.</span>", \
"<span class='notice'>You pin \the [src] on [M]'s chest.</span>")
M.update_inv_w_uniform(0)
else user << "<span class='warning'>\The [U] already has an accessory.</span>"
else user << "<span class='warning'>Medals can only be pinned on jumpsuits.</span>"
else ..()