Verb Help DB #13

Parent #309Owner #29Flags readSource hellcore/hellcore.db

Aliases: verbhelp, vh

3 verbs · 11 properties · 0 children

Verbs

VerbSpecFlagsDefinerLines
find_topicsthis none thisrxd#136
get_topicthis none thisrxd#1320
dump_topicthis none thisrxd#1312

Properties

PropertyDefinerFlagsOwnerValue
help_msg#13rc#29
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.", "----"}
aliases#1rc#29{"verbhelp", "vh"}
description#1rc#29"A `help database' that knows about all of the documented verbs."
object_size#1r#29{4105, 1298433815}
hidden_verbs#1rc#29<clear>
phelp_msg#1rc#29<clear>
weight#1rc#29<clear>
owner_verbs#1rc#29<clear>
plural_name#1rc#29<clear>
client_image#1rc#29<clear>
listening#1rc#29<clear>

Ancestry

Ancestors (nearest first): #309 generic db object#1 root

Children: none

Call graph

calls n13_0 #13:find_topics n51_14 #51:parse_verbref n13_0->n51_14 n13_1 #13:get_topic n13_1->n51_14 n48_0 #48:object_match_failed n13_1->n48_0 n20_19 #20:match_object n13_1->n20_19 n45_2 #45:has_verb n13_1->n45_2 n51_11 #51:verb_documentation n13_1->n51_11 n13_2 #13:dump_topic n13_2->n51_14 n13_2->n48_0 n13_2->n20_19 n13_2->n45_2 n13_2->n51_11 n51_34 #51:corify_object n13_2->n51_34 n20_48 #20:print n13_2->n20_48 n48_9 #48:dump_lines n13_2->n48_9

Source

find_topics

Spec this none thisFlags rxdOwner #29Definer #13

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 #361Definer #13

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 #361Definer #13

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