I think this is at least a decent way to do it...if you can think of a way to simplify it please elaborate:)
The problem with this code I suspect is that the object is indexed by its name rather than the object itself..
I'm not sure how to index the object properly..
I wish to be able to equip multiples of the same object in different places..
Here's the relavent code..compiled and runs without errors.. just the bug first mentioned..
equippedItems = list()
equipable = list()
set category = "Actions"
set src in usr.contents
if(usr.equippedItems.Find(src) == 0)
var/whereto = input("Where would you like to equip the [src.name]?","Equip [src.name]","cancel") in src.equipable + "cancel"
if (whereto == "cancel")
usr << "Equip [src.name] cancelled."
usr.equippedItems += src
usr.equipped[src] = whereto
usr << "The [src.name] is now equipped!"
usr << "The [src.name] is already equipped!"