mob
proc
strip()
for(var/obj/suit/S in src.contents)//checks for obj in the src copntents
if(S.worn)//if you are wearing it
S.Wear(src)//call the verb u use to wear it, and removes it from player
del(S)//then deletes it
obj
suit
verb
Wear()
if(worn)
usr.overlays-= src/icon
else
usr.overlays+= src/icon
ID:273647
Nov 22 2010, 8:16 pm
|
|
I am wondering how i would remove overlays that are already on the players when i use a proc.e.g
|
Additionally, passing src as an argument to Wear() when it isn't taking any arguments is silly.
Additionally, if you are going to use a verb as a proc (like you are here), then you need to not use usr in it. If you can't avoid using usr in it, then you need to farm off its function to another proc which takes an argument, and just have the verb (and whatever used to be calling the verb as a proc) call that. For example, you'd have:
Oh, and if you're doing this then calling S.Wear(src) would be correct.