View/Edit #12:my_command_menu

Switch to edit mode.

Name(s): my_command_menu
1:  "Return all simple user-callable VR verbs."
2:  {what} = args
3:  commands = {}
4:  o = this
5:  while (o != $connectable)
6:    for v in (verbs(o))
7:      va = verb_args(o, v)
8:      command = ""
9:      if (v[1] == "@")
10:       "Don't list non-VR commands"
11:     elseif (va == {"any", "none", "none"})
12:       command = tostr(what)
13:     elseif (va[1] == "none" && va[2] != "none" && va[3] == "any")
14:       if (va[2] == "any")
15:         command = "with"
16:       elseif (slash = index(va[2], "/"))
17:         command = tostr(va[2][1..slash - 1], " ", what)
18:       else
19:         command = tostr(va[2], " ", what)
20:       endif
21:     endif
22:     if (command)
23:       v = $su:explode(v)[1]
24:       v = strsub(v, "*", "")
25:       commands = {@commands, v + " " + command}
26:     endif
27:     $command_utils:suspend_if_needed()
28:   endfor
29:   o = parent(o)
30: endwhile
31: return commands
32: "Last modified by Dax (#789) on Mon Aug  7 22:18:20 2006 MDT."

Verb arguments: this none this
Verb perms: Readable eXecutable NOT-Debug
Verb owned by: Dax (#789)

You are not logged in.

[home | help | who | search | setup | code]