ID:139429
 
Code:
mob/verb/Open(var/obj/packs/O in usr.items)


Problem description:

This seems to be shown on every OBJ in the game world. Not just on obj/packs and not just in usr.items.

idgi
No offence, but you're approaching this in completely the wrong way. If you don't mind, what's the 'Open' verb supposed to do?
In response to Kumorii (#1)
Puts the contents of the objects list into your items list.

I suppose I could add verbs to the object itself.... but it seems like a lot of hassle.

Thought I had found a short cut but seems not.

Eitherway, I still do not understand why its showing this on ALL objects.
In response to UnknownDuelist (#2)
I'm not sure I understand what you're trying to do, but try this:

mob/verb/Open()
for(var/obj/packs/O in usr.items)
//Insert whatever you're going to do with 'O' here.
In response to Kumorii (#3)
Trying to have the verb appear on all related objects in the world when I right click it.

This is especially useful for GM level only verbs that would show up on specific objects so I can adjust their values or otherwise.
In response to UnknownDuelist (#4)
Oh.
Something like this?
obj/packs/verb/Open()
set src in usr.items //only gives the verb to the player if the item is in the player's contents.
//set src in oview(1) //switch the above to this one if you want it to be accessed by standing next to the object.


If a verb is shared by more than one objs, you can assign it to all objs on a node/branch like this:
obj/packs
obj1
obj2
obj3
obj4 //even sub-nodes will get the verb.
verb/Open()
set src in usr.items
// [inert what you want to do here]
In response to Kumorii (#5)
That works, good point. Though if the verb is not supposed to be available to everyone in the world, it seems to be more tricky.
In response to UnknownDuelist (#6)
"Though if the verb is not supposed to be available to everyone in the world"
Why don`t you use ckey to decide who can use it ?