Root Class #1

Parent #-1Owner #2Flags obsolete1, read, fertileSource QuestCore.db

38 verbs · 4 properties · 22 children

Verbs

VerbSpecFlagsDefinerLines
initializethis none thisrxd#112
recyclethis none thisrxd#113
set_namethis none thisrxd#17
titlethis none thisrxd#11
titlecthis none thisrxd#11
set_aliasesthis none thisrxd#120
matchthis none thisrxd#12
match_objectthis none thisrxd#13
set_descriptionthis none thisrxd#110
descriptionthis none thisrxd#11
look_selfthis none thisrxd#16
notifythis none thisrxd#13
tellthis none thisrxd#11
tell_linesthis none thisrxd#18
acceptthis none thisrxd#12
movetothis none thisrxd#12
eject eject_nice eject_basicthis none thisrxd#123
is_unlocked_forthis none thisrxd#11
huhthis none thisrxd#12
set_messagethis none thisrxd#113
do_examinethis none thisrxd#120
examine_keythis none thisrxd#17
examine_namesthis none thisrxd#13
examine_descthis none thisrxd#112
examine_contentsthis none thisrxd#111
examine_verbsthis none thisrxd#159
get_messagethis none thisrxd#114
room_announce*_all_butthis none thisrxd#14
init_for_corethis none thisrxd#116
contentsthis none thisrxd#12
examine_verb_okthis none thisrxd#110
is_listeningthis none thisrxd#12
hidden_verbsthis none thisrxd#120
examine_ownerthis none thisrxd#13
announce*_all_butthis none thisrxd#11
tell_lines_suspendedthis none thisrxd#19
acceptablethis none thisrxd#13
help_msgthis none thisrxd#11

Properties

PropertyDefinerFlagsOwnerValue
key#1c#20
aliases#1rc#2{}
description#1rc#2""
object_size#1r#36{22305, 1539462952}

Ancestry

Ancestors (nearest first): none

Children: #0 The System Object, #3 generic room, #7 generic exit, #10 Login Commands, #11 Player Last_huh Verbs, #12 Guest Log, #15 Limbo, #18 Verb Help DB, #30 Generic Help Database, #37 Generic Database, #45 Generic Mail Recipient, #46 Mail Distribution Center, #68 Generic Option Package, #69 Error Generator, #72 Network Utilities, #73 Generic BigList Resident, #75 Gopher utilities, #79 Generic Utilities Package, #81 @paranoid database, #83 Server Options, #87 FTP utilities, #102 subthing

Call graph

calls n1_0 #1:initialize n42_0 #42:controls n1_0->n42_0 n1_1 #1:recycle n1_1->n42_0 n1_4 #1:titlec n52_0 #52:has_property n1_4->n52_0 n20_15 #20:capitalize n1_4->n20_15 n1_3 #1:title n1_4->n1_3 n1_5 #1:set_aliases n1_5->n42_0 n1_6 #1:match n1_29 #1:contents n1_6->n1_29 n20_17 #20:match n1_6->n20_17 n1_7 #1:match_object n20_19 #20:match_object n1_7->n20_19 n1_8 #1:set_description n1_8->n42_0 n1_10 #1:look_self n1_9 #1:description n1_10->n1_9 n6_79 #6:tell_lines n1_10->n6_79 n6_18 #6:tell n1_10->n6_18 n1_12 #1:tell n1_11 #1:notify n1_12->n1_11 n1_13 #1:tell_lines n1_13->n1_12 n1_14 #1:accept n1_36 #1:acceptable n1_14->n1_36 n1_16 #1:eject n1_16->n52_0 n1_17 #1:is_unlocked_for n53_6 #53:eval_key n1_17->n53_6 n1_18 #1:huh n56_11 #56:do_huh n1_18->n56_11 n1_19 #1:set_message n1_19->n42_0 n1_20 #1:do_examine n1_22 #1:examine_names n1_20->n1_22 n1_33 #1:examine_owner n1_20->n1_33 n1_23 #1:examine_desc n1_20->n1_23 n1_21 #1:examine_key n1_20->n1_21 n1_24 #1:examine_contents n1_20->n1_24 n1_25 #1:examine_verbs n1_20->n1_25 n20_6 #20:english_list n1_22->n20_6 n1_23->n1_9 n1_21->n42_0 n53_8 #53:unparse_key n1_21->n53_8 n1_32 #1:hidden_verbs n1_25->n1_32 n1_30 #1:examine_verb_ok n1_25->n1_30 n20_38 #20:explode n1_25->n20_38 n59_36 #59:verb_or_property n1_25->n59_36 n1_32->n42_0 n1_30->n42_0 n1_26 #1:get_message n1_26->n42_0 n1_35 #1:tell_lines_suspended n1_35->n1_12

