generic display room #135

Parent #118Owner #2Flags read, fertileSource QuestCore.db

Aliases: generic display room, gdr

7 verbs · 64 properties · 0 children

Verbs

VerbSpecFlagsDefinerLines
reg*isterany none nonerxd#13532
view display browse show list readany any anyrxd#13524
l*ookany any anyrd#13520
huhthis none thisrxd#13522
dis_match_objectthis none thisrxd#13521
init_for_corethis none thisrxd#13514
unregisterany none nonerxd#13519

Properties

PropertyDefinerFlagsOwnerValue
warehouse#135rc#2#84
catalog_names#135rc#2{"display", "catalog", "catalogue", "demos", "generics"}
curious#135rc#2{#2}
virtual_exit_task#118r#2<clear>
defaulting_exit_oleave_msg#118rc#2<clear>
blessed_entrances#118rc#2<clear>
virtual_exits#118rc#2{}
give_short_alias#118rc#2<clear>
virtual_exit_to_use#118r#2<clear>
lit_from_outside#118rc#2<clear>
bot_locked#104rc#2<clear>
fakes#104r#36<clear>
retail#104rc#20
seat#104r#36<clear>
pool#104r#36<clear>
seat_desc#104r#36<clear>
pool_desc#104r#36<clear>
sit_phrase#104rc#2<clear>
stand_phrase#104rc#2<clear>
swim_phrase#104rc#2<clear>
dry_phrase#104rc#2<clear>
push_phrase#104rc#2<clear>
seat_aliai#104r#36<clear>
pool_aliai#104r#36<clear>
seat_contents#104r#36<clear>
pool_contents#104r#36<clear>
seat_max#104r#36<clear>
pool_max#104r#36<clear>
details#104rc#2<clear>
temp_detail_index#104rc#2<clear>
temp_detail_desc#104rc#2<clear>
outdoors#104r#36<clear>
attack_queue#104r#2<clear>
battle_on#104r#2<clear>
stop_msg#104rc#2<clear>
remove_msg#104rc#2<clear>
dump_msg#104rc#2<clear>
dump_loc#104rc#2<clear>
sanctuary#104rc#2<clear>
ansi_title#104r#36<clear>
dark_desc#104rc#2<clear>
title_style#104rc#2<clear>
build_help#104rc#2
list of 20{"FOR DISPLAY ROOM OWNER:", " The room has a callable verb \"view/display/browse\" that", "can display info on the entire warehouse contents, or an", "individual item, if it is passed to room:view(item).", " To avoid errors, the object should first be validated", "by the verb room:dis_match_object(string -the object),", "and then sent to :view().", " The room also has \"look\" and \"huh\" verbs to handle any", "interaction between the player and the objects on display,", "since the objects are not really in the room's contents.", "", "@set here.warehouse to <#obj - a child of $warehouse>", "", "@set here.catalog_names to {\"demos\",\"things\",\"catalog\",", "\"catalogue\",\"display\",\"other possible names the player", "might use to denote the objects on display\"}", "", "@set here.curious to {<mail recipient 1> [,<mail recipient n>]}", "", "The verb \"register <object>\" is set up to check for fertility, readability, and help files before placing the object into the warehouse. Mail is automatically sent to the objects listed in the \"curious\" property. Check this property before using the \"register\" verb! You may send mail to someone who doesn't want it! If you want to limit registration to certain individuals, write your own \"register\" verb to screen out other players, and then \"pass(@args)\" to the parent's verb. The parent's \"register\" verb must be \"@chmod rxd\" instead of \"rd\" for this to work."}
battle_task#104r#2<clear>
dig_level#104rc#2<clear>
holes#104r#2<clear>
help_msg#104rc#2
list of 4{" The generic display room can be used as a showroom for", "objects kept in a warehouse, making it a good ancestor for", "museums and retail stores. Anyone can use the \"register\"", "verb in this version."}
who_location_msg#3rc#2<clear>
free_home#3rc#2<clear>
victim_ejection_msg#3rc#2<clear>
ejection_msg#3rc#2<clear>
oejection_msg#3rc#2<clear>
residents#3rc#2<clear>
free_entry#3rc#2<clear>
entrances#3c#2<clear>
blessed_object#3rc#2<clear>
blessed_task#3rc#2<clear>
exits#3c#2<clear>
dark#3rc#2<clear>
ctype#3rc#2<clear>
key#1c#20
aliases#1rc#2{"generic display room", "gdr"}
description#1rc#2{"*Browse* the *display* when you wish to *view* the generics.", "If you have something valuable to share, you can *register* it."}
object_size#1r#36{9905, 1539462952}

