Verb Help DB #18

Parent #1Owner #36Flags readSource RPG Core/rpgcore-patched.db

Aliases: Verb Help DB, verbhelp, vh

3 verbs · 6 properties · 0 children

Verbs

VerbSpecFlagsDefinerLines
find_topicsthis none thisrxd#186
get_topicthis none thisrxd#1820
dump_topicthis none thisrxd#1812

Properties

PropertyDefinerFlagsOwnerValue
help_msg#18rc#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#1c#36<clear>
aliases#1rc#36{"Verb Help DB", "verbhelp", "vh"}
description#1rc#36"A `help database' that knows about all of the documented verbs."
object_size#1r#36{4695, -1090650497}
html#1rc#36<clear>

Ancestry

Ancestors (nearest first): #1 Root Class

Children: none

Call graph

calls n18_0 #18:find_topics n59_14 #59:parse_verbref n18_0->n59_14 n18_1 #18:get_topic n18_1->n59_14 n56_0 #56:object_match_failed n18_1->n56_0 n20_19 #20:match_object n18_1->n20_19 n52_2 #52:has_verb n18_1->n52_2 n59_11 #59:verb_documentation n18_1->n59_11 n18_2 #18:dump_topic n18_2->n59_14 n18_2->n56_0 n18_2->n20_19 n18_2->n52_2 n18_2->n59_11 n59_34 #59:corify_object n18_2->n59_34 n20_48 #20:print n18_2->n20_48 n56_9 #56:dump_lines n18_2->n56_9

Source

find_topics

Spec this none thisFlags rxdOwner #36Definer #18

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

Spec this none thisFlags rxdOwner #2Definer #18

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

Spec this none thisFlags rxdOwner #2Definer #18

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