Source

initialize

Spec this none thisFlags rxdOwner #2Definer #1

Referenced by

Source

1if (typeof(this.owner.owned_objects) == LIST)
2this.owner.owned_objects = setadd(this.owner.owned_objects, this);
3endif
4if ((caller == this) || $perm_utils:controls(caller_perms(), this))
5if (is_clear_property(this, "object_size"))
6"If this isn't clear, then we're being hacked.";
7this.object_size = {0, 0};
8endif
9this.key = 0;
10else
11return E_PERM;
12endif

recycle

Spec this none thisFlags rxdOwner #2Definer #1

Referenced by

Source

1if ((caller == this) || $perm_utils:controls(caller_perms(), this))
2try
3if ((typeof(this.owner.owned_objects) == LIST) && (!is_clear_property(this.owner, "owned_objects")))
4this.owner.owned_objects = setremove(this.owner.owned_objects, this);
5$recycler.lost_souls = setadd($recycler.lost_souls, this);
6endif
7except (ANY)
8"Oy, doesn't have a .owned_objects??, or maybe .owner is $nothing";
9"Should probably do something...like send mail somewhere.";
10endtry
11else
12return E_PERM;
13endif

set_name

Spec this none thisFlags rxdOwner #2Definer #1

Referenced by

Source

1"set_name(newname) attempts to change this.name to newname";
2"  => E_PERM   if you don't own this or aren't its parent, or are a player trying to do an end-run around $player_db...";
3if ((!caller_perms().wizard) && (is_player(this) || ((caller_perms() != this.owner) && (this != caller))))
4return E_PERM;
5else
6return (typeof(e = `this.name = args[1] ! ANY') != ERR) || e;
7endif

title

Spec this none thisFlags rxdOwner #2Definer #1

Referenced by

Source

1return this.name;

titlec

Spec this none thisFlags rxdOwner #2Definer #1

Referenced by

Source

1return $object_utils:has_property(this, "namec") ? this.namec | $string_utils:capitalize(this:title());

set_aliases

Spec this none thisFlags rxdOwner #2Definer #1

Referenced by

Source

1"set_aliases(alias_list) attempts to change this.aliases to alias_list";
2"  => E_PERM   if you don't own this or aren't its parent";
3"  => E_TYPE   if alias_list is not a list";
4"  => E_INVARG if any element of alias_list is not a string";
5"  => 1        if aliases are set exactly as expected (default)";
6"  => 0        if aliases were set differently than expected";
7"              (children with custom :set_aliases should be aware of this)";
8if (!($perm_utils:controls(caller_perms(), this) || (this == caller)))
9return E_PERM;
10elseif (typeof(aliases = args[1]) != LIST)
11return E_TYPE;
12else
13for s in (aliases)
14if (typeof(s) != STR)
15return E_INVARG;
16endif
17endfor
18this.aliases = aliases;
19return 1;
20endif

match

Spec this none thisFlags rxdOwner #2Definer #1

Referenced by

Source

1c = this:contents();
2return $string_utils:match(args[1], c, "name", c, "aliases");

match_object

Spec this none thisFlags rxdOwner #2Definer #1

Referenced by

Source

1":match_object(string [,who])";
2args[2..1] = {this};
3return $string_utils:match_object(@args);

set_description

Spec this none thisFlags rxdOwner #2Definer #1

Referenced by

Source

1"set_description(newdesc) attempts to change this.description to newdesc";
2"  => E_PERM   if you don't own this or aren't its parent";
3if (!($perm_utils:controls(caller_perms(), this) || (this == caller)))
4return E_PERM;
5elseif (typeof(desc = args[1]) in {LIST, STR})
6this.description = desc;
7return 1;
8else
9return E_TYPE;
10endif

description

Spec this none thisFlags rxdOwner #2Definer #1

Referenced by

Source

1return this.description;

look_self

Spec this none thisFlags rxdOwner #2Definer #1

Referenced by

Source

1desc = this:description();
2if (desc)
3player:tell_lines(desc);
4else
5player:tell("You see nothing special.");
6endif

notify

Spec this none thisFlags rxdOwner #2Definer #1

Referenced by

Source

1if (is_player(this))
2notify(this, args[1]);
3endif

tell

Spec this none thisFlags rxdOwner #2Definer #1

Referenced by

Source

1this:notify(tostr(@args));

tell_lines

Spec this none thisFlags rxdOwner #2Definer #1

Referenced by

Source

1lines = args[1];
2if (typeof(lines) == LIST)
3for line in (lines)
4this:tell(line);
5endfor
6else
7this:tell(lines);
8endif

accept

Spec this none thisFlags rxdOwner #2Definer #1

Referenced by

none

Source

1set_task_perms(caller_perms());
2return this:acceptable(@args);

moveto

Spec this none thisFlags rxdOwner #2Definer #1

Referenced by

Source

1set_task_perms(this.owner);
2return `move(this, args[1]) ! ANY';

eject eject_nice eject_basic

Spec this none thisFlags rxdOwner #2Definer #1

Referenced by

Source

1"eject(victim) --- usable by the owner of this to remove victim from this.contents.  victim goes to its home if different from here, or $nothing or $player_start according as victim is a player.";
2"eject_basic(victim) --- victim goes to $nothing or $player_start according as victim is a player; victim:moveto is not called.";
3what = args[1];
4nice = verb != "eject_basic";
5perms = caller_perms();
6if ((!perms.wizard) && (perms != this.owner))
7return E_PERM;
8elseif ((!(what in this.contents)) || what.wizard)
9return 0;
10endif
11if ((((nice && $object_utils:has_property(what, "home")) && (typeof(where = what.home) == OBJ)) && (where != this)) && (is_player(what) ? `where:accept_for_abode(what) ! ANY' | `where:acceptable(what) ! ANY'))
12"where = what.home";
13else
14where = is_player(what) ? $player_start | $nothing;
15endif
16if (nice)
17fork (0)
18"...Some objects like to know they've been moved...";
19"... this is the best we can do.  Remember :moveto() may be broken.";
20`what:moveto(where) ! ANY => 0';
21endfork
22endif
23return `move(what, where) ! ANY => 1';

is_unlocked_for

Spec this none thisFlags rxdOwner #2Definer #1

Referenced by

Source

1return (this.key == 0) || $lock_utils:eval_key(this.key, args[1]);

huh

Spec this none thisFlags rxdOwner #2Definer #1

Referenced by

none

Source

1set_task_perms((caller_perms() != #-1) ? caller_perms() | player);
2$command_utils:do_huh(verb, args);

set_message

Spec this none thisFlags rxdOwner #2Definer #1

Referenced by

none

Source

1":set_message(msg_name,new_value)";
2"Does the actual dirty work of @<msg_name> object is <new_value>";
3"changing the raw value of the message msg_name to be new_value.";
4"Both msg_name and new_value should be strings, though their interpretation is up to the object itself.";
5" => error value (use E_PROPNF if msg_name isn't recognized)";
6" => string error message if something else goes wrong.";
7" => 1 (true non-string) if the message is successfully set";
8" => 0 (false non-error) if the message is successfully `cleared'";
9if (!((caller == this) || $perm_utils:controls(caller_perms(), this)))
10return E_PERM;
11else
12return `this.(args[1] + "_msg") = args[2] ! ANY' && 1;
13endif

do_examine

Spec this none thisFlags rxdOwner #2Definer #1

Referenced by

none

Source

1"do_examine(examiner)";
2"the guts of examine";
3"call a series of verbs and report their return values to the player";
4who = args[1];
5"if (caller == this || caller == who)";
6if (caller == who)
7"set_task_perms();";
8who:notify_lines(this:examine_names(who) || {});
9"this:examine_names(who);";
10who:notify_lines(this:examine_owner(who) || {});
11"this:examine_owner(who);";
12who:notify_lines(this:examine_desc(who) || {});
13"this:examine_desc(who);";
14who:notify_lines(this:examine_key(who) || {});
15"this:examine_key(who);";
16who:notify_lines(this:examine_contents(who) || {});
17who:notify_lines(this:examine_verbs(who) || {});
18else
19return E_PERM;
20endif

examine_key

Spec this none thisFlags rxdOwner #2Definer #1

Referenced by

Source

1"examine_key(examiner)";
2"return a list of strings to be told to the player, indicating what the key on this type of object means, and what this object's key is set to.";
3"the default will only tell the key to a wizard or this object's owner.";
4who = args[1];
5if (((caller == this) && $perm_utils:controls(who, this)) && (this.key != 0))
6return {tostr("Key:  ", $lock_utils:unparse_key(this.key))};
7endif

examine_names

Spec this none thisFlags rxdOwner #2Definer #1

Referenced by

Source

1"examine_names(examiner)";
2"Return a list of strings to be told to the player, indicating the name and aliases (and, by default, the object number) of this.";
3return {tostr(this.name, " (aka ", $string_utils:english_list({tostr(this), @this.aliases}), ")")};

examine_desc

Spec this none thisFlags rxdOwner #2Definer #1

Referenced by

Source

1"examine_desc(who) - return the description, probably";
2"who is the player examining";
3"this should probably go away";
4desc = this:description();
5if (desc)
6if (typeof(desc) != LIST)
7desc = {desc};
8endif
9return desc;
10else
11return {"(No description set.)"};
12endif

examine_contents

Spec this none thisFlags rxdOwner #2Definer #1

Referenced by

Source

1"examine_contents(examiner)";
2"by default, calls :tell_contents.";
3"Should probably go away.";
4who = args[1];
5if (caller == this)
6try
7this:tell_contents(this.contents, this.ctype);
8except (ANY)
9"Just ignore it. We shouldn't care about the contents unless the object wants to tell us about them via :tell_contents ($container, $room)";
10endtry
11endif

examine_verbs

Spec this none thisFlags rxdOwner #2Definer #1

Referenced by

Source

1"Return a list of strings to be told to the player.  Standard format says \"Obvious verbs:\" followed by a series of lines explaining syntax for each usable verb.";
2if (caller != this)
3return E_PERM;
4endif
5who = args[1];
6name = dobjstr;
7vrbs = {};
8commands_ok = `this:examine_commands_ok(who) ! ANY => 0';
9dull_classes = {$root_class, $room, $player, $prog, $builder};
10what = this;
11hidden_verbs = this:hidden_verbs(who);
12while (what != $nothing)
13(ticks_left() < 4000) && suspend(0);
14if (!(what in dull_classes))
15for i in [1..length(verbs(what))]
16(ticks_left() < 4000) && suspend(0);
17info = verb_info(what, i);
18syntax = verb_args(what, i);
19if (this:examine_verb_ok(what, i, info, syntax, commands_ok, hidden_verbs))
20{dobj, prep, iobj} = syntax;
21if (syntax == {"any", "any", "any"})
22prep = "none";
23endif
24if (prep != "none")
25for x in ($string_utils:explode(prep, "/"))
26if (length(x) <= length(prep))
27prep = x;
28endif
29endfor
30endif
31"This is the correct way to handle verbs ending in *";
32vname = info[3];
33while (j = index(vname, "* "))
34vname = tostr(vname[1..j - 1], "<anything>", vname[j + 1..$]);
35endwhile
36if (vname[$] == "*")
37vname = vname[1..$ - 1] + "<anything>";
38endif
39vname = strsub(vname, " ", "/");
40rest = "";
41if (prep != "none")
42rest = " " + ((prep == "any") ? "<anything>" | prep);
43if (iobj != "none")
44rest = tostr(rest, " ", (iobj == "this") ? name | "<anything>");
45endif
46endif
47if (dobj != "none")
48rest = tostr(" ", (dobj == "this") ? name | "<anything>", rest);
49endif
50vrbs = setadd(vrbs, ("  " + vname) + rest);
51endif
52endfor
53endif
54what = parent(what);
55endwhile
56if ($code_utils:verb_or_property(this, "help_msg"))
57vrbs = {@vrbs, tostr("  help ", dobjstr)};
58endif
59return vrbs && {"Obvious verbs:", @vrbs};

get_message

Spec this none thisFlags rxdOwner #2Definer #1

Referenced by

none

Source

1":get_message(msg_name)";
2"Use this to obtain a given user-customizable message's raw value, i.e., the value prior to any pronoun-substitution or incorporation of any variant elements --- the value one needs to supply to :set_message().";
3"=> error (use E_PROPNF if msg_name isn't recognized)";
4"=> string or list-of-strings raw value";
5"=> {2, @(list of {msg_name_n,rawvalue_n} pairs to give to :set_message)}";
6"=> {1, other kind of raw value}";
7"=> {E_NONE, error message} ";
8if (!((caller == this) || $perm_utils:controls(caller_perms(), this)))
9return E_PERM;
10elseif (((t = typeof(msg = `this.(args[1] + "_msg") ! ANY')) in {ERR, STR}) || (((t == LIST) && msg) && (typeof(msg[1]) == STR)))
11return msg;
12else
13return {1, msg};
14endif

room_announce*_all_but

Spec this none thisFlags rxdOwner #2Definer #1

Referenced by

none

Source

1try
2this.location:(verb)(@args);
3except (ANY)
4endtry

init_for_core

Spec this none thisFlags rxdOwner #2Definer #1

Referenced by

Source

1if (caller_perms().wizard)
2vnum = 1;
3while (vnum <= length(verbs(this)))
4(ticks_left() < 4000) && suspend(0);
5info = verb_info(this, vnum)[3];
6if (index(info, "(old)"))
7delete_verb(this, vnum);
8else
9vnum = vnum + 1;
10endif
11endwhile
12if (this == $root_class)
13`set_verb_code(this, "initialize", verb_code(this, "initialize(core)")) ! E_VERBNF => ""';
14`delete_verb(this, "initialize(core)") ! E_VERBNF => ""';
15endif
16endif

contents

Spec this none thisFlags rxdOwner #36Definer #1

Referenced by

Source

1"Returns a list of the objects that are apparently inside this one.  Don't confuse this with .contents, which is a property kept consistent with .location by the server.  This verb should be used in `VR' situations, for instance when looking in a room, and does not necessarily have anything to do with the value of .contents (although the default implementation does).  `Non-VR' commands (like @contents) should look directly at .contents.";
2return this.contents;

examine_verb_ok

Spec this none thisFlags rxdOwner #2Definer #1

Referenced by

Source

1"examine_verb_ok(loc, index, info, syntax, commands_ok, hidden_verbs)";
2"loc is the object that defines the verb; index is which verb on the object; info is verb_info; syntax is verb_args; commands_ok is determined by this:commands_ok, probably, but passed in so we don't have to calculate it for each verb.";
3"hidden_verbs is passed in for the same reasons.  It should be a list, each of whose entries is either a string with the full verb name to be hidden (e.g., \"d*rop th*row\") or a list of the form {verb location, full verb name, args}.";
4if ((caller == this) || $perm_utils:controls(caller_perms(), this))
5{loc, index, info, syntax, commands_ok, hidden_verbs} = args;
6vname = info[3];
7return (((((syntax[2..3] != {"none", "this"}) && (!index(vname, "("))) && (commands_ok || ("this" in syntax))) && `verb_code(loc, index) ! ANY') && (!(vname in hidden_verbs))) && (!({loc, vname, syntax} in hidden_verbs));
8else
9return E_PERM;
10endif

is_listening

Spec this none thisFlags rxdOwner #2Definer #1

Referenced by

none

Source

1"return 1 if the object can hear a :tell, or cares. Useful for active objects that want to stop when nothing is listening.";
2return 0;

hidden_verbs

Spec this none thisFlags rxdOwner #2Definer #1

Referenced by

Source

1"hidden_verbs(who)";
2"returns a list of verbs on this that should be hidden from examine";
3"the player who's examining is passed in, so objects can hide verbs from specific players";
4"verbs are returned as {location, full_verb_name, args} or just full_verb_name.  full_verb name is what shows up in verb_info(object, verb)[2], for example \"d*op th*row\".";
5if ((caller == this) || $perm_utils:controls(caller_perms(), this))
6hidden = {};
7what = this;
8while (what != $nothing)
9for i in [1..length(verbs(what))]
10info = verb_info(what, i);
11if (!index(info[2], "r"))
12hidden = setadd(hidden, {what, info[3], verb_args(what, i)});
13endif
14endfor
15what = parent(what);
16endwhile
17return hidden;
18else
19return E_PERM;
20endif

examine_owner

Spec this none thisFlags rxdOwner #2Definer #1

Referenced by

Source

1"examine_owner(examiner)";
2"Return a list of strings to be told to the player, indicating who owns this.";
3return {tostr("Owned by ", this.owner.name, ".")};

announce*_all_but

Spec this none thisFlags rxdOwner #2Definer #1

Referenced by

none

Source

1return;

tell_lines_suspended

Spec this none thisFlags rxdOwner #2Definer #1

Referenced by

Source

1lines = args[1];
2if (typeof(lines) == LIST)
3for line in (lines)
4this:tell(line);
5(ticks_left() < 4000) && suspend(0);
6endfor
7else
8this:tell(lines);
9endif

acceptable

Spec this none thisFlags rxdOwner #2Definer #1

Referenced by

Source

1return 0;
2"intended as a 'quiet' way to determine if :accept will succeed. Currently, some objects have a noisy :accept verb since it is the only thing that a builtin move() call is guaranteed to call.";
3"if you want to tell, before trying, whether :accept will fail, use :acceptable instead. Normally, they'll do the same thing.";

help_msg

Spec this none thisFlags rxdOwner #2Definer #1

Referenced by

Source

1return `this.help_msg ! E_PROPNF => 0';