equips
verb
get()
set src in oview(1,usr)
set category = null
if (src.Move(usr))
usr<< "<b> You picked up [src.name]!</b>"
Drop()
set src in usr.contents
set category = null
if (src.Move(usr.loc))
usr<<"<b> You dropped [src.name]!</b>"
proc
equip()
DblClick()
if((src in usr.inventory))
src.equip()
clothing
equip()
var/mob/User=src.loc
if(User)
if(ismob(User))
if((src in User.equipped))
src.suffix=""
User.overlays-=src.icon
User<<"<b> You unequip the [src.name].</b>"
User.equipped.Remove(src,null)
else
src.suffix= "<Equipped>"
User.overlays+=src.icon
User<<"<b>You equip the [src.name].</b>"
User.equipped.Add(src)
cape
icon='Objects.dmi'
icon_state="cape"
equip()
..()
Problem description:
I've been learning how to setup an equip system for my inventory screen and I have ran into a few issues not sure why its not working correctly.
The first problem is DblClick() "when I double click the item it wont use the equip() proc for some reason", "If at all possible is there a way I can make a verb saying equip and then set up a Else verb to unequip items."
The 2nd problem is the icon overlay (through setting up a verb to make the proc just happen) The icon wont overlay which is a cape over the players sprite. I have tried other expressions but nothings overlaying and cant really test taking away the overlaying if the thing will not work in general.
"I'm sort of a newbie to programming on byond code and have been learning from resources and the blue book so very sorry to bother if this is a simple task" ^^ thanks for any advice or help..