obj
//blah blah icons and the like
verb
equip()
if(src in usr.contents)
if(usr.wearing)
return
else
usr.red = src.red
usr.green = src.green
usr.blue = src.blue
var/obj/clothes/robestop/T = new()
T.icon += rgb(usr.red,usr.green,usr.blue)
var/obj/robesbottom/B = new()
//B.icon += rgb(usr.red,usr.green,usr.blue)
usr.overlays += T //adding the overlay for the top icon
usr.overs.Add(T) //add it to the list for removal when saving
usr.overlays += B
usr.overs.Add(B)
usr.clothest = T //for removing the overlay
usr.clothesb = B
now, this works fine, however, I'd like to turn this into a proc so i can re-use the code, the only thing that would need changing is the "var/obj/clothes/robestop/T".
How can I turn it from a verb used on every item into a proc that i can re-use?
Thanks,
Farkas