Ancestry

Ancestors (nearest first): #118 virtual exit room#104 RPG room#3 generic room#1 Root Class

Children: none

Call graph

calls n135_0 #135:reg*ister n6_18 #6:tell n135_0->n6_18 n52_0 #52:has_property n135_0->n52_0 n52_2 #52:has_verb n135_0->n52_2 n52_5 #52:isa n135_0->n52_5 n46_2 #46:send_message n135_0->n46_2 n20_59 #20:name_and_number n135_0->n20_59 n135_1 #135:view n135_1->n6_18 n20_63 #20:match_stringlist n135_1->n20_63 n1_6 #1:match n135_1->n1_6 n52_3 #52:has_callable_verb n135_1->n52_3 n104_47 #104:match n135_1->n104_47 n20_6 #20:english_list n135_1->n20_6 n135_2 #135:l*ook n135_2->n135_1 n135_2->n20_63 n104_4 #104:l*ook n135_2->n104_4 n135_4 #135:dis_match_object n135_2->n135_4 n135_4->n6_18 n20_9 #20:trim n135_4->n20_9 n59_2 #59:toobj n135_4->n59_2 n135_3 #135:huh n135_3->n6_18 n135_3->n135_4 n118_0 #118:match_exit n135_3->n118_0 n35_1 #35:say_action n135_3->n35_1 n3_16 #3:announce_all n135_3->n3_16 n56_11 #56:do_huh n135_3->n56_11 n135_5 #135:init_for_core n118_19 #118:init_for_core n135_5->n118_19 n135_6 #135:unregister n135_6->n6_18 n135_6->n46_2 n135_6->n20_59

Source

reg*ister

Spec any none noneFlags rxdOwner #2Definer #135

Referenced by

none

Source

