mob
Login()
if(src.HasShirt == 1)
src.HasShirt = 1
else
src.HasShirt = 0
return ..()
mob
Logout()
var/savefile/F = new(ckey)
Write(F)
del(src)
mob
var/shirtover = 'basicshirt.dmi'
var/HasShirt
var/shirtcolor
verb
shirtsetting(s as color)
shirtcolor = null
if (HasShirt == 0)
// shirtcolor = null
shirtcolor = s
shirtover += s
src.overlays += shirtover
HasShirt = 1
return
else if (HasShirt == 1)
shirtcolor = null
src.overlays -= shirtover
HasShirt = 0
return
Every time I use this verb this is what happens. The very first color I choose gets set. Then every time I attempt to change it, the color gets lighter and lighter until eventually it turns white. I don't know how to reset the color before using the verb, I tried null it it but... it didnt work. It does save though (although my save system is currenlty suckish instead of saving a short name it saves pages of random characters...it works though)
If you want to reset the shirtover variable, storing its initial value somewhere and then operating on that would be one option. Or, you can just use initial(shirtover), though that's less flexible.
Also, adding color is generally undesirable. Multiplying is usually a better effect.