ID:145743
 
I had this problem a long while back, I can't remember how to fix it though.

My overlays are unremovable because saving melds them into the icon, how is this fixed? I forget.

Saving doesn't melt them on. Ex; for an Unequip verb, when you remove the path or file of the overlays it goes off. (For me it does o.o). Another way would be to save the mobs original icon.
mob/var/origicon
mob/verb/Add_Overlay()
usr.origicon=usr.icon
usr.overlays+='overlay.dmi'
mob/verb/Delete_Overlay()
usr.icon=usr.origicon
//or
usr.overlays-='overlay.dmi'
In response to Mysame
Ill try that, thanks a million.
In response to Mysame
Of course, adding and removing overlays with a special verb would be ridiculous. Doing so via a proc, where you'd be using src instead of usr, would not be.

Lummox JR
In response to Lummox JR
That was an example... o.o
In response to Jermman
If you want to remove all the overlays you should try:
 for(var/overlay in src.overlays)
src.overlays-=overlay
In response to Blakdragon77
I don't think you can loop through overlays like that. To get rid of all of the overlays you can set src.overlays to null.
In response to Kalzar
Ive tried the loop, it seems to be removing them in my test. src.overlays = null sometimes doesnt remove the overlays (according to my games). Your overlays are a list, and it goes into that list and takes each overlay, so it should work.
atom
var
list/Overlays=list()
list/Underlays=list()

proc
update()
updateOverlays()
updateUnderlays()
updateOverlays()
overlays=null
for(var/i in Overlays)
overlays+=i
updateUnderlays()
underlays=null
for(var/i in Underlays)
underlays+=i
New(){..(); update()}
Del(){overlays=null; underlays=null; ..()}

It's fixed like that. Instead of adding objects to the overlays/underlays list, add them to the Overlays/Underlays list then call the corresponding updating procedure.
In response to Crashed
What about using overlays.Cut()?
In response to Mysame
Mysame wrote:
That was an example.

I know, but it's still goofy to give a verb example in a situation that clearly calls for a proc.

Lummox JR