//Clothing/Hand
obj/item/equipment/clothing/hand/gloves
icon = 'Clothing.dmi'
icon_state = "Gloves"
layer = 100
DblClick()
if(usr.handslot == 0)
usr.overlays += list(new/obj/item/equipment/clothing/hand/gloves)
usr.handslot = 1
usr.def += 0
else
usr << "NO"
//Clothing/Hand
But I would like to make a proc to replace the
usr.overlays += list(new/obj/item/equipment/clothing/hand/gloves)
More specifically I wish to use something that can call the obj path as to simplify that part of it to make adding more /hand/ items easier but my problem is I'm not sure where to start if I wanted to make said proc.
I'm not asking for someone to make the proc for me I just want someone to tell me where to begin...
If that isn’t quite what you’re looking for then I may have misunderstood your question.
EDIT: I see you’re adding a copy of the same object to the overlays when clicked. Why don’t you just add the object itself that is being clicked?
Simply doing usr.overlays += src should achieve the same result, and allow you to actually remove the overlay later because you have a direct reference to it.