generic blueprint #334

Parent #114Owner #361Flags read, fertileSource hellcore/hellcore.db

Aliases: generic blueprint

56 verbs · 59 properties · 0 children

Verbs

VerbSpecFlagsDefinerLines
initializethis none thisrxd#3348
invokethis none thisrxd#3343
editthis none nonerxd#3346
focusany any anyrxd#33428
change_focusthis none thisrxd#3348
typeany none nonerxd#33429
focus_forthis none thisrxd#33412
type_forthis none thisrxd#33415
default_roomthis none thisrxd#3346
default_exitthis none thisrxd#3346
digany at/to anyrxd#33477
ren*ameany none nonerxd#33414
lose_focusthis none thisrxd#3346
commitnone none nonerxd#33411
desc*ribeany any anyrxd#33415
mess*agesany any anyrxd#33441
set_messagethis none thisrxd#33435
instantiatethis none thisrxd#33473
del*etenone none nonerxd#33453
resetany none nonerxd#33442
furnishthis none thisrxd#33416
copy_propsthis none thisrxd#33414
typesthis none thisrxd#3341
roomsnone none nonerxd#3349
fertilizethis none thisrxd#3349
_itemize_coststhis none thisrxd#33410
invoicethis none thisrxd#33412
uninstantiatethis none thisrxd#33434
_total_costthis none thisrxd#3346
bpnameany any anyrxd#33413
bpdescany any anyrxd#33410
sky_roomthis none thisrxd#3341
@list-coststhis none nonerxd#33412
buryany none nonerxd#33459
bury_roomthis none thisrxd#33430
bury_would_orphanthis none thisrxd#33420
find_paththis none thisrxd#33424
bury_exitthis none thisrxd#3348
instantiate_newthis none thisrxd#33456
path_existsthis none thisrxd#33423
warpany none nonerxd#33410
instantiate_oldthis none thisrxd#33459
valid_blueprintthis none thisrxd#3346
mapiconany any anyrxd#33449
authorizeany none nonerxd#33418
deauthorizeany none nonerxd#33414
can_editthis none thisrxd#3342
areaiconany any anyrxd#33450
clearmess*ageany any anyrxd#33414
type-otherside otypeany none nonerxd#33430
addnote rmnotenone none nonerxd#33449
notesnone none nonerxd#3342
room_removedthis none thisrxd#3345
setdarkany none nonerxd#33436
handle_creature_deaththis none thisrxd#33412
should_resetthis none thisrxd#3341

Properties

PropertyDefinerFlagsOwnerValue
help_msg#334rc#361
list of 40{"The generic blueprint is an $area that allows you to duplicate its contents, creating an identical area. This allows one to design an area using whatever $room and $exit types are appropriate, then make as many copies of it as necessary (perhaps you have a block filled with row houses that are all alike).", "", "When you create a $blueprint, the blueprint sets up a room at coordinates 0,0,0. You can enter this room and begin building as you normally would by calling its edit() verb on the command line or via eval. Once invoked you will be transported to the virtual space you are building the blueprint for. When you decide that you're finished editing, you can type 'commit' to be taken back to the blueprint's location. Right now this is mostly intended for use in the matrix, where we can get away with such interfaces. ", "", "When you enter the blueprint it is also added to your features list, so several new commands become available to you (or to players, or anyone who edits the $blueprint).", "", "dig -- works just like @dig, except that it autoparents the room and exits to whatever is set by the blueprint's :default_room verb. By default, :default_room returns the first room in the room type list given in its .types property (more on this later)", "", "focus -- allows the architect to focus on a room, exit, or object. Once you've set a focus, you can operate on that object with the commads below.", "", "ren*ame <name>,alias1,alias2,etc -- renames the user's focus", "", "desc*ribe <text for the description> -- set the description of the user's focus object", "", "mess*ages -- shows the available messages for the user's focus", "mess*ages <message_name> <new_message> -- sets the named message to the text given by the new message", "", "type -- show available types for the focus", "type <num> -- select type <num> for the focus", " ", "Note that as a programmer you can also use all of your existing building tools in a $Blueprint, or copy in rooms from elsewhere. The simplified building interface is intended mainly to allow construction by players, and will be expanded as time permits.", "", "Setting up a $Blueprint requires setting a few key properties:", "", "types -- This is a list of lists that defines what can be constructed within this blueprint via the construction tools. Each list element is a list containing a generic type and a list of available subtypes for that generic. The only required types are $room and $exit, so at a bare minimum your $Blueprint's type list should look like this:", "", "types = {{$room, {$room}}, {$exit, {$exit}}", "", "Ideally it would include a concise list that contains the generics that would be common to the type of area that you're trying to create. For instance, the generic host blueprint defines these types for building matrix areas:", "", "types = {{$room, {#1835}}, {$exit, {#2124, #2178}}", "", "The first room and exit in your subtype list are important as they are what will be retured by the blueprint's :default_room and :default_exit methods, which are used to determine the types used by the 'dig' command.", "", "area_type -- This points to the object that will be the parent of the area created to hold the rooms you define in your blueprint. Set this to whatever is appropriate for the area you'll be creating (should be some descendant of $area).", "", "Once you've got it all set up, you'll be ready to call the area's :instantiate method. Be careful about what you instantiate, though, as there is currently no easy way to clean up after yourself and this could be an enormous source of database bloat if not used carefully.", "", ":instantiate will return the object number of a newly-created area that matches the one in the blueprint. You can then link it in however you choose, just don't lose it!", ""}
adjacent_areas#114rc#361<clear>
reset_listeners#114rc#361{}
recalc_paths_on_reset#114rc#361<clear>
generic_citizen#114rc#361<clear>
citizen_population#114rc#361<clear>
thirst_modifier#114rc#361<clear>
powerplant#114rc#361<clear>
blank_icon#114rc#361<clear>
combat_ok#114rc#361<clear>
combat_fail_msg#114rc#361<clear>
contiguous_map#114rc#361<clear>
icon#114rc#361<clear>
heart#114rc#361"long"
heart_tick#114rc#3618
reset_interval#114rc#361<clear>
last_reset#114rc#3611337755258
contiguous_map_offsets#114rc#361<clear>
area_link_icons#114r#361<clear>
icon_blocks#114rc#361<clear>
adjacent_area_rooms#114rc#361<clear>
value#114rc#361<clear>
has_proper_name#114rc#361<clear>
client_blank_icon#114rc#361<clear>
client_bg_icon#114rc#361<clear>
default_exit_type#114rc#361<clear>
gee#114rc#361<clear>
may_chat#114rc#361<clear>
players#114rc#361{}
dont_hibernate#114rc#3611
linkable#114rc#361<clear>
_allow_combat#114rc#361<clear>
bigmap#114rc#361<clear>
next_hop_ok#114rc#361<clear>
maproom#114rc#361<clear>
area_code#114rwc#361<clear>
claimed_by#114rc#361<clear>
claimable#114rc#361<clear>
multiland#114rc#361<clear>
z_sorted_rooms#114rc#361<clear>
admin_ok#114rc#361<clear>
show_time#114rc#361<clear>
knockout_ok#114rc#361<clear>
dark_night#114rc#361<clear>
path_link_ok#114rc#361<clear>
auto_clean#114rc#361<clear>
docks#114rc#361<clear>
wall_msg#114rc#361<clear>
hibernating#114rc#3610
aliases#1rc#361{"generic blueprint"}
description#1rc#361<clear>
object_size#1r#29{0, 0}
hidden_verbs#1rc#361<clear>
phelp_msg#1rc#361
list of 12{"Generic Blueprint", "=================", "The generic blueprint is an $area that allows you to duplicate its contents, creating an identical area. This allows one to design an area using whatever $room and $exit types are appropriate, then make as many copies of it as necessary (perhaps you have a block filled with row houses that are all alike).", "", "When you create a $blueprint, the blueprint sets up a room at coordinates 0,0,0. You can enter this room and begin building as you normally would by calling its edit() verb on the command line or via eval. Once invoked you will be transported to the virtual space you are building the blueprint for. When you decide that you're finished editing, you can type 'commit' to be taken back to the blueprint's location. Right now this is mostly intended for use in the matrix, where we can get away with such interfaces. ", "", "When you enter the blueprint it is also added to your features list, so several new commands become available to you (or to players, or anyone who edits the $blueprint).", "", "dig -- works just like @dig, except that it autoparents the room and exits to whatever is set by the blueprint's :default_room verb. By default, :default_room returns the first room in the room type list given in its .types property (more on this later)", "", "focus -- allows the architect to focus on a room, exit, or object. Once you've set a focus, you can operate on that object with the commads below.", " "}
weight#1rc#361<clear>
owner_verbs#1rc#361<clear>
plural_name#1rc#361<clear>
client_image#1rc#361<clear>
listening#1rc#361<clear>

