diff --git a/code/modules/clothing/clothing_accessories.dm b/code/modules/clothing/clothing_accessories.dm
index b0068c61908..85496ee48d5 100644
--- a/code/modules/clothing/clothing_accessories.dm
+++ b/code/modules/clothing/clothing_accessories.dm
@@ -15,19 +15,7 @@
/obj/item/clothing/attackby(var/obj/item/I, var/mob/user)
if(istype(I, /obj/item/clothing/accessory))
-
- if(!valid_accessory_slots || !valid_accessory_slots.len)
- usr << "You cannot attach accessories of any kind to \the [src]."
- return
-
- var/obj/item/clothing/accessory/A = I
- if(can_attach_accessory(A))
- user.drop_item()
- attach_accessory(user, A)
- return
- else
- user << "You cannot attach more accessories of this type to [src]."
- return
+ attempt_attach_accessory(I, user)
if(accessories.len)
for(var/obj/item/clothing/accessory/A in accessories)
@@ -79,10 +67,19 @@
* user is the user doing the attaching. Can be null, such as when attaching
* items on spawn
*/
-/obj/item/clothing/proc/update_accessory_slowdown()
- slowdown = initial(slowdown)
- for(var/obj/item/clothing/accessory/A in accessories)
- slowdown += A.slowdown
+/obj/item/clothing/proc/attempt_attach_accessory(mob/user, obj/item/clothing/accessory/A)
+ if(!valid_accessory_slots || !valid_accessory_slots.len)
+ to_chat(user, "You cannot attach accessories of any kind to \the [src].")
+ return FALSE
+
+ var/obj/item/clothing/accessory/acc = A
+ if(can_attach_accessory(acc))
+ user.drop_item()
+ attach_accessory(user, acc)
+ return TRUE
+ else
+ to_chat(user, "You cannot attach more accessories of this type to [src].")
+ return FALSE
/obj/item/clothing/proc/attach_accessory(mob/user, obj/item/clothing/accessory/A)
accessories += A
@@ -100,6 +97,11 @@
update_accessory_slowdown()
update_clothing_icon()
+/obj/item/clothing/proc/update_accessory_slowdown()
+ slowdown = initial(slowdown)
+ for(var/obj/item/clothing/accessory/A in accessories)
+ slowdown += A.slowdown
+
/obj/item/clothing/proc/removetie_verb()
set name = "Remove Accessory"
set category = "Object"
diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm
index 871145d8a9d..b6c9cd81b07 100644
--- a/code/modules/mob/living/carbon/human/inventory.dm
+++ b/code/modules/mob/living/carbon/human/inventory.dm
@@ -32,7 +32,6 @@ This saves us from having to call add_fingerprint() any time something is put in
qdel(W)
return null
-
/mob/living/carbon/human/proc/has_organ(name)
var/obj/item/organ/external/O = organs_by_name[name]
return (O && !O.is_stump())
@@ -318,9 +317,12 @@ This saves us from having to call add_fingerprint() any time something is put in
W.loc = src.back
if(slot_tie)
for(var/obj/item/clothing/C in worn_clothing)
- C.attackby(W, usr)
+ if(istype(W, /obj/item/clothing/accessory))
+ var/obj/item/clothing/accessory/A = W
+ if(C.attempt_attach_accessory(usr, A))
+ return
else
- src << "You are trying to eqip this item to an unsupported inventory slot. How the heck did you manage that? Stop it..."
+ src << "You are trying to equip this item to an unsupported inventory slot. How the heck did you manage that? Stop it..."
return
if((W == src.l_hand) && (slot != slot_l_hand))