1if (!dobjstr)
2return player:tell("Try \"register <object>\"");
3else
4if (valid(ting = dobj))
5if ((player == ting.owner) || player.wizard)
6if (is_player(ting))
7return player:tell("You can't register yourself!");
8endif
9if ((!$object_utils:has_property(ting, "help_msg")) && (!$object_utils:has_verb(ting, "help_msg")))
10return player:tell("You must include a help message with your generic by creating a property or verb named \"help_msg\".");
11elseif (((!player.wizard) && $object_utils:has_property(parent(ting), "help_msg")) && (ting.help_msg == parent(ting).help_msg))
12return player:tell("You must provide an original help message by editing the property \"help_msg\".");
13endif
14if ($object_utils:isa(ting, $feature))
15ting.r = 1;
16elseif ((!ting.f) || (!ting.r))
17player:tell(ting:titlec(), " needs to be fertile and readable.");
18player:tell("This will be done automatically, but generic object developers need to know how to do this themselves. Try \"help @chmod\" for more info.");
19ting.r = 1;
20ting.f = 1;
21endif
22move(ting, this.warehouse);
23$class_registry[1][3] = setadd($class_registry[1][3], ting);
24else
25return player:tell("You can't register objects you don't own.");
26endif
27else
28return player:tell("No '", dobjstr, "' was found.");
29endif
30endif
31player:tell(ting:titlec(), " has been registered.");
32`$mail_agent:send_message(this, this.curious, tostr($string_utils:nn(ting), " registered"), {tostr("This object was registered by ", $string_utils:nn(player)), tostr("Check \"help ", ting, "\" for more details.")}) ! ANY => ""';

view display browse show list read

Spec any any anyFlags rxdOwner #2Definer #135

Referenced by

Source

1if ((caller in connected_players()) && (verb == "read"))
2if (typeof($string_utils:match_stringlist(dobjstr, this.catalog_names)) != 1)
3if (valid(x = player:match(dobjstr)) && $object_utils:has_callable_verb(x, "read"))
4return x:read();
5elseif (valid(x = this:match(dobjstr)) && $object_utils:has_callable_verb(x, "read"))
6return x:read();
7endif
8endif
9endif
10try
11closet = (this.warehouse in children($warehouse)) ? this.warehouse | $warehouse;
12if ((!args) || (caller == player))
13return closet:list();
14elseif (caller != player)
15player:tell($string_utils:english_list(args[1].aliases), " (", tostr(args[1]), "):");
16args[1]:look_self();
17if (parent(toobj(args[1])) != $feature)
18player:tell("For more information, type \"help ", tostr(args[1]), "\".");
19endif
20endif
21return;
22except v (ANY)
23player:tell("The display is malfunctioning. You are unable to view the artifacts.");
24endtry

l*ook

Spec any any anyFlags rdOwner #2Definer #135

Referenced by

none

Source

1origargs = args;
2if (!origargs)
3return pass(@origargs);
4elseif ((!dobjstr) && (prepstr in {"at", "in", "on"}))
5dobjstr = iobjstr;
6iobjstr = "";
7prepstr = "";
8else
9dobjstr = dobjstr + (prepstr && ((dobjstr && " ") + prepstr));
10dobjstr = dobjstr + (iobjstr && ((dobjstr && " ") + iobjstr));
11endif
12xitem = this:dis_match_object(dobjstr);
13if (typeof($string_utils:match_stringlist(dobjstr, this.catalog_names)) != 1)
14this:view();
15elseif ((xitem == $failed_match) || (xitem == $nothing))
16return pass(@origargs);
17else
18this:view(xitem);
19endif
20return;

huh

Spec this none thisFlags rxdOwner #2Definer #135

Referenced by

none

Source

1"This verb needs wiz perms for a wizard to use any unconventionally-named exits";
2if (caller in connected_players())
3if (this:match_exit(verb) != $failed_match)
4x = this:match_exit(verb);
5x:invoke();
6else
7if (dobjstr != "")
8xitem = this:dis_match_object(dobjstr);
9if ((xitem != $failed_match) && (xitem != $nothing))
10player:tell("Although referenced, that item is not actually here.");
11return;
12elseif (dobjstr in this.catalog_names)
13$you:say_action(tostr("%N %<attempts> to ", args[1], " ", dobjstr, "."));
14this:announce_all("Of course, this is impossible.");
15return;
16endif
17return $command_utils:do_huh(verb, args);
18endif
19return valid(x = this:match_exit(verb)) ? x:invoke() | $command_utils:do_huh(verb, args);
20endif
21endif
22return;

dis_match_object

Spec this none thisFlags rxdOwner #2Definer #135

Referenced by

Source

1"Usage:this:dis_match_object(string) => Object if object is in inventory. Else $failed_match or $nothing";
2if (length(this.warehouse.contents) > 0)
3string = $string_utils:trim(args[1]);
4if (!(E_TYPE == (object = $code_utils:toobj(string))))
5if (object in this.warehouse.contents)
6return object;
7endif
8else
9for b in (this.warehouse.contents)
10"Check name and aliases";
11names = {@b.aliases, b.name};
12if (string in names)
13return b;
14endif
15endfor
16endif
17return $failed_match;
18else
19player:tell("There is nothing available.");
20return $nothing;
21endif

init_for_core

Spec this none thisFlags rxdOwner #2Definer #135

Referenced by

none

Source

1if (caller_perms().wizard)
2if (this == $display_room)
3this.warehouse = $warehouse;
4this.catalog_names = {"display", "catalog", "catalogue", "demos", "generics"};
5this.curious = {#2};
6else
7for p in (properties($display_room))
8if ((!p) in {"build_help", "help_msg"})
9clear_property(this, p);
10endif
11endfor
12endif
13return pass(@args);
14endif

unregister

Spec any none noneFlags rxdOwner #2Definer #135

Referenced by

none

Source

1if (!dobjstr)
2return player:tell("Try \"unregister <object>\"");
3else
4if (valid(ting = dobj))
5if ((player == ting.owner) || player.wizard)
6if (is_player(ting))
7return player:tell("You can't unregister yourself!");
8endif
9move(ting, ting.owner);
10$class_registry[1][3] = setremove($class_registry[1][3], ting);
11else
12return player:tell("You can't unregister objects you don't own.");
13endif
14else
15return player:tell("No '", dobjstr, "' was found.");
16endif
17endif
18player:tell(ting:titlec(), " has been unregistered.");
19`$mail_agent:send_message(this, this.curious, tostr($string_utils:nn(ting), " registered"), {tostr("This object was unregistered by ", $string_utils:nn(player)), tostr("Check \"help ", ting, "\" for more details.")}) ! ANY => ""';