Equip()
set src in usr.contents
usr.icon_state = "playersword"
src.icon_state = "swordequip"
usr.overlays += src
..()
UnEquip(var/mob/User)
User.icon_state = "player"
src.icon_state = "sword"
User.overlays -= src
..()
Problem description:
Either I'm missing something about the way overlays work or BYOND is glitching. The overlay doesn't go away. The icon in the player's inventory changes, but the overlay remains, so I tried using my overlay class
Overlays
icon = 'Overlays.dmi'
parent_type = /obj
RedBox
icon_state = "redbox"
Sword_Overlay
icon = 'Equipment.dmi'
icon_state = "swordequip"
layer = 5
And adding it by type, but that also failed to remove the overlay.