generic display room #135
Aliases: generic display room, gdr
7 verbs · 64 properties · 0 children
Verbs
| Verb | Spec | Flags | Definer | Lines |
|---|---|---|---|---|
reg*ister | any none none | rxd | #135 | 32 |
view display browse show list read | any any any | rxd | #135 | 24 |
l*ook | any any any | rd | #135 | 20 |
huh | this none this | rxd | #135 | 22 |
dis_match_object | this none this | rxd | #135 | 21 |
init_for_core | this none this | rxd | #135 | 14 |
unregister | any none none | rxd | #135 | 19 |
Properties
| Property | Definer | Flags | Owner | Value |
|---|---|---|---|---|
warehouse | #135 | rc | #2 | #84 |
catalog_names | #135 | rc | #2 | {"display", "catalog", "catalogue", "demos", "generics"} |
curious | #135 | rc | #2 | {#2} |
virtual_exit_task | #118 | r | #2 | <clear> |
defaulting_exit_oleave_msg | #118 | rc | #2 | <clear> |
blessed_entrances | #118 | rc | #2 | <clear> |
virtual_exits | #118 | rc | #2 | {} |
give_short_alias | #118 | rc | #2 | <clear> |
virtual_exit_to_use | #118 | r | #2 | <clear> |
lit_from_outside | #118 | rc | #2 | <clear> |
bot_locked | #104 | rc | #2 | <clear> |
fakes | #104 | r | #36 | <clear> |
retail | #104 | rc | #2 | 0 |
seat | #104 | r | #36 | <clear> |
pool | #104 | r | #36 | <clear> |
seat_desc | #104 | r | #36 | <clear> |
pool_desc | #104 | r | #36 | <clear> |
sit_phrase | #104 | rc | #2 | <clear> |
stand_phrase | #104 | rc | #2 | <clear> |
swim_phrase | #104 | rc | #2 | <clear> |
dry_phrase | #104 | rc | #2 | <clear> |
push_phrase | #104 | rc | #2 | <clear> |
seat_aliai | #104 | r | #36 | <clear> |
pool_aliai | #104 | r | #36 | <clear> |
seat_contents | #104 | r | #36 | <clear> |
pool_contents | #104 | r | #36 | <clear> |
seat_max | #104 | r | #36 | <clear> |
pool_max | #104 | r | #36 | <clear> |
details | #104 | rc | #2 | <clear> |
temp_detail_index | #104 | rc | #2 | <clear> |
temp_detail_desc | #104 | rc | #2 | <clear> |
outdoors | #104 | r | #36 | <clear> |
attack_queue | #104 | r | #2 | <clear> |
battle_on | #104 | r | #2 | <clear> |
stop_msg | #104 | rc | #2 | <clear> |
remove_msg | #104 | rc | #2 | <clear> |
dump_msg | #104 | rc | #2 | <clear> |
dump_loc | #104 | rc | #2 | <clear> |
sanctuary | #104 | rc | #2 | <clear> |
ansi_title | #104 | r | #36 | <clear> |
dark_desc | #104 | rc | #2 | <clear> |
title_style | #104 | rc | #2 | <clear> |
build_help | #104 | rc | #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 | #104 | r | #2 | <clear> |
dig_level | #104 | rc | #2 | <clear> |
holes | #104 | r | #2 | <clear> |
help_msg | #104 | rc | #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 | #3 | rc | #2 | <clear> |
free_home | #3 | rc | #2 | <clear> |
victim_ejection_msg | #3 | rc | #2 | <clear> |
ejection_msg | #3 | rc | #2 | <clear> |
oejection_msg | #3 | rc | #2 | <clear> |
residents | #3 | rc | #2 | <clear> |
free_entry | #3 | rc | #2 | <clear> |
entrances | #3 | c | #2 | <clear> |
blessed_object | #3 | rc | #2 | <clear> |
blessed_task | #3 | rc | #2 | <clear> |
exits | #3 | c | #2 | <clear> |
dark | #3 | rc | #2 | <clear> |
ctype | #3 | rc | #2 | <clear> |
key | #1 | c | #2 | 0 |
aliases | #1 | rc | #2 | {"generic display room", "gdr"} |
description | #1 | rc | #2 | {"*Browse* the *display* when you wish to *view* the generics.", "If you have something valuable to share, you can *register* it."} |
object_size | #1 | r | #36 | {9905, 1539462952} |
Ancestry
Ancestors (nearest first): #118 virtual exit room → #104 RPG room → #3 generic room → #1 Root Class
Children: none
Call graph
Source
reg*ister
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
Referenced by
- #135:l*ook line 14:
this:view - #135:l*ook line 18:
this:view
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
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
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
Referenced by
- #135:l*ook line 12:
this:dis_match_object - #135:huh line 8:
this:dis_match_object
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
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
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 => ""';