ID:155941
 
When making equipment do you need to add Equip verb to every obj/Equip-able or is there a shortcut,so i dont need to write out the equip verb on to every piece of armor/weapon/accessory.
As a general rule you should not use a verb inside the object for defining whether something is equipped or not.

mob/proc
Equip(items/Equipment/O)
if(!O || !O.islot) return
if(equipment && equipment[O.islot])
Unequip(equipment[O.islot])
if(equipment && equipment[O.islot]) return // unequip failed
if(!equipment) equipment = new
equipment[O.islot] = O
src << output("You equip [O].","balog")

Unequip(items/Equipment/O)
if(!O || !O.islot) return
if(!equipment || equipment[O.islot]!=O) return // failed
equipment -= O.islot
if(!equipment.len) equipment = null // reclaim the list
src << output("You unequip [O].","balog")

items/equips
Click()
if(src in usr)
usr.Equip(src)
In response to Midgetbuster
O.o aww thx,im new to coding still figuring things out