Ancestry

Ancestors (nearest first): #114 generic area#1 root

Children: none

Call graph

calls n334_0 #334:initialize n334_8 #334:default_room n334_0->n334_8 n20_59 #20:name_and_number n334_0->n20_59 n334_22 #334:types n334_8->n334_22 n334_2 #334:edit n334_46 #334:can_edit n334_2->n334_46 n6_151 #6:name n334_2->n6_151 n114_28 #114:dname n334_2->n114_28 n334_1 #334:invoke n334_2->n334_1 n107_43 #107:tell n334_2->n107_43 n1_30 #1:name n334_2->n1_30 n334_3 #334:focus n334_3->n107_43 n334_42 #334:valid_blueprint n334_3->n334_42 n334_6 #334:focus_for n334_3->n334_6 n57_9 #57:valid n334_3->n57_9 n44_0 #44:match n334_3->n44_0 n334_3->n334_22 n334_4 #334:change_focus n334_3->n334_4 n334_42->n107_43 n334_42->n1_30 n334_12 #334:lose_focus n334_6->n334_12 n334_5 #334:type n334_5->n107_43 n334_5->n334_42 n334_5->n334_6 n334_7 #334:type_for n334_5->n334_7 n334_7->n20_59 n334_7->n334_22 n334_9 #334:default_exit n334_9->n334_22 n334_10 #334:dig n334_10->n334_8 n334_10->n107_43 n334_10->n334_42 n334_10->n334_9 n1_42 #1:occupants n334_10->n1_42 n21_11 #21:match_cardinal_dir n334_10->n21_11 n21_12 #21:opposite_dir n334_10->n21_12 n21_13 #21:exit_aka n334_10->n21_13 n20_38 #20:explode n334_10->n20_38 n103_1 #103:spawn n334_10->n103_1 n57_2 #57:_create n334_10->n57_2 n17_2 #17:set_owner n334_10->n17_2 n21_14 #21:make_exit_pair n334_10->n21_14 n334_11 #334:ren*ame n334_11->n107_43 n334_11->n334_42 n334_11->n334_6 n20_5 #20:from_list n334_11->n20_5 n21_1 #21:set_names n334_11->n21_1 n334_13 #334:commit n334_13->n1_30 n334_13->n334_42 n334_13->n334_12 n334_14 #334:desc*ribe n334_14->n107_43 n334_14->n334_42 n334_14->n334_6 n334_14->n20_38 n1_11 #1:tell_lines n334_14->n1_11 n334_15 #334:mess*ages n334_15->n107_43 n334_15->n334_42 n334_15->n334_6 n334_15->n20_38 n334_15->n20_5 n45_1 #45:all_properties n334_15->n45_1 n6_9 #6:notify n334_15->n6_9 n20_48 #20:print n334_15->n20_48 n334_16 #334:set_message n334_15->n334_16 n334_16->n334_6 n334_16->n6_9 n334_17 #334:instantiate n334_17->n103_1 n51_62 #51:copy_verb n334_17->n51_62 n48_8 #48:suspend_if_needed n334_17->n48_8 n334_20 #334:furnish n334_17->n334_20 n334_21 #334:copy_props n334_17->n334_21 n334_20->n103_1 n334_20->n48_8 n334_20->n334_21 n334_21->n20_59 n334_21->n45_1 n334_18 #334:del*ete n334_18->n20_59 n334_18->n107_43 n334_18->n334_42 n334_18->n334_6 n334_18->n334_13 n334_18->n48_8

Showing 48 of 104 verbs; 56 not shown.

Source

initialize

Spec this none thisFlags rxdOwner #361Definer #334

Referenced by

none

Source

1room_type = this:default_room();
2$bpnet:debug($su:nn(this), ": Room type -> ", $su:nn(room_type));
3if (valid(room_type))
4room = this.owner:_create(room_type);
5$bpnet:debug($su:nn(this), ": spawn -> ", $su:nn(room));
6move(room, this);
7this.entrance = room;
8endif

invoke

Spec this none thisFlags rxdOwner #361Definer #334

Referenced by

Source

1who = args[1];
2who:add_feature(this);
3who:moveto(this.entrance);

edit

Spec this none noneFlags rxdOwner #361Definer #334

Referenced by

none

Source

1if (this:can_edit(player))
2player.location:announce(((player:name() + " disappears into ") + this:dname()) + ".");
3this:invoke(player);
4else
5player:tell(("Sorry, you are not permitted to edit " + this:name()) + ".");
6endif

focus

Spec any any anyFlags rxdOwner #361Definer #334

Referenced by

none

Source

1if (!this:valid_blueprint())
2return;
3endif
4if (!argstr)
5focus = this:focus_for(player);
6if (!$recycler:valid(focus))
7player:tell("You aren't focusing on anything.");
8else
9player:tell(((("You are currently focusing on " + focus.name) + " (in ") + focus.location.name) + ").");
10endif
11return;
12endif
13target = dobj;
14if (!$recycler:valid(target))
15target = $match_utils:match(argstr, {@player.location.contents});
16if (!$recycler:valid(target))
17player:tell(("You don't see any \"" + argstr) + "\" to focus on.");
18return;
19endif
20endif
21for x in (this:types())
22if (is_a(target, x[1]))
23this:change_focus(player, target);
24player:tell(("You focus on " + target:dname()) + ".");
25return;
26endif
27endfor
28player:tell(target:dnamec() + " isn't something you can focus on.");

change_focus

Spec this none thisFlags rxdOwner #361Definer #334

Referenced by

Source

1who = args[1];
2focus = args[2];
3for x in (this.focus)
4if (x[1] == who)
5this.focus = setremove(this.focus, x);
6endif
7endfor
8this.focus = setadd(this.focus, {who, focus});

type

Spec any none noneFlags rxdOwner #361Definer #334

Referenced by

none

Source

1if (!this:valid_blueprint())
2return;
3endif
4if (!valid(focus = this:focus_for(player)))
5player:tell("You're not focusing on anything.");
6return;
7endif
8types = this:type_for(focus);
9if (!dobjstr)
10player:tell((focus.name + " is currently of type: ") + parent(focus).name);
11player:tell(("Available types for " + focus.name) + ":");
12for y in [1..length(types)]
13player:tell((tostr(y) + ". ") + types[y].name);
14endfor
15return;
16player:tell(("There are no types available for " + focus.name) + ".");
17return;
18else
19selection = tonum(dobjstr);
20if ((selection < 1) || (selection > length(types)))
21player:tell(((("\"" + dobjstr) + "\" isn't a valid type choice for ") + focus.name) + ".");
22return;
23endif
24player:tell(((((("Changing " + focus.name) + " from ") + parent(focus).name) + " to ") + types[selection].name) + ".");
25chparent(focus, types[selection]);
26if (is_a(focus, $door) && is_a(focus.otherside, $exit))
27chparent(focus.otherside, types[selection]);
28endif
29endif

focus_for

Spec this none thisFlags rxdOwner #361Definer #334

Referenced by

Source

1who = args[1];
2for x in (this.focus)
3if (x[1] == who)
4if (x[2] in {who.location, @who.location.contents})
5return x[2];
6else
7this:lose_focus(who);
8return #-1;
9endif
10endif
11endfor
12return #-1;

