Verb Help DB #18
Aliases: Verb Help DB, verbhelp, vh
3 verbs · 5 properties · 0 children
Verbs
| Verb | Spec | Flags | Definer | Lines |
|---|---|---|---|---|
find_topics | this none this | rxd | #18 | 6 |
get_topic | this none this | rxd | #18 | 20 |
dump_topic | this none this | rxd | #18 | 12 |
Properties
| Property | Definer | Flags | Owner | Value |
|---|---|---|---|---|
help_msg | #18 | rc | #36 | list of 23{"This is not a help database in the same way that children of $generic_help are. This object does the work when someone calls help in this way:", "", " help <object>:<verb>", "", "It parses out the object and verb reference, pulls out the comments at the beginning of the verb, and returns them to the help system for nice display.", "", " :find_topics(string)", " tries to pull out an object:verb reference from string", " returns {string} if successful", " returns {} if not", "", " :get_topic(string)", " tries to pull out an object:verb reference from string (returns 0 if", " it fails to do so)", " tries to match the object", " checks the object to see if the verb exists", " pulls out the initial comments from the verb if they exist", " returns a meaningful list of strings to be displayed to the player", "", " :dump_topic(string)", " does the same as :get_topic above, but returns the verb documentation", " in dump form.", "----"} |
key | #1 | c | #36 | <clear> |
aliases | #1 | rc | #36 | {"Verb Help DB", "verbhelp", "vh"} |
description | #1 | rc | #36 | "A `help database' that knows about all of the documented verbs." |
object_size | #1 | r | #36 | {4695, -1090650497} |
Ancestry
Ancestors (nearest first): #1 Root Class
Children: none
Call graph
Source
find_topics
Referenced by
none
Source
1if ($code_utils:parse_verbref(what = args[1])) 2"... hey wow, I found it!..."; 3return {what}; 4else 5return {}; 6endif
get_topic
Referenced by
none
Source
1"Help facility for verbs that people have bothered to document. If the argument is a verb specification, this retrieves the code and prints any documentation lines that might be at the beginning. Returns true if the arg can actually be interpreted as a verb specification, whether or not it is a correct one."; 2set_task_perms(caller_perms()); 3if (!(spec = $code_utils:parse_verbref(args[1]))) 4return 0; 5elseif ($command_utils:object_match_failed(object = $string_utils:match_object(spec[1], player.location), spec[1])) 6return 1; 7elseif (!(hv = $object_utils:has_verb(object, spec[2]))) 8return "That object does not define that verb."; 9elseif (typeof(verbdoc = $code_utils:verb_documentation(object = hv[1], spec[2])) == ERR) 10return tostr(verbdoc); 11elseif (typeof(info = `verb_info(object, spec[2]) ! ANY') == ERR) 12return tostr(info); 13else 14objverb = tostr(object.name, "(", object, "):", strsub(info[3], " ", "/")); 15if (verbdoc) 16return {tostr("Information about ", objverb), "----", @verbdoc}; 17else 18return tostr("No information about ", objverb); 19endif 20endif
dump_topic
Referenced by
none
Source
1set_task_perms(caller_perms()); 2if (!(spec = $code_utils:parse_verbref(args[1]))) 3return E_INVARG; 4elseif ($command_utils:object_match_failed(object = $string_utils:match_object(spec[1], player.location), spec[1])) 5return E_INVARG; 6elseif (!(hv = $object_utils:has_verb(object, spec[2]))) 7return E_VERBNF; 8elseif (typeof(vd = $code_utils:verb_documentation(hv[1], spec[2])) != LIST) 9return vd; 10else 11return {tostr(";$code_utils:set_verb_documentation(", $code_utils:corify_object(hv[1]), ",", $string_utils:print(spec[2]), ",$command_utils:read_lines())"), @$command_utils:dump_lines(vd)}; 12endif