ID:162445
 
Well, i want to be able to change the menu that shows up when you right click something, and allow it to have anything i want in it, such as say a button that says clone on items, and lets say i want clone at bottom, i can also set the order.

etc...
any way to do this?
That's just a verb with a src setting.
To make a verb show up in the right click window for an object, make the verb belong to the object.
atom/verb
Clone(mob/m)
set category = null //Make is only appear in right click menu
set src in view()
var/atom/movable/a = new type() //Make a new object of the same type
for(var/v in vars) //Copy its stats
a.vars[v] = vars[v]
a.loc = m.loc
//Since you copied all its stats it would show up
// where the other one already is, so make it show
// up where you are instead

You can't change the order the verbs show up, I think it is alphabetical.
In response to Asielen
This won't do. You aren't checking for lists, which would cause the cloned atom's variables to refer to the same lists the original atom does, or even completely mess up one of the lists in the original atom (such as <code>contents</code>). You might also ignore temporary variables (you can check that using <code>issaved()</code>).
In response to DivineO'peanut
It should give him some idea of what to do.

He could just use this.
In response to Asielen
that link seems to be item duplication, i know how to make verbs show up and all, but i wanna be able to edit the order verbs show up in once you right click it, and then edit which ones will appear there, because some verbs i have coded for some reason wont show up there, and you have to click them, and etc....