obj
NejiSuit
name = "Neji Suit"
icon = 'Clothes.dmi'
icon_state = "NejiSuit"
worn = 0
price = 4500
verb
Drop()
set category = null
if(src:worn == 1)
usr << "Not while its being worn."
if(src:worn == 0)
src.loc=locate(usr.x,usr.y-1,usr.z)
usr.UpdateInv()
usr.SaveK()
Get()
set category = null
set src in oview(1)
src.loc = usr
usr<<"You picked up a [src]"
usr.UpdateInv()
usr.SaveK()
Delete()
set category = null
if(src:worn == 1)
usr << "Not while its being worn."
else
del(src)
usr.SaveK()
usr.UpdateInv()
Click()
if(src.worn == 1)
src:worn = 0
usr.overlays -= 'Clothes.dmi'
usr.icon_state = "NejiSuit"
usr << "You remove the [src.name]."
src.suffix = ""
else
src:worn = 1
usr.overlays += 'Clothes.dmi'
usr.icon_state = "NejiSuit"
usr << "You wear the [src.name]."
src.suffix = "Equipped"
Problem description:
The Problem with this code is that the icon state isnt specified to a single icon within the Clothes.dmi, if i want to wear two items of clothing, it removes the first and puts the second on (im just mucking around coding with this source, learning for when i want to code properly)
i cant find how to fix this anywhere :\
i have made a few modifications to the original coding too
The solution is probably to check if you're wearing something already and if so, remove it and equip the new clothes.