obj/overlay/torchicon
obj/equippable/Torch
equipped = /obj/overlay/torch
mob/proc/Equip(obj/O)
overlays += O.equipped
mob/proc/Unequip(obj/O)
overlays -= O.equipped
(those should be the only relevant pieces of code- I don't think the save system itself is causing the issue, but just in case it's Evi of Au's save system)
Problem description:
The equipment/overlay system works fine except that when I for example equip a torch and then relog, when I unequip the torch its graphic remains on the character and it's impossible to remove. The equipment system continues to work, but the character permanently has that overlay's graphic blotched on.
I tried manually saving without relogging and it caused no issues, which makes sense considering the save system does not do anything with overlays. I've tried quite a few things, but I haven't found an effective way to fix this.
What is the problem, exactly? Is there a way to fix it that wouldn't require rewriting the way the equipment/overlay system works (var representing the overlay object type)?