ID:1250961
 
(See the best response by Stephen001.)
Code:
obj
LeafJSuit
name = "Leaf Jounin Suit"
icon = 'JouninSuits.dmi'
icon_state="Leaf"
layer = 3
worn = 0
verb
Equip()
if(!src.worn)
src.worn = 1
usr<<"<font face=verdana size = 1 color = white>You equip [src]"
usr.overlays+=/obj/LeafJSuit/
return

else
src.worn = 0
usr<<"<font face=verdana size = 1 color = white>You unequip [src]"
usr.overlays-=/obj/LeafJSuit/
return

Get()
set src in oview(1)
src.loc = usr


Problem description:
Why is it that when I equip the obj then I use 'reconnect' the object still overlays the mob. The problem is whenever I reconnect while the object is equipped, then I try to unequip the suit overlay still stays even though I unequipped it.
Instead of using /obj/blah, just use src instead. Also, you're unable to remove it because there isn't a reference saved to whether or not the object is equipped.
So like, how would I show the save reference thing for it not to overlay permanently? I didn't make the worn var like
tmp/worn = 0
so it will save. :/
In response to Mitz001
You could create a list that holds all of your equipped items. On character load you can restore all items from the list.
Hmm can you give me an example on how overlays are being saved as you log out?
Best response
Right, I'm gonna be honest, my actual practical experience here is limited (I don't actually make games, go figure), so be warned. Here's what I understand to happen:

When you save the player's icon, the overlays/underlays are squashed together, to form one icon to be saved. So consequently when it loads, you just have the one merged icon, not the full overlays / underlays lists.

I assume, this object is in the player's contents when you save? Given that, you should basically do the following:

Don't save the overlays and underlays lists directly (I'll leave this for you to figure out). Instead, keep a separate list of the objects that belong in overlays/underlays and build the list again when you load up.

In your specific example:

obj
LeafJSuit
name = "Leaf Jounin Suit"
icon = 'JouninSuits.dmi'
icon_state="Leaf"
layer = 3
worn = 0
verb
Equip()
if(!src.worn)
src.worn = 1
usr<<"<font face=verdana size = 1 color = white>You equip [src]"
usr.overlays += src
return

else
src.worn = 0
usr<<"<font face=verdana size = 1 color = white>You unequip [src]"
usr.overlays -= src
return

Get()
set src in oview(1)
src.loc = usr

mob
player
Read(savefile/F)
..(F)
for (var/obj/LeafJSuit/suit in src.contents)
if (suit.worn)
src.overlays += suit


Now, this basically only works for this specific item, you probably want to improve your object hierarchy a little, so that anything 'equippable' is a child of the same type, like ...

obj
equippable
worn = 0

verb
Equip()
if(!src.worn)
usr<<"<font face=verdana size = 1 color = white>You equip [src]"
usr.overlays += src
else
usr<<"<font face=verdana size = 1 color = white>You unequip [src]"
usr.overlays -= src
src.worn = !src.worn

Get()
set src in oview(1)
src.loc = usr


obj
equippable
LeafJSuit
name = "Leaf Jounin Suit"
icon = 'JouninSuits.dmi'
icon_state="Leaf"
layer = 3

mob
player
Read(savefile/F)
..(F)
for (var/obj/equippable/E in src.contents)
if (E.worn)
src.overlays += E
Did they change how overlays work recently? I know they compress the overlays but not into one icon. I think the issue was just using the items path instead of src. I'm actually surprised using the path in that way even worked.
Using the path works essentially because it's a static representation, ideal for the "snapshot" behaviour that's used on objects also to grab the icon you need to build the overlay.

The issue on load however, would be the same for static types as it is for objects. The overlays list does not contain full objects, so it does not save full objects. On load, it has no notion of what objects were taken as a snapshot to help build the overall overlay icon.

I'm not aware of any changes in this area particularly. I worked back over the release notes to 490 and didn't see any mention. I'd imagine that it would've been a mentionable change? The "as one icon" behaviour is pretty much age-old.
In response to Stephen001
That's right, but I myself refrain from saving contents or any icon data in savefiles.
I see. I fixed the problem~ thanks for the help.
Could you post what fixed it, in case someone else runs into a similar issue?
And/or vote for the most helpful answer. It's a touch difficult for others to work out what did it, and it is a common enough issue that people would search this topic up looking for answers.