ID:138460
 
Remember when you chose a verb and it would give you a cursor to pick what you wanted to execute the verb on? Now it pops up the menu. I sort of need that feature back because with certain verbs, primarily being the one for my pick right now, you are using an object to perform a verb. (i.e. I right click the pick and select use, then it pops up a menu just listing wall, when what I need to do is specify which wall I want to use the pick on) This wouldn't be a problem if every wall in my view had a different name, but seeing as how walls don't typically have much individuality, (I take that back maybe they do, people seem to talk to them alot) I can't choose what wall to dig. Anyways, thanx again, and see about my previous message too.
Well, we can't put that feature back in without disrupting the current interface, but there are other ways to accomplish the goal. One way is to just override Click():

#define PICKING 1
// add other defines for other actions

mob
var/clickstate
verb/pick() // process args later
clickstate = PICKING

proc/processClick(loc)
switch(clickstate)
if(PICKING)
... // do picking action on loc
etc
clickState = 0 // clear it

client/Click(loc)
usr.processClick(loc)


Personally, though, I think a cleaner method would just be attaching the action to the Click() itself:

client/Click(loc)
var/v = prompt("What do you want to do?") as anything|null in list("pick",...)
switch(v)
if("pick")
... // do picking action on loc


Or you could have specialized Click() actions under the different object types, eg:

obj/weapon/Click()
...

I would suggest reading about this particular proc. It is quite powerful in the hands of an able wizard!