ID:273732
 
Currently my inventory code looks like this :

    Stat()
statpanel("Inventory")
stat("Current Weapon : ",Weapon)
stat(contents)


This means that when I use this code... :

obj/Equipable
verb
Equip()
set src in usr
usr.Weapon = src


The weapon is displayed above the contents which is great. However the original object is still in the user contents and thus displayed underneath still. What would be the best way to make it disappear from contents when it is equipped and visible again when equipped?

Thanks heaps :D I find these small issues really annoying.
You could in your equip proc. remove it from the contents all together with contents -= src. and add it to weapon.
or when doing the output of items in the stapanel use a for loop/

stat()
statpanel("invent")
stat("wep", weapon)
for(var/a in contents)
if(a == weapon) continue //eh cant remember if thats right or not atm
stat(a)
In response to Midgetbuster
Awesome, thanks for that.