type_for

Spec this none thisFlags rxdOwner #361Definer #334

Referenced by

Source

1focus = args[1];
2for x in (this:types())
3if (is_a(focus, x[1]))
4types = x[2];
5for y in (types)
6if (!is_a(y, x[1]))
7$nets.bpnet:announce(#2, (((($su:nn(this) + " has type ") + $su:nn(y)) + " for ") + $su:nn(x[1])) + " that isn't a child of it.", 1);
8types = setremove(types, y);
9endif
10endfor
11return types;
12endif
13endfor
14return {};
15types = x[2];

default_room

Spec this none thisFlags rxdOwner #361Definer #334

Referenced by

Source

1for x in (this:types())
2if (is_a(x[1], $room))
3return x[2][1];
4endif
5endfor
6return #-1;

default_exit

Spec this none thisFlags rxdOwner #361Definer #334

Referenced by

Source

1for x in (this:types())
2if (is_a(x[1], $exit))
3return x[2][1];
4endif
5endfor
6return #-1;

dig

Spec any at/to anyFlags rxdOwner #361Definer #334

Referenced by

none

Source

1"dig <exitspec> to <roomspec>";
2"  <exitspec> can either be a cardinal direction or a namespec for an exit";
3"  pair, which would look something like this:";
4"     northern door,door,north,n|southern door,door,south,s";
5"  As you can see, it's a list of name and aliases for each side of the exit";
6"  pair.";
7"  <roomspec> can be either a name,aliases spec for a new room, or a room";
8"  number from an existing room in the blueprint (as given by the 'rooms'";
9"  command).";
10if (!this:valid_blueprint())
11return;
12endif
13spec1 = spec2 = "";
14"parse the roomspec";
15if (((roomnum = tonum(iobjstr)) < 1) || (roomnum > length(rooms = this:occupants($room))))
16"this isn't a number spec, so we'll treat it as the name of a new room";
17dest = #-1;
18else
19dest = rooms[roomnum];
20endif
21"parse the exitspec";
22if (cdir = $building_utils:match_cardinal_dir(dobjstr))
23if (is_a(existing = player.location:match_exit(dobjstr), $exit))
24player:tell("There's already an exit in that direction.");
25return;
26else
27opposite = $building_utils:opposite_dir(dobjstr);
28if (is_a(dest, $room) && is_a(oexisting = dest:match_exit(opposite), $exit))
29player:tell(("There's already an exit leading " + opposite) + " back out of ", dest.name, ".");
30return;
31endif
32xaliases1 = {cdir, @$building_utils:exit_aka(cdir)};
33xaliases2 = {opposite, @$building_utils:exit_aka(opposite)};
34endif
35else
36"a detailed exit spec was given.";
37specs = $su:explode(dobjstr, "|");
38if (length(specs) != 2)
39player:tell("Invalid exit spec.  They should look like this: this_side_name,alias1,alias2|other_side_name,alias1,alias2");
40return;
41endif
42xaliases1 = $su:explode(specs[1], ",");
43xaliases2 = $su:explode(specs[2], ",");
44endif
45"create the room if neccesary";
46if (!valid(dest))
47player:tell("Creating destination room '", iobjstr, "'.");
48if (this.use_spawn)
49dest = $rpg:spawn(this:default_room());
50else
51dest = $recycler:_create(this:default_room());
52$wiz_utils:set_owner(dest, player);
53endif
54dest:moveto(player.location:area());
55dest:set_name(iobjstr);
56dest.x = dest.y = dest.z = 9999;
57player:tell("Created '", dest.name, "' destination room.");
58endif
59"create the exits";
60default_exit = this:default_exit();
61{exit1, exit2} = $building_utils:make_exit_pair(player.location, dest);
62chparent(exit1, default_exit);
63chparent(exit2, default_exit);
64$wiz_utils:set_owner(exit1, this.use_spawn ? #984 | player);
65$wiz_utils:set_owner(exit2, this.use_spawn ? #984 | player);
66exit1:set_name(xaliases1[1]);
67exit1.direction = xaliases1[1];
68exit1:set_aliases(xaliases1);
69player:tell("Created '", exit1.name, "' as an exit.");
70player.location:add_exit(exit1);
71exit2:set_name(xaliases2[1]);
72exit2.direction = xaliases2[1];
73exit2:set_aliases(xaliases2);
74player:tell("Created '", exit2.name, "' as an exit.");
75dest:add_exit(exit2);
76player:tell("Exit fully linked!");
77player.location:set_xyz_rec();

ren*ame

Spec any none noneFlags rxdOwner #361Definer #334

Referenced by

none

Source

1if (!this:valid_blueprint())
2return;
3endif
4focus = this:focus_for(player);
5if (!valid(focus))
6player:tell(this.not_focused_msg);
7return;
8endif
9if (!dobjstr)
10player:tell($su:from_list(this:focus_for(player).aliases, ", "));
11else
12player:tell(((("Changed the aliases from " + $su:from_list(focus.aliases, ",")) + " to ") + dobjstr) + ".");
13$building_utils:set_names(focus, dobjstr);
14endif

lose_focus

Spec this none thisFlags rxdOwner #361Definer #334

Referenced by

Source

1who = args[1];
2for x in (this.focus)
3if (x[1] == who)
4this.focus = setremove(this.focus, x);
5endif
6endfor

commit

Spec none none noneFlags rxdOwner #361Definer #334

Referenced by

Source

1{?who = player} = args;
2if (!this:valid_blueprint())
3return;
4elseif (!is_in(who, this))
5return who:tell("I don't understand that.");
6endif
7who.location:announce(((who:name() + " pops out of ") + this:name()) + ".");
8who:moveto(this.location);
9who:remove_feature(this);
10this:lose_focus(who);
11this.location:announce_all_but({who}, ((who:name() + " pops out of ") + this:name()) + ".");

desc*ribe

Spec any any anyFlags rxdOwner #361Definer #334

Referenced by

none

Source

1if (!this:valid_blueprint())
2return;
3endif
4focus = this:focus_for(player);
5if (!valid(focus))
6player:tell(this.not_focused_msg);
7return;
8endif
9if (!argstr)
10player:tell(("Current description for " + focus.name) + ":");
11player:tell_lines(focus.description);
12else
13focus:set_description($su:explode(argstr, "//"));
14player:tell(("Description set for " + focus.name) + ".");
15endif

mess*ages

Spec any any anyFlags rxdOwner #361Definer #334

Referenced by

none

Source

1if (!this:valid_blueprint())
2return;
3endif
4focus = this:focus_for(player);
5if (!valid(focus))
6player:tell(this.not_focused_msg);
7return;
8endif
9if (!argstr)
10found_one = 0;
11props = $object_utils:all_properties(focus);
12if (typeof(props) == ERR)
13player:notify("You can't read the messages on that.");
14return;
15endif
16for pname in (props)
17len = length(pname);
18if ((len > 4) && (pname[len - 3..len] == "_msg"))
19found_one = 1;
20msg = `focus.(pname) ! ANY';
21if (msg == E_PERM)
22value = "isn't readable by you.";
23elseif (!msg)
24value = "isn't set.";
25elseif (typeof(msg) == LIST)
26value = "is a list.";
27elseif (typeof(msg) != STR)
28value = "is corrupted! **";
29else
30value = "is " + $string_utils:print(msg);
31endif
32player:notify(tostr(pname[1..len - 4], " ", value));
33endif
34endfor
35if (!found_one)
36player:notify("That object doesn't have any messages to set.");
37endif
38else
39{message, @content} = $su:explode(argstr);
40this:set_message(message, $su:from_list(content, " "));
41endif

set_message

Spec this none thisFlags rxdOwner #361Definer #334

Referenced by

Source

1"Copied from generic area editor FO (#11715):set_message by Satan (#2) Sat Apr  2 16:54:43 2005 PST";
2focus = this:focus_for(player);
3message = args[1];
4if (length(args) > 1)
5content = args[2];
6else
7content = 0;
8endif
9if (content == 0)
10if (E_PROPNF == (get = `focus.(message + "_msg") ! ANY'))
11player:notify(tostr(focus.name, " has no \"", message, "\" message."));
12elseif (typeof(get) == ERR)
13player:notify(tostr(get));
14elseif (!get)
15player:notify("Message is not set.");
16else
17player:notify(tostr("The \"", message, "\" message of ", focus.name, ":"));
18player:notify(tostr(get));
19endif
20else
21set = focus:set_message(message, content);
22if (set)
23if (typeof(set) == STR)
24player:notify(set);
25else
26player:notify(tostr("You set the \"", message, "\" message of ", focus.name, "."));
27endif
28elseif (set == E_PROPNF)
29player:notify(tostr(focus.name, " has no \"", message, "\" message to set."));
30elseif (typeof(set) == ERR)
31player:notify(tostr(set));
32else
33player:notify(tostr("You clear the \"", message, "\" message of ", focus.name, "."));
34endif
35endif

instantiate

Spec this none thisFlags rxdOwner #361Definer #334

Referenced by

none

Source

1"fertilize everything";
2"this:fertilize(this);";
3"first create the area";
4if (!is_a(this.area_type, $area))
5return E_INVARG;
6endif
7area = $rpg:spawn(this.area_type);
8area.blank_icon = this.blank_icon;
9"add the uninstantiate verb";
10$code_utils:copy_verb($blueprint, "uninstantiate", area);
11"now generate the rooms";
12for room in (this.contents)
13$command_utils:suspend_if_needed(0);
14newroom = $rpg:spawn(parent(room));
15add_property(room, "copy_room", newroom, {this.owner, "r"});
16add_property(newroom, "orig_room", room, {this.owner, "r"});
17newroom:moveto(area);
18this:furnish(room, newroom);
19this:copy_props(room, newroom);
20newroom:set_name(room.name);
21newroom:set_aliases(room.aliases);
22endfor
23done_exits = {};
24for room in (this.contents)
25"create the exits";
26$command_utils:suspend_if_needed(0);
27for exit in (room:occupants($exit))
28if (!(exit in done_exits))
29newexit = $rpg:spawn(parent(exit));
30this:copy_props(exit, newexit);
31newother = $rpg:spawn(parent(exit.otherside));
32this:copy_props(exit.otherside, newother);
33target = room.copy_room;
34othertarget = exit.otherside.location.copy_room;
35if (valid(target))
36newexit:moveto(target);
37endif
38if (valid(othertarget))
39newother:moveto(othertarget);
40endif
41newexit.otherside = newother;
42newother.otherside = newexit;
43newexit:set_name(exit.name);
44newexit:set_aliases(exit.aliases);
45newexit.direction = exit.direction;
46newother:set_name(exit.otherside.name);
47newother:set_aliases(exit.otherside.aliases);
48newother.direction = exit.otherside.direction;
49"handle mods";
50for mod in (exit.contents)
51newmod = $rpg:spawn(parent(mod));
52if (is_a(newmod, $lock) && $api.lockable:is_on(newexit))
53newexit.lock = newmod;
54endif
55newmod:moveto(newexit);
56endfor
57done_exits = {@done_exits, exit, exit.otherside};
58endif
59endfor
60endfor
61for newroom in (area.contents)
62newroom.exits = newroom:occupants($exit);
63delete_property(newroom.orig_room, "copy_room");
64delete_property(newroom, "orig_room");
65$command_utils:suspend_if_needed(0);
66endfor
67area:store_sorted_rooms_by_z();
68{?new_owner = #984} = args;
69if (args && is_player(new_owner))
70area:chown(new_owner);
71endif
72area.knockout_ok = 1;
73return area;

del*ete

Spec none none noneFlags rxdOwner #361Definer #334

Referenced by

none

Source

1if (!this:valid_blueprint())
2return;
3endif
4if (!is_in(player, this))
5return player:tell("I don't understand that.");
6endif
7focus = this:focus_for(player);
8if (!valid(focus))
9player:tell(this.not_focused_msg);
10return;
11endif
12if (is_a(focus, $exit))
13otherside = focus.otherside;
14recycle_targets = {focus};
15if (valid(otherside))
16room = otherside.location;
17if (is_a(room, $room))
18recycle_targets = setadd(recycle_targets, room);
19for x in (room.contents)
20recycle_targets = setadd(recycle_targets, x);
21endfor
22for x in (room.exits)
23recycle_targets = setadd(recycle_targets, x);
24if (is_a(x.otherside, $exit))
25recycle_targets = setadd(recycle_targets, x.otherside);
26endif
27endfor
28recycle_targets = setadd(recycle_targets, otherside);
29endif
30endif
31player:tell((((((($ansi.red + "WARNING: ") + $ansi.reset) + "Deleting ") + focus.name) + " will also result in the deletion of ") + $su:english_list($lu:map_verb(recycle_targets, "name"))) + ".  Are you sure you want to do this?");
32if ($command_utils:yes_or_no())
33set_task_perms(player);
34player:tell("Recycling...");
35for x in (recycle_targets)
36try
37$cu:sin(0);
38if (is_player(x))
39this:commit(x);
40elseif (!gamevalid(x))
41"DO NOTHING.";
42else
43$recycler:_recycle(x);
44endif
45except e (ANY)
46$rpg:report_error(e, {"Object was " + $su:nn(x)});
47endtry
48endfor
49player:tell("Done.");
50else
51player:tell("Aborted.");
52endif
53endif

reset

Spec any none noneFlags rxdOwner #361Definer #334

Referenced by

none

Source

1if (!this:valid_blueprint())
2return;
3endif
4if (dobjstr && (dobjstr == "map"))
5player:tell($ansi.bold_on, $ansi.yellow, "Starting map reset...", $ansi.reset);
6this:reset_map();
7return player:tell($ansi.bold_on, "Finished resetting the map...", $ansi.reset);
8elseif (dobjstr)
9return player:tell("Reset what? You can either 'reset' by itself for a full reset or 'reset map' to redraw radars.");
10endif
11player:tell("");
12player:tell($ansi.bold_on + "Compiling area ", $su:nn(this), "..." + $ansi.reset);
13this:find_all_paths();
14suspend(2);
15this:find_transitions();
16suspend(1);
17this:calculate_offset();
18suspend(1);
19this:find_reset_listeners();
20suspend(1);
21player:tell($ansi.yellow + $ansi.bold_on, "Locating airstrips...", $ansi.reset);
22this:write_airstrips();
23suspend(1);
24if (!is_a(this.bigmap, $bigmap))
25player:tell($ansi.yellow + $ansi.bold_on, "Storing a cache of z sorted rooms...", $ansi.reset);
26this:store_sorted_rooms_by_z();
27suspend(1);
28endif
29player:tell($ansi.yellow + $ansi.bold_on, "Rewriting landmark_msg on outdoors...", $ansi.reset);
30this:write_landmarks();
31suspend(1);
32if (is_a(this.bigmap, $bigmap))
33player:tell($ansi.yellow + $ansi.bold_on, ("WARNING: This area is part of a $bigmap so I will not redraw radars. Do @reset-maps " + tostr(this.bigmap)) + " to reset it.", $ansi.reset);
34else
35player:tell($ansi.yellow + $ansi.bold_on, "Forcing redraw of all radars...", $ansi.reset);
36this:reset_map();
37suspend(1);
38endif
39player:tell($ansi.bold_on + $ansi.yellow, "Resetting the area...", $ansi.reset);
40this:do_reset();
41player:tell($ansi.bold_on + "Done compiling ", $su:nn(this), "." + $ansi.reset);
42player:tell("");

furnish

Spec this none thisFlags rxdOwner #361Definer #334

Referenced by

Source

1room = args[2];
2if (!is_a(room, $room))
3return E_INVARG;
4endif
5parent = args[1];
6for x in (parent.contents)
7$cu:sin(0);
8if (is_a(x, $exit))
9continue;
10elseif (is_a(x, $player))
11continue;
12endif
13newobj = $rpg:spawn(parent(x));
14this:copy_props(x, newobj);
15newobj:moveto(room);
16endfor

copy_props

Spec this none thisFlags rxdOwner #361Definer #334

Referenced by

Source

1set_task_perms(caller_perms());
2source = args[1];
3dest = args[2];
4#271474:announce(#2, tostr("Copying properties from ", $su:nn(source), " to ", $su:nn(dest)), 1);
5dest:set_name(source.name);
6dest:set_aliases(source.aliases);
7for x in ($set_utils:difference($ou:all_properties(source), {"name", "aliases", "copy_room", "otherside"}))
8if (!has_property(dest, x))
9add_property(dest, x, source.(x), {player, "rc"});
10else
11dest.(x) = source.(x);
12endif
13yield;
14endfor

types

Spec this none thisFlags rxdOwner #361Definer #334

Referenced by

Source

1return this.(verb);

rooms

Spec none none noneFlags rxdOwner #361Definer #334

Referenced by

none

Source

1if (!this:valid_blueprint())
2return;
3endif
4if (!is_in(player, this))
5return player:tell("You need to be inside the blueprint first!");
6endif
7for x in [1..length(rooms = this:occupants($room))]
8player:tell("[", x, "] ", rooms[x].name);
9endfor

fertilize

Spec this none thisFlags rxdOwner #361Definer #334

Referenced by

Source

1set_task_perms(caller_perms());
2what = args[1];
3what.r = 1;
4what.f = 1;
5for x in (what.contents)
6if (!is_a(x, $creature))
7this:fertilize(x);
8endif
9endfor

_itemize_costs

Spec this none thisFlags rxdOwner #361Definer #334

Referenced by

Source

1target = args[1];
2invoice = {{target, `target.value ! ANY => 0'}};
3for x in (target.contents)
4$cu:sin(1);
5if (is_a(x, $creature))
6continue;
7endif
8invoice = {@invoice, @this:_itemize_costs(x)};
9endfor
10return invoice;

invoice

Spec this none thisFlags rxdOwner #361Definer #334

Referenced by

none

Source

1line_items = this:_itemize_costs(this);
2lines = (typeof(this.description) == LIST) ? this.description | {this.description};
3lines = {@lines, (("Invoice for construction of " + $ansi.cyan) + this.name) + $ansi.reset, (($ansi.black + $ansi.bold_on) + $su:left("", 52, "=")) + $ansi.reset, ($su:left("Item", 40) + "  ") + $su:center("Cost", 10), (($ansi.black + $ansi.bold_on) + $su:left("", 52, "=")) + $ansi.reset};
4total = 0;
5for x in (line_items)
6if (x[2] > 0)
7lines = {@lines, (($ansi.bold_on + ($su:left(x[1].name, -40) + "  ")) + $su:right(tostr(x[2]), -10)) + $ansi.reset};
8total = total + x[2];
9endif
10endfor
11lines = {@lines, $su:right(((($ansi.bold_on + "Total:  ") + $ansi.green) + tostr(total)) + $ansi.reset, -52)};
12player:tell_lines(lines);

uninstantiate

Spec this none thisFlags rxdOwner #361Definer #334

Referenced by

none

Source

1":uninstantiate(OBJ dest [, INT junk])  Destroy all rooms and exits and dump all contents into dest.  Returns the list of objects moved there.  If junk=true, try to junk objects first.";
2if (this.f)
3return E_INVARG;
4endif
5junkdest = args[1];
6tryjunk = (length(args) > 1) ? args[2] | 0;
7junk = kill = {};
8for x in (this.contents)
9for y in (x.contents)
10if (is_a(y, $exit))
11kill = {@kill, y};
12else
13if (tryjunk && $rpg:junk(y, 1))
14kill = {@kill, y};
15else
16junk = {@junk, y};
17endif
18endif
19endfor
20kill = {@kill, x};
21$cu:sin(0);
22endfor
23fork (0)
24for x in (junk)
25x:moveto(junkdest);
26$cu:sin(0);
27endfor
28for x in (kill)
29$recycler:_recycle(x);
30$cu:sin(0);
31endfor
32$recycler:_recycle(this);
33endfork
34return junk;

_total_cost

Spec this none thisFlags rxdOwner #361Definer #334

Referenced by

none

Source

1invoice = this:_itemize_costs(this);
2total = 0;
3for x in (invoice)
4total = total + x[2];
5endfor
6return total;

bpname

Spec any any anyFlags rxdOwner #361Definer #334

Referenced by

none

Source

1if (!this:valid_blueprint())
2return;
3endif
4if (!is_in(player, this))
5return player:tell("Nice try.");
6endif
7focus = this;
8if (!argstr)
9player:tell($su:from_list(focus.aliases, ", "));
10else
11player:tell(((("Changed the aliases from " + $su:from_list(focus.aliases, ",")) + " to ") + dobjstr) + ".");
12$building_utils:set_names(focus, dobjstr);
13endif

bpdesc

Spec any any anyFlags rxdOwner #361Definer #334

Referenced by

none

Source

1if (!this:valid_blueprint())
2return;
3endif
4focus = this;
5if (!argstr)
6player:tell_lines((typeof(this.description) == STR) ? {this.description} | this.description);
7else
8this.description = argstr;
9player:tell(("Changed the description for  " + this.name) + " changed.");
10endif

sky_room

Spec this none thisFlags rxdOwner #361Definer #334

Referenced by

none

Source

1return #-1;

@list-costs

Spec this none noneFlags rxdOwner #361Definer #334

Referenced by

none

Source

1total = 0;
2if (!this:can_edit(player))
3return player:tell("Not yours.");
4endif
5for thing in ($lu:sort_alist($blueprint:_itemize_costs(this), 2))
6if (thing[2] <= 0)
7continue;
8endif
9total = total + thing[2];
10player:tell($su:left($su:nn(thing[1]), -50), " ", $ansi.green, "$", $su:right($su:group_number(thing[2]), -15), $ansi.reset);
11endfor
12player:tell($ansi.bold_on, $su:left("  Total:", -50), " ", $ansi.green, "$", $su:right($su:group_number(total), -15), $ansi.reset);

bury

Spec any none noneFlags rxdOwner #361Definer #334

Referenced by

none

Source

1"bury [exit] <exit> -- tries to recycle the exit and the room it leads to, performing sanity checks along the way.  If the word 'exit' appears as the first arg then we assume that the user's intention is only to remove the exit, not the room beyond.";
2if (!this:valid_blueprint())
3return;
4endif
5"handle the case where the user only wants to get rid of the exit";
6if ((length(dobjstr) > 5) && (dobjstr[1..4] == "exit"))
7if (is_a(exit = $match_utils:match(dobjstr[6..$], {@player.location.exits}), $exit))
8if (is_a(exit.otherside, $exit) && is_a(room = exit.otherside.location, $room))
9if (length(room.exits) == 1)
10player:tell(((("You can remove that exit (" + exit:name()) + ") because it's the only way out of ") + room:name()) + ".  Try burying the room instead.");
11return;
12endif
13endif
14player:tell(((("Removing exits " + exit:name()) + " and ") + exit.otherside:name()) + "...");
15this:bury_exit(exit);
16player:tell("Done.");
17return;
18else
19player:tell("Couldn't find an exit by that name.");
20return;
21endif
22endif
23exit = is_a(dobj, $exit) ? dobj | $match_utils:match(dobjstr, {@player.location.exits});
24if (!is_a(exit, $exit))
25player:tell(("Couldn't find any exits matching '" + dobjstr) + "'.");
26return;
27elseif (!is_a(exit.otherside, $exit))
28player:tell(("Burying " + exit:name()) + ".");
29$recycler:_recycle(exit);
30return;
31elseif (!is_a(exit.otherside.location, $room))
32player:tell(((("Burying " + exit:name()) + " and ") + exit.otherside:name()) + ".");
33$recycler:_recycle(exit.otherside);
34$recycler:_recycle(exit);
35return;
36elseif (exit.otherside.location == this.entrance)
37player:tell(((("You can't bury " + exit.otherside.location:name()) + " because it's the entrance to ") + this:name()) + ".");
38return;
39elseif (this:bury_would_orphan(exit))
40player:tell(((("You can't bury the room (" + exit.otherside.location:name()) + ") through that exit (") + exit:name()) + ") because it would cut off the path to some other existing rooms.  Make sure there is a path to rooms beyond the room you wish to bury (or bury the rooms beyond) before you proceed.");
41return;
42else
43if ($command_utils:yes_or_no(((("That exit (" + exit:name()) + ") leads to ") + exit.otherside.location:name()) + ", are you sure you want to permanently delete that room, its contents, and the exits leading to it?"))
44recycled = this:bury_room(exit.otherside.location);
45if (typeof(recycled) == LIST)
46if (!recycled)
47player:tell("Nothing actually got recycled.  Please ask an admin for help.");
48return;
49endif
50player:tell(("Buried " + $su:english_list(recycled)) + ".");
51else
52player:tell("Failed to bury that room because there was something in it that couldn't be junked.");
53return;
54endif
55else
56player:tell("Aborted.");
57return;
58endif
59endif

bury_room

Spec this none thisFlags rxdOwner #361Definer #334

Referenced by

Source

1":bury_room(OBJ room) => recycles the room and any exits leading into it";
2target = args[1];
3recycled = {};
4if ((((!is_a(target, $room)) || (!is_a(target:area(), $blueprint))) || (target == this.entrance)) || (length(target.exits) > 1))
5return E_INVARG;
6endif
7for junk in ($set_utils:difference(target.contents, target.exits))
8$cu:sin(0);
9name = junk:name();
10if ($rpg:junk(junk))
11recycled = {@recycled, name};
12else
13return E_INVARG;
14endif
15endfor
16for exit in (target.exits)
17$cu:sin(0);
18if (is_a(exit.otherside, $exit))
19name = exit.otherside:name();
20$recycler:_recycle(exit.otherside);
21recycled = {@recycled, name};
22endif
23name = exit:name();
24$recycler:_recycle(exit);
25recycled = {@recycled, name};
26endfor
27name = target:name();
28$recycler:_recycle(target);
29recycled = {@recycled, name};
30return recycled;

bury_would_orphan

Spec this none thisFlags rxdOwner #361Definer #334

Referenced by

Source

1":bury_would_orphan(OBJ exit) => returns true it burying the room this exit points to would orphan some other rooms in the blueprint";
2exit = args[1];
3if ((((!is_a(exit:area(), $blueprint)) || (!is_a(exit, $exit))) || (!is_a(exit.otherside, $exit))) || (!is_a(exit.otherside.location, $room)))
4return E_INVARG;
5endif
6target = exit.otherside.location;
7"If there are no other exits then there's no danger";
8if (length(target.exits) == 1)
9return 0;
10endif
11"If there are other exits make sure the rooms they point to can still be reached";
12for x in (setremove(target.exits, exit.otherside))
13if (is_a(x.otherside, $exit) && is_a(room = x.otherside.location, $room))
14"we found an exit leading somewhere else, make sure somewhere else is still reachable";
15if (this:path_exists(room, this.entrance, target))
16return 0;
17endif
18endif
19endfor
20return 1;

find_path

Spec this none thisFlags rxdOwner #361Definer #334

Referenced by

Source

1":find_path(OBJ source_room, OBJ dest_room[, LIST forbidden_rooms]) => tries to find a way to get from source to dest";
2"Yes, I know this doesn't cache and it's a depth-first search that uses recursion, I just needed something quick to decide whether there's still a path to rooms connected to a room that's about to be deleted by a blueprint user.";
3source = args[1];
4dest = args[2];
5"make sure we don't pass back through the source room";
6if (length(args) > 2)
7forbidden = setadd(args[3], source);
8else
9forbidden = {source};
10endif
11for x in (source.exits)
12if (is_a(x.otherside, $exit) && is_a(room = x.otherside.location, $room))
13if (room in forbidden)
14continue;
15endif
16if (room == dest)
17return {x};
18endif
19if (path = this:find_path(x.otherside.location, dest, forbidden))
20return {x, @path};
21endif
22endif
23endfor
24return {};

bury_exit

Spec this none thisFlags rxdOwner #361Definer #334

Referenced by

Source

1exit = args[1];
2if ((!is_a(exit, $exit)) || (!is_a(exit:area(), $blueprint)))
3return E_INVARG;
4endif
5if (is_a(exit.otherside, $exit))
6$recycler:_recycle(exit.otherside);
7endif
8$recycler:_recycle(exit);

instantiate_new

Spec this none thisFlags rxdOwner #361Definer #334

Referenced by

none

Source

1"fertilize everything";
2"this:fertilize(this);";
3"first create the area";
4if (!is_a(this.area_type, $area))
5return E_INVARG;
6endif
7area = $rpg:spawn(this.area_type);
8"add the uninstantiate verb";
9$code_utils:copy_verb($blueprint, "uninstantiate", area);
10"now generate the rooms";
11for room in (this.contents)
12$command_utils:suspend_if_needed(0);
13newroom = $rpg:spawn(parent(room));
14add_property(room, "copy_room", newroom, {this.owner, "r"});
15add_property(newroom, "orig_room", room, {this.owner, "r"});
16newroom:moveto(area);
17this:furnish(room, newroom);
18this:copy_props(room, newroom);
19newroom:set_name(room.name);
20newroom:set_aliases(room.aliases);
21endfor
22done_exits = {};
23for room in (this.contents)
24"create the exits";
25$command_utils:suspend_if_needed(0);
26for exit in (room:occupants($exit))
27if (!(exit in done_exits))
28newexit = $rpg:spawn(parent(exit));
29newother = $rpg:spawn(parent(exit.otherside));
30target = room.copy_room;
31othertarget = exit.otherside.location.copy_room;
32if (valid(target))
33newexit:moveto(target);
34endif
35if (valid(othertarget))
36newother:moveto(othertarget);
37endif
38newexit.otherside = newother;
39newother.otherside = newexit;
40newexit:set_name(exit.name);
41newexit:set_aliases(exit.aliases);
42newexit.direction = exit.direction;
43newother:set_name(exit.otherside.name);
44newother:set_aliases(exit.otherside.aliases);
45newother.direction = exit.otherside.direction;
46done_exits = {@done_exits, exit, exit.otherside};
47endif
48endfor
49endfor
50for newroom in (area.contents)
51newroom.exits = newroom:occupants($exit);
52delete_property(newroom.orig_room, "copy_room");
53delete_property(newroom, "orig_room");
54$command_utils:suspend_if_needed(0);
55endfor
56return area;

path_exists

Spec this none thisFlags rxdOwner #361Definer #334

Referenced by

Source

1":path_exists(OBJ source_room, OBJ dest_room, OBJ avoid) => 1 if you can get there from here without going to 'avoid'";
2"decide whether there's still a path to rooms connected to a room that's about to be deleted by a blueprint user.";
3{source, dest, avoid} = args;
4closed = {avoid};
5open = {source};
6while (open)
7current = open[1];
8if (current == dest)
9return 1;
10endif
11open = open[2..$];
12neighbors = {};
13for e in (current.exits)
14if (valid(e.otherside) && valid(next = e.otherside.location))
15if ((!(next in closed)) && (!(next in open)))
16open = {@open, next};
17endif
18endif
19endfor
20closed = {@closed, current};
21$cu:sin();
22endwhile
23return 0;

warp

Spec any none noneFlags rxdOwner #361Definer #334

Referenced by

none

Source

1if (!is_in(player, this))
2return player:tell("You need to be inside the blueprint first!");
3endif
4if (((roomnum = tonum(dobjstr)) < 1) || (roomnum > length(rooms = this:occupants($room))))
5player:tell("That isn't a valid room, try the 'rooms' command.");
6return;
7endif
8dest = rooms[roomnum];
9#271474:announce(#2, tostr("Warping player ", $su:nn(player), " from ", $su:nn(player.location), " to ", $su:nn(dest)), 1);
10player:moveto(dest);

instantiate_old

Spec this none thisFlags rxdOwner #361Definer #334

Referenced by

none

Source

1"Copied from generic blueprint area (#334):instantiate by Satan (#2) Fri Sep 26 17:53:31 2008 CDT";
2if (!is_a(this.area_type, $area))
3return E_INVARG;
4endif
5"fertilize everything";
6"this:fertilize(this);";
7"first create the area";
8if (!is_a(this.area_type, $area))
9return E_INVARG;
10endif
11area = $rpg:spawn(this.area_type);
12"add the uninstantiate verb";
13$code_utils:copy_verb($blueprint, "uninstantiate", area);
14"now generate the rooms";
15for room in (this.contents)
16$command_utils:suspend_if_needed(0);
17newroom = $rpg:spawn(parent(room));
18newroom:moveto(area);
19this:furnish(room, newroom);
20this:copy_props(room, newroom);
21if (0)
22newroom:set_name(room.name);
23newroom:set_aliases(room.aliases);
24endif
25endfor
26done_exits = {};
27for room in (this.contents)
28"create the exits";
29$command_utils:suspend_if_needed(0);
30for exit in (room:occupants($exit))
31if (!(exit in done_exits))
32newexit = $rpg:spawn(parent(exit));
33newother = $rpg:spawn(parent(exit.otherside));
34"what follows will not work if there are multiple rooms with the same name";
35target = $match_utils:match(exit.location.name, area.contents);
36othertarget = $match_utils:match(exit.otherside.location.name, area.contents);
37if (valid(target))
38newexit:moveto(target);
39endif
40if (valid(othertarget))
41newother:moveto(othertarget);
42endif
43newexit.otherside = newother;
44newother.otherside = newexit;
45newexit.name = exit.name;
46newexit.aliases = exit.aliases;
47newexit.direction = exit.direction;
48newother.name = exit.otherside.name;
49newother.aliases = exit.otherside.aliases;
50newother.direction = exit.otherside.direction;
51done_exits = {@done_exits, exit, exit.otherside};
52endif
53endfor
54endfor
55for newroom in (area.contents)
56newroom.exits = newroom:occupants($exit);
57$command_utils:suspend_if_needed(0);
58endfor
59return area;

valid_blueprint

Spec this none thisFlags rxdOwner #361Definer #334

Referenced by

Source

1if ((!is_in(player, this)) && (this in player.features))
2player:remove_feature(this);
3player:tell(("Removed invalid blueprint (" + this:name()) + ") from your command queue.  Please try again now that the problem has been cleared.");
4return 0;
5endif
6return 1;

mapicon

Spec any any anyFlags rxdOwner #361Definer #334

Referenced by

none

Source

1"Usage: mapicon <color spec><icon text>";
2"Sets the current map icon.  The following are valid color specs:";
3"  [bold_on]";
4"  [bold_off]";
5"  [reset]";
6"  [underline_on]";
7"  [inverse_on]";
8"  [strikethrough_on]";
9"  [underline_off]";
10"  [inverse_off]";
11"  [strikethrough_off]";
12"  [black]";
13"  [red]";
14"  [green]";
15"  [yellow]";
16"  [blue]";
17"  [purple]";
18"  [cyan]";
19"  [white]";
20"  [bg_black]";
21"  [bg_red]";
22"  [bg_green]";
23"  [bg_yellow]";
24"  [bg_blue]";
25"  [bg_purple]";
26"  [bg_cyan]";
27"  [bg_white]";
28"  [reverse]";
29" ";
30"Multiple specs may be used (ie '[bg_green][blue][bold_on]FU'";
31"The last two characters are the text of the map icon.";
32"  n.b. use 'map' to see the icons immediately.";
33icon_src = argstr;
34if (icon_src == "help")
35player:tell_lines(#18:get_topic((tostr(this) + ":") + verb));
36return;
37endif
38sublist = {{"[bold_on]", $ansi.bold_on}, {"[bold_off]", $ansi.bold_off}, {"[reset]", $ansi.reset}, {"[underline_on]", $ansi.underline_on}, {"[inverse_on]", $ansi.inverse_on}, {"[strikethrough_on]", $ansi.strikethrough_on}, {"[underline_off]", $ansi.underline_off}, {"[inverse_off]", $ansi.inverse_off}, {"[strikethrough_off]", $ansi.strikethrough_off}, {"[black]", $ansi.black}, {"[red]", $ansi.red}, {"[green]", $ansi.green}, {"[yellow]", $ansi.yellow}, {"[blue]", $ansi.blue}, {"[purple]", $ansi.purple}, {"[cyan]", $ansi.cyan}, {"[white]", $ansi.white}, {"[bg_black]", $ansi.bg_black}, {"[bg_red]", $ansi.bg_red}, {"[bg_green]", $ansi.bg_green}, {"[bg_yellow]", $ansi.bg_yellow}, {"[bg_blue]", $ansi.bg_blue}, {"[bg_purple]", $ansi.bg_purple}, {"[bg_cyan]", $ansi.bg_cyan}, {"[bg_white]", $ansi.bg_white}, {"[reverse]", $ansi.reverse}};
39icon_src = $su:subst(icon_src, sublist);
40icon_src = icon_src + $ansi.reset;
41if (length($ansi:strip(icon_src)) != 2)
42player:tell("Icons must be two characters long.");
43return;
44endif
45if (!(player:area() in player.features))
46return E_INVARG;
47endif
48player.location.icon = icon_src;
49player:tell("Icon for ", player.location.name, " set to ", icon_src);

authorize

Spec any none noneFlags rxdOwner #361Definer #334

Referenced by

none

Source

1if (!this:valid_blueprint())
2return;
3endif
4if (!this:can_edit(player))
5return player:tell("You don't have permission to edit ", this:dname(), "!");
6endif
7who = $su:match_player(dobjstr);
8if (!is_a(who, $creature))
9player:tell(("I don't know who '" + dobjstr) + "' is.");
10return;
11endif
12if (who in this.authorized_users)
13player:tell(who:name() + " is already authorized to edit this blueprint.");
14return;
15else
16this.authorized_users = setadd(this.authorized_users, who);
17player:tell(((("Added " + who:name()) + " to the access control list for ") + this:name()) + ".");
18endif

deauthorize

Spec any none noneFlags rxdOwner #361Definer #334

Referenced by

none

Source

1if (!this:valid_blueprint())
2return;
3endif
4who = $su:match_player(dobjstr);
5if (!is_a(who, $creature))
6player:tell(("I don't know who '" + dobjstr) + "' is.");
7return;
8endif
9if (who in this.authorized_users)
10this.authorized_users = setremove(this.authorized_users, who);
11player:tell(((who:name() + " is no longer authorized to edit ") + this:name()) + ".");
12else
13player:tell(((who:name() + " was not on the access control list for ") + this:name()) + ".");
14endif

can_edit

Spec this none thisFlags rxdOwner #361Definer #334

Referenced by

Source

1who = args[1];
2return ($perm_utils:controls(who, this) || (who in this.authorized_users)) || who.programmer;

areaicon

Spec any any anyFlags rxdOwner #361Definer #334

Referenced by

none

Source

1"Copied from generic blueprint area (#334):mapicon by Satan (#2) Fri Nov 14 20:45:24 2008 CST";
2"Usage: mapicon <color spec><icon text>";
3"Sets the current map icon.  The following are valid color specs:";
4"  [bold_on]";
5"  [bold_off]";
6"  [red]";
7"  [reset]";
8"  [underline_on]";
9"  [inverse_on]";
10"  [strikethrough_on]";
11"  [underline_off]";
12"  [inverse_off]";
13"  [strikethrough_off]";
14"  [black]";
15"  [green]";
16"  [yellow]";
17"  [blue]";
18"  [purple]";
19"  [cyan]";
20"  [white]";
21"  [bg_black]";
22"  [bg_red]";
23"  [bg_green]";
24"  [bg_yellow]";
25"  [bg_blue]";
26"  [bg_purple]";
27"  [bg_cyan]";
28"  [bg_white]";
29"  [reverse]";
30" ";
31"Multiple specs may be used (ie '[bg_green][blue][bold_on]FU'";
32"The last two characters are the text of the map icon.";
33"  n.b. use 'map' to see the icons immediately.";
34icon_src = argstr;
35if (icon_src == "help")
36player:tell_lines(#18:get_topic((tostr(this) + ":") + verb));
37return;
38endif
39sublist = {{"[bold_on]", $ansi.bold_on}, {"[bold_off]", $ansi.bold_off}, {"[red]", $ansi.red}, {"[reset]", $ansi.reset}, {"[underline_on]", $ansi.underline_on}, {"[inverse_on]", $ansi.inverse_on}, {"[strikethrough_on]", $ansi.strikethrough_on}, {"[underline_off]", $ansi.underline_off}, {"[inverse_off]", $ansi.inverse_off}, {"[strikethrough_off]", $ansi.strikethrough_off}, {"[black]", $ansi.black}, {"[green]", $ansi.green}, {"[yellow]", $ansi.yellow}, {"[blue]", $ansi.blue}, {"[purple]", $ansi.purple}, {"[cyan]", $ansi.cyan}, {"[white]", $ansi.white}, {"[bg_black]", $ansi.bg_black}, {"[bg_red]", $ansi.bg_red}, {"[bg_green]", $ansi.bg_green}, {"[bg_yellow]", $ansi.bg_yellow}, {"[bg_blue]", $ansi.bg_blue}, {"[bg_purple]", $ansi.bg_purple}, {"[bg_cyan]", $ansi.bg_cyan}, {"[bg_white]", $ansi.bg_white}, {"[reverse]", $ansi.reverse}};
40icon_src = $su:subst(icon_src, sublist);
41icon_src = icon_src + $ansi.reset;
42if (length($ansi:strip(icon_src)) != 2)
43player:tell("Icons must be two characters long.");
44return;
45endif
46if (!(player:area() in player.features))
47return E_INVARG;
48endif
49this.blank_icon = icon_src;
50player:tell("Background icon for ", this:name(), " set to ", icon_src);

clearmess*age

Spec any any anyFlags rxdOwner #361Definer #334

Referenced by

none

Source

1"Copied from generic blueprint area (#334):mess by Satan (#2) Fri Mar 27 23:41:35 2009 CDT";
2if (!this:valid_blueprint())
3return;
4endif
5focus = this:focus_for(player);
6if (!valid(focus))
7player:tell(this.not_focused_msg);
8return;
9endif
10if (!argstr)
11player:notify("You need to specify a message to clear.");
12else
13this:set_message(argstr, "");
14endif

type-otherside otype

Spec any none noneFlags rxdOwner #361Definer #334

Referenced by

none

Source

1if (!this:valid_blueprint())
2return;
3endif
4if (!valid(focus = this:focus_for(player)))
5player:tell("You're not focusing on anything.");
6return;
7endif
8if (!is_a(focus, $exit))
9player:tell("You can only set otherside types for exits.");
10return;
11endif
12types = this:type_for(focus);
13if (!dobjstr)
14player:tell((focus.otherside.name + " is currently of type: ") + parent(focus.otherside).name);
15player:tell(("Available types for " + focus.otherside.name) + ":");
16for y in [1..length(types)]
17player:tell((tostr(y) + ". ") + types[y].name);
18endfor
19return;
20player:tell(("There are no types available for " + focus.otherside.name) + ".");
21return;
22else
23selection = tonum(dobjstr);
24if ((selection < 1) || (selection > length(types)))
25player:tell(((("\"" + dobjstr) + "\" isn't a valid type choice for ") + focus.otherside.name) + ".");
26return;
27endif
28player:tell(((((("Changing " + focus.otherside.name) + " from ") + parent(focus.otherside).name) + " to ") + types[selection].name) + ".");
29chparent(focus.otherside, types[selection]);
30endif

addnote rmnote

Spec none none noneFlags rxdOwner #361Definer #334

Referenced by

none

Source

1where = player:room();
2if (!this:can_edit(player))
3player:tell("Permission denied.");
4return;
5endif
6if (verb == "addnote")
7player:tell("1. Object request");
8player:tell("2. Ambience");
9player:tell("3. Other request");
10type = $cu:read("Enter a number (1-3):");
11type = toint(type);
12if (!type)
13return player:tell("You must enter an integer.");
14elseif ((type > 3) || (type < 1))
15return player:tell("You must enter an integer between 1 and 3.");
16else
17if (type == 1)
18ntype = "obj_notes";
19color = tostr($ansi.cyan, "Objects: ");
20elseif (type == 2)
21ntype = "ambience_notes";
22color = tostr($ansi.white, $ansi.bold_on, "Ambience: ");
23else
24ntype = "misc_notes";
25color = tostr($ansi.yellow, "Misc. Notes: ");
26endif
27endif
28txt = $cu:read("Enter a note (please separate ambience messages with commas):");
29note = tostr(color, txt, $ansi.reset);
30player:tell("Note added.");
31this.(ntype) = hashremove(this.(ntype), where);
32this.(ntype)[where] = note;
33else
34where:tell_notes();
35player:tell("Enter the number of the note you want to remove:");
36if ((type = toint($cu:read())) == 1)
37ntype = "obj_notes";
38elseif (type == 2)
39ntype = "ambience_notes";
40elseif (type == 3)
41ntype = "misc_notes";
42else
43player:tell("Please enter an integer between 1 and 3.");
44return;
45endif
46this.(ntype) = hashremove(this.(ntype), where);
47player:tell("Note removed.");
48where:tell_notes();
49endif

notes

Spec none none noneFlags rxdOwner #361Definer #334

Referenced by

none

Source

1where = player:room();
2where:tell_notes();

room_removed

Spec this none thisFlags rxdOwner #361Definer #334

Referenced by

none

Source

1target = args[1];
2for x in ({"obj_notes", "ambience_notes", "misc_notes"})
3this.(x) = hashremove(this.(x), target);
4endfor
5return pass(@verb);

setdark

Spec any none noneFlags rxdOwner #361Definer #334

Referenced by

none

Source

1"Set permanent darkness level to 'full', 'high', 'low', 'off'.";
2if (!this:valid_blueprint())
3return;
4endif
5if (!(area(player) in player.features))
6return E_INVARG;
7endif
8if (!argstr)
9curr = `this.always_dark ! E_PROPNF => -1';
10if (curr == -1)
11player:tell("This room has default light settings.");
12else
13desc = {"low", "high", "full"}[curr];
14player:tell("This room has ", desc, " permanent darkness.");
15endif
16elseif (argstr == "off")
17if (has_property(loc, "always_dark"))
18delete_property(loc, "always_dark");
19player:tell("Room darkness set to off. This room now will have normal light levels.");
20else
21player:tell("This room already has normal light levels.");
22endif
23else
24setting = argstr in {"low", "high", "full"};
25loc = player.location;
26if (setting)
27if (has_property(loc, "always_dark"))
28loc.always_dark = setting;
29else
30add_property(loc, "always_dark", setting, {player, "rc"});
31endif
32player:tell("Room permanent darkness set to ", argstr, ".");
33else
34player:tell("'", argstr, "' is not a valid darkness setting. Use 'off', 'low', 'high', or 'full'.");
35endif
36endif

handle_creature_death

Spec this none thisFlags rxdOwner #361Definer #334

Referenced by

none

Source

1who = args[1];
2if (is_a(who, $player) && (!is_a(who, $immortal)))
3if (is_a(who:cyberdeck(), $cyberdeck))
4who.cyberdeck:do_jackout();
5return 1;
6else
7m = tostr($ansi.bold_on, $ansi.red, who:dnamec(), " died inside me without a valid cyberdeck.", $ansi.reset);
8#271474:_announce(this, m);
9#36188:_announce(this, m);
10endif
11endif
12return 0;

should_reset

Spec this none thisFlags rxdOwner #361Definer #334

Referenced by

none

Source

1return !is_a(this, $blueprint);