diff --git a/code/modules/clothing/clothing_accessories.dm b/code/modules/clothing/clothing_accessories.dm
index 8f9b94a193..de4556036b 100644
--- a/code/modules/clothing/clothing_accessories.dm
+++ b/code/modules/clothing/clothing_accessories.dm
@@ -13,7 +13,7 @@
/obj/item/clothing/attackby(var/obj/item/I, var/mob/user)
if(istype(I, /obj/item/clothing/accessory))
var/obj/item/clothing/accessory/A = I
- if(attempt_attach_accessory(user, A))
+ if(attempt_attach_accessory(A, user))
return
if(accessories.len)
@@ -66,18 +66,21 @@
* user is the user doing the attaching. Can be null, such as when attaching
* items on spawn
*/
-/obj/item/clothing/proc/attempt_attach_accessory(mob/user, obj/item/clothing/accessory/A)
+/obj/item/clothing/proc/attempt_attach_accessory(obj/item/clothing/accessory/A, mob/user)
if(!valid_accessory_slots || !valid_accessory_slots.len)
- to_chat(user, "You cannot attach accessories of any kind to \the [src].")
+ if(user)
+ 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()
+ if(user)
+ user.drop_item()
attach_accessory(user, acc)
return TRUE
else
- to_chat(user, "You cannot attach more accessories of this type to [src].")
+ if(user)
+ to_chat(user, "You cannot attach more accessories of this type to [src].")
return FALSE
diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm
index b6c9cd81b0..f60a5d6708 100644
--- a/code/modules/mob/living/carbon/human/inventory.dm
+++ b/code/modules/mob/living/carbon/human/inventory.dm
@@ -319,7 +319,7 @@ This saves us from having to call add_fingerprint() any time something is put in
for(var/obj/item/clothing/C in worn_clothing)
if(istype(W, /obj/item/clothing/accessory))
var/obj/item/clothing/accessory/A = W
- if(C.attempt_attach_accessory(usr, A))
+ if(C.attempt_attach_accessory(A))
return
else
src << "You are trying to equip this item to an unsupported inventory slot. How the heck did you manage that? Stop it..."