ID:147901
 
I am having some problems with overlays. I want players to be able to customize what their character wears, but the overlays aren't appearing on the character. Here is all the relevant coding:

mob
icon = 'players.dmi'
icon_state = "person"
Login()
src << "Welcome to Spies."
src << "Do you want a pair of pants or shorts?"
switch(alert("Pants or shorts?",,"Pants","Shorts"))
if("Pants")
src.overlays += /obj/clothes/pants
if("Shorts")
src.overlays += /obj/clothes/shorts
src << "Do you want gloves?"
switch(alert("Gloves or no gloves?",,"Gloves","No Gloves"))
if("Gloves")
src.overlays += /obj/clothes/gloves
if("No Gloves")
src << "You have no gloves."
src << "Do you want boots?"
switch(alert("Boots or no boots?",,"Boots","No boots"))
if("Boots")
src.overlays += /obj/clothes/boots
if("No boots")
src << "You have no boots."
src.overlays += /obj/clothes/shirt
world << "[src] has joined the espionnage game!"
..()


All the objs are defined and have the correct icon/icon states.