virtual exit room #118

Parent #104Owner #2Flags read, fertileSource RPG Core/rpgcore-patched.db

Aliases: virtual exit room, veroom

21 verbs · 62 properties · 9 children

Verbs

VerbSpecFlagsDefinerLines
match_exitthis none thisrxd#11810
invokethis none thisrxd#1184
movethis none thisrxd#11827
announce_msgthis none thisrxd#11811
exit_namethis none thisrxd#1182
exit_unlocked_forthis none thisrxd#1185
defaulting_exit_oleave_msgthis none thisrxd#1181
here_huhthis none thisrxd#11824
add_virtual_exitthis none thisrxd#11820
remove_virtual_exitthis none thisrxd#11812
@remove-vexit @rmvexit @rmvany none nonerd#1185
@vways @v-waysnone none nonerd#11812
@vlock @plockany with/using anyrd#11838
@vunlock @punlockany none nonerd#11812
con*vert-exitany none nonerxd#11838
bless_for_entrythis none thisrxd#1184
@add-ventranceany none nonerd#1188
@remove-ventranceany none nonerd#1188
@vdigany any anyrd#11867
init_for_corethis none thisrxd#1184
enterfuncthis none thisrxd#1188

Properties

PropertyDefinerFlagsOwnerValue
virtual_exit_task#118r#20
defaulting_exit_oleave_msg#118rc#2""
blessed_entrances#118rc#2{}
virtual_exits#118rc#2{}
give_short_alias#118rc#20
virtual_exit_to_use#118r#2{}
lit_from_outside#118rc#20
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 17{"CREATING A NEW VIRTUAL EXIT:", " Use `@vdig' exactly the way you'd use @dig.", " If the other room is !free_entry, have its owner go there and type `@add-ventrance <room #>' where the room # is the object number of YOUR room.", "CONVERTING OLD EXITS TO VIRTUAL:", " Go to the room.", " Type: convert-exit <exit name>", "@remove-vexit <name>", "@ways", "@vlock <name> with <object>", "@plock <name> with <password>", "@vunlock/@punlock <name>", "convert-exit <name>", "@add-ventrance", "@rm-ventrance", "@vdig", "", "@set room.lit_from_outside to 1 if you want the room dark at night."}
battle_task#104r#2<clear>
dig_level#104rc#2<clear>
holes#104r#2<clear>
help_msg#104rc#2<clear>
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{"virtual exit room", "veroom"}
description#1rc#2<clear>
object_size#1r#36{20865, -1090650497}
html#1rc#2<clear>

Ancestry

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

Children: #62 The Storeroom, #129 Generic Classroom, #130 generic lobby, #133 Generic Temple, #135 generic display room, #140 Generic Booth, #141 Character Generator, #145 Fasco's SaveCo, #151 Fasco's Cave

Call graph

calls n118_0 #118:match_exit n3_5 #3:match_exit n118_0->n3_5 n118_1 #118:invoke n118_2 #118:move n118_1->n118_2 n118_5 #118:exit_unlocked_for n118_2->n118_5 n52_5 #52:isa n118_2->n52_5 n118_3 #118:announce_msg n118_2->n118_3 n118_6 #118:defaulting_exit_oleave_msg n118_2->n118_6 n35_1 #35:say_action n118_2->n35_1 n56_2 #56:read n118_5->n56_2 n53_6 #53:eval_key n118_5->n53_6 n20_34 #20:pronoun_sub n118_6->n20_34 n118_4 #118:exit_name n55_28 #55:longest n118_4->n55_28 n118_7 #118:here_huh n104_47 #104:match n118_7->n104_47 n51_2 #51:match_verb n118_7->n51_2 n51_3 #51:match_list n118_7->n51_3 n104_53 #104:contents n118_7->n104_53 n3_37 #3:here_huh n118_7->n3_37 n118_8 #118:add_virtual_exit n42_0 #42:controls n118_8->n42_0 n21_3 #21:parse_names n118_8->n21_3 n55_7 #55:remove_duplicates n118_8->n55_7 n6_18 #6:tell n118_8->n6_18 n20_59 #20:name_and_number n118_8->n20_59 n20_6 #20:english_list n118_8->n20_6 n52_0 #52:has_property n118_8->n52_0 n118_9 #118:remove_virtual_exit n118_9->n118_0 n118_9->n42_0 n118_10 #118:@remove-vexit n118_10->n42_0 n118_10->n6_18 n118_10->n118_9 n118_11 #118:@vways n118_11->n6_18 n118_11->n20_59 n20_71 #20:redirect_ansi n118_11->n20_71 n20_5 #20:from_list n118_11->n20_5 n118_12 #118:@vlock n118_12->n118_0 n118_12->n56_2 n118_12->n42_0 n118_12->n6_18 n118_12->n20_59 n118_12->n20_6 n53_3 #53:parse_keyexp n118_12->n53_3 n53_8 #53:unparse_key n118_12->n53_8 n118_13 #118:@vunlock n118_13->n118_0 n118_13->n42_0 n118_13->n6_18 n118_14 #118:con*vert-exit n118_14->n118_0 n118_14->n42_0 n118_14->n55_7 n118_14->n6_18 n118_14->n20_59 n56_4 #56:yes_or_no n118_14->n56_4 n118_16 #118:@add-ventrance n118_16->n42_0 n118_16->n6_18 n118_16->n20_59 n118_17 #118:@remove-ventrance n118_17->n42_0 n118_17->n6_18 n118_17->n20_59 n118_18 #118:@vdig n118_18->n20_59 n118_18->n20_5 n6_10 #6:notify n118_18->n6_10 n52_6 #52:ancestors n118_18->n52_6 n20_38 #20:explode n118_18->n20_38 n52_3 #52:has_callable_verb n118_18->n52_3 n50_37 #50:invoke n118_18->n50_37 n118_19 #118:init_for_core

Showing 48 of 51 verbs; 3 not shown.

Source

match_exit

Spec this none thisFlags rxdOwner #2Definer #118

Referenced by

Source

1what = args[1];
2for n in (this.virtual_exits)
3if (what in n[1])
4this.virtual_exit_to_use = n;
5this.virtual_exit_task = task_id();
6return this;
7endif
8endfor
9this.virtual_exit_to_use = {};
10return pass(@args);

invoke

Spec this none thisFlags rxdOwner #2Definer #118

Referenced by

none

Source

1this:move(player);
2if (`player.followed_by ! E_PROPNF => $nothing' != $nothing)
3this:move(player.followed_by);
4endif

move

Spec this none thisFlags rxdOwner #2Definer #118

Referenced by

Source

1if (task_id() != this.virtual_exit_task)
2return E_PERM;
3endif
4what = args[1];
5if (!(v = this.virtual_exit_to_use))
6what:tell("I don't know where you want to go.");
7return;
8elseif (this:exit_unlocked_for(v, what))
9d = $object_utils:isa(v[2], $room) ? v[2] | kill_task(task_id());
10d:bless_for_entry(what);
11if (d:acceptable(what))
12what:moveto(d);
13if (what.location != this)
14this:announce_msg(this, what, this:defaulting_exit_oleave_msg(v, what) || tostr(what:titlec(), " leaves for ", d.name, "."));
15endif
16if (what.location == d)
17this:announce_msg(what.location, what, tostr("has arrived from ", this.name, "."));
18endif
19return;
20endif
21elseif (v[3] != 0)
22if (what == player)
23$you:say_action(tostr("%N %<tries/try> to enter ", v[1][1], " but %<finds> it locked."));
24endif
25return;
26endif
27$you:say_action(tostr("%N %<tries/try> to enter ", v[1][1], ", but %<is/are> unable."));

announce_msg

Spec this none thisFlags rxdOwner #2Definer #118

Referenced by

Source

1":announce_msg(place, what, msg)";
2"  announce msg in place (except to what--and except when !what.obvious). Prepend with what:title if it isn't part of the string";
3what = args[2];
4if (`what.obvious ! E_PROPNF => 1')
5msg = args[3];
6title = what:titlec();
7if (!$string_utils:index_delimited(msg, title))
8msg = tostr(title, " ", msg);
9endif
10args[1]:announce_all_but({what}, msg);
11endif

exit_name

Spec this none thisFlags rxdOwner #2Definer #118

Referenced by

none

Source

1name = args[1][1][1];
2return (this.give_short_alias && (name != (s = $list_utils:shortest(args[1][1])))) ? ((name + " [") + s) + "] " | name;

exit_unlocked_for

Spec this none thisFlags rxdOwner #2Definer #118

Referenced by

Source

1key = args[1][3];
2if (`key[1] == ">" ! ANY => 0' && (args[2] == player))
3return $command_utils:read(key[2]) in key[3];
4endif
5return (key == 0) || $lock_utils:eval_key(key, args[2]);

defaulting_exit_oleave_msg

Spec this none thisFlags rxdOwner #2Definer #118

Referenced by

Source

1return $string_utils:pronoun_sub(this.(verb), @listdelete(args, 1));

here_huh

Spec this none thisFlags rxdOwner #2Definer #118

Referenced by

Source

1set_task_perms(caller_perms());
2verb = args[1];
3arg = args[2];
4if (iobjstr && (!valid(iobj)))
5iobj = this:match(iobjstr);
6endif
7if (dobjstr && (dobj == $failed_match))
8dobj = this:match(dobjstr);
9if (valid(dobj) && $match_utils:match_verb(verb, dobj, arg))
10return 1;
11endif
12endif
13if (valid(iobj) && $match_utils:match_verb(verb, iobj, arg))
14return 1;
15endif
16if ((((length(dobjstr) > 1) && (dobjstr[length(dobjstr)] == "s")) && ({} != (r = $match_utils:match_list(dobjstr[1..length(dobjstr) - 1], this:contents())))) || ((dobjstr in {"all", "everything"}) && (r = this:contents())))
17for k in (r)
18dobj = k;
19if ($match_utils:match_verb(verb, k, arg))
20return 1;
21endif
22endfor
23endif
24return pass(@args);

add_virtual_exit

Spec this none thisFlags rxdOwner #2Definer #118

Referenced by

none

Source

1if ((caller == this) || $perm_utils:controls(caller_perms(), this))
2ename = $building_utils:parse_names(args[1]);
3data = {$list_utils:remove_duplicates({ename[1], @ename[2]}), args[2], 0};
4this.virtual_exits = {@this.virtual_exits, data};
5n = {};
6for item in (data[1])
7n = {@n, tostr("\"", item, "\"")};
8endfor
9player:tell("Created virtual exit from ", $string_utils:nn(this), " to ", $string_utils:nn(data[2]), " with name", (length(n) == 1) ? " " | "s ", $string_utils:english_list(n), ".");
10if ($perm_utils:controls(this.owner, data[2]) && $object_utils:has_property(data[2], "blessed_entrances"))
11data[2].blessed_entrances = setadd(data[2].blessed_entrances, this);
12elseif ($object_utils:has_property(data[2], "blessed_entrances"))
13player:tell("You will need to have ", data[2].owner.name, " type \"@add-ventrance ", this, "\" to allow this virtual exit to enter, if the room is non-free-entry.");
14else
15player:tell("This virtual exit will not work if the destination room is non-free-entry.");
16endif
17return 1;
18else
19return E_PERM;
20endif

remove_virtual_exit

Spec this none thisFlags rxdOwner #2Definer #118

Referenced by

Source

1if ((caller == this) || $perm_utils:controls(caller_perms(), this))
2if (typeof(args[1]) == LIST)
3this.virtual_exits = setremove(this.virtual_exits, args[1]);
4elseif (this:match_exit(args[1]) == this)
5this.virtual_exits = setremove(this.virtual_exits, this.virtual_exit_to_use);
6else
7return 0;
8endif
9return 1;
10else
11return E_PERM;
12endif

@remove-vexit @rmvexit @rmv

Spec any none noneFlags rdOwner #2Definer #118

Referenced by

none

Source

1if ($perm_utils:controls(player, this))
2player:tell(this:remove_virtual_exit(dobjstr) ? "Virtual exit removed." | "No such virtual exit.");
3else
4player:tell(E_PERM);
5endif

@vways @v-ways

Spec none none noneFlags rdOwner #2Definer #118

Referenced by

none

Source

1if ((!player.wizard) && (player != this.owner))
2return notify(player, tostr(E_PERM));
3endif
4if (!this.virtual_exits)
5player:tell("There are no virtual exits in this room.");
6else
7player:tell("Virtual exits from ", $string_utils:nn(this), ":");
8for n in (this.virtual_exits)
9player:tell("  ", $string_utils:left($string_utils:from_list(n[1], ", "), 40)[1..40], $string_utils:nn(n[2]));
10endfor
11player:tell("---");
12endif

@vlock @plock

Spec any with/using anyFlags rdOwner #2Definer #118

Referenced by

none

Source

1"    $veroom:\"@vlock @plock\"";
2"    @vlock <virtual exit name> with <key expression>";
3"    @plock <virtual exit name> with <password>";
4"";
5"    $veroom:\"@vunlock @punlock\"";
6"    @vunlock/@punlock <virtual exit name> => completely removes the lock.";
7"    ------------------------------";
8"    See 'help keys' & 'help locking' for more info.";
9if (!$perm_utils:controls(player, this))
10player:tell(E_PERM);
11elseif (this:match_exit(dobjstr) != this)
12player:tell("I don't know what virtual exit you mean.");
13elseif (!(n = this.virtual_exit_to_use in this.virtual_exits))
14player:tell("Odd result -- complain to ", $string_utils:nn($gripe_recipients), ".");
15elseif (verb == "@plock")
16if (iobjstr in {"yes", "y"})
17key = {"yes", "y"};
18elseif (iobjstr in {"no", "n"})
19key = {"no", "n"};
20else
21key = {iobjstr};
22endif
23player:tell("You can add a custom prompt if you wish. It should be constructed to fit in the following blank space:");
24player:tell("  \"[Enter ___, or `@abort' to abort the command.]\"");
25player:tell("If you enter nothing, the prompt will be \"the password\".");
26prompt = $command_utils:read("the prompt asking for a password (or yes/no response) that the player should see");
27prompt = (!prompt) ? "the password" | prompt;
28this.virtual_exits[n][3] = {">", prompt, key};
29s = (length(key) > 1) ? "s" | "";
30player:tell("The correct response", s, " will be ", $string_utils:english_list(key), ".");
31elseif (typeof(key = $lock_utils:parse_keyexp(iobjstr, player)) == STR)
32player:tell("That key expression is malformed:");
33player:tell("  ", key);
34else
35this.virtual_exits[n][3] = key;
36player:tell("Locked virtual exit ", this.virtual_exits[n][1][1], " to this key:");
37player:tell("  ", $lock_utils:unparse_key(key));
38endif

@vunlock @punlock

Spec any none noneFlags rdOwner #2Definer #118

Referenced by

none

Source

1if (!$perm_utils:controls(player, this))
2player:tell(E_PERM);
3elseif (this:match_exit(dobjstr) != this)
4player:tell("I don't know which virtual exit you mean.");
5elseif (!(n = this.virtual_exit_to_use in this.virtual_exits))
6player:tell("Odd result -- complain to Defender.");
7elseif (this.virtual_exits[n][3] == 0)
8player:tell("That virtual exit wasn't locked anyway.");
9else
10this.virtual_exits[n][3] = 0;
11player:tell("Unlocked virtual exit ", this.virtual_exits[n][1][1], ".");
12endif

con*vert-exit

Spec any none noneFlags rxdOwner #2Definer #118

Referenced by

none

Source

1exit = this:match_exit(dobjstr);
2if (!valid(exit))
3return player:tell("Exit not found.");
4elseif (!$perm_utils:controls(player, exit))
5return player:Tell(E_PERM);
6elseif (exit == this)
7"We're converting a virtual exit into a real one.";
8v = this.virtual_exit_to_use;
9set_task_perms(player);
10if (typeof(new = player:_create($exit)) != OBJ)
11return player:tell(new);
12endif
13new:set_name(v[1][1]);
14new:set_aliases(v[1]);
15new.source = this;
16new.dest = v[2];
17new.key = v[3];
18new.source:add_exit(new);
19new.dest:add_entrance(new);
20this.virtual_exits = setremove(this.virtual_exits, v);
21player:tell("Virtual exit converted into real: ", $string_utils:nn(new), ".");
22else
23"Change a real into a virtual exit.";
24reason = "";
25if (parent(exit) != $exit)
26reason = "is not a child of $exit.";
27elseif ((vs = length(verbs(exit))) || (cs = ((((exit.leave_msg || exit.oleave_msg) || exit.arrive_msg) || exit.oarrive_msg) || exit.nogo_msg) || exit.onogo_msg))
28reason = vs ? "has verbs of its own..." | reason;
29reason = cs ? reason + "has customized use messages." | reason;
30endif
31if (reason && (!$command_utils:yes_or_no(tostr($string_Utils:nn(exit), " ", reason, "  Are you sure you wish to convert it?"))))
32return player:tell("Ok, exit not converted.");
33endif
34data = {$list_utils:remove_duplicates({exit.name, @exit.aliases}), exit.dest, exit.key};
35this.virtual_exits = {@this.virtual_exits, data};
36player:_recycle(exit);
37player:tell("OK, exit converted to virtual!");
38endif

bless_for_entry

Spec this none thisFlags rxdOwner #2Definer #118

Referenced by

none

Source

1if (caller in {this, @this.entrances, @this.blessed_entrances})
2this.blessed_object = args[1];
3this.blessed_task = task_id();
4endif

@add-ventrance

Spec any none noneFlags rdOwner #2Definer #118

Referenced by

none

Source

1if (!$perm_utils:controls(player, this))
2player:tell(E_PERM);
3elseif (!valid(dobj))
4player:tell(E_INVIND);
5else
6this.blessed_entrances = setadd(this.blessed_entrances, dobj);
7player:tell("Virtual entrances from ", $string_utils:nn(dobj), " can now enter this room even if it is non-free-entry.");
8endif

@remove-ventrance

Spec any none noneFlags rdOwner #2Definer #118

Referenced by

none

Source

1if (!$perm_utils:controls(player, this))
2player:tell(E_PERM);
3elseif (!(dobj in this.blessed_entrances))
4player:tell("There is no such virtual entrance.");
5else
6this.blessed_entrances = setremove(this.blessed_entrances, dobj);
7player:Tell("Removed ", $string_utils:nn(dobj), " as a virtual entrance room.");
8endif

@vdig

Spec any any anyFlags rdOwner #2Definer #118

Referenced by

none

Source

1set_task_perms(player);
2nargs = length(args);
3if (nargs == 1)
4room = args[1];
5exit_spec = "";
6elseif ((nargs >= 3) && (args[2] == "to"))
7exit_spec = args[1];
8room = $string_utils:from_list(args[3..nargs], " ");
9elseif (argstr && (!prepstr))
10room = argstr;
11exit_spec = "";
12else
13player:notify(tostr("Usage:  ", verb, " <new-room-name>"));
14player:notify(tostr("    or  ", verb, " <exit-description> to <new-room-name-or-old-room-object-number>"));
15return;
16endif
17if (room != tostr(other_room = toobj(room)))
18room_kind = player:build_option("dig_room");
19if (room_kind == 0)
20room_kind = $room;
21endif
22other_room = player:_create(room_kind);
23if (typeof(other_room) == ERR)
24player:notify(tostr("Cannot create new room as a child of ", $string_utils:nn(room_kind), ": ", other_room, ".  See `help @build-options' for information on how to specify the kind of room this command tries to create."));
25return;
26endif
27other_room.name = room;
28other_room.aliases = {room};
29move(other_room, $nothing);
30if (cflags = player:build_option("create_flags"))
31for n in [1..length(cflags)]
32other_room.(cflags[n]) = 1;
33endfor
34endif
35move(other_room, player.location.location);
36player:notify(tostr(other_room.name, " (", other_room, ") created."));
37elseif (nargs == 1)
38player:notify("You can't dig a room that already exists!");
39return;
40elseif ((!valid(player.location)) || (!($room in $object_utils:ancestors(player.location))))
41player:notify(tostr("You may only use the ", verb, " command from inside a room."));
42return;
43elseif ((!valid(other_room)) || (!($room in $object_utils:ancestors(other_room))))
44player:notify(tostr(other_room, " doesn't look like a room to me..."));
45return;
46endif
47if (exit_spec)
48exits = $string_utils:explode(exit_spec, "|");
49if ((length(exits) < 1) || (length(exits) > 2))
50player:notify("The exit-description must have the form");
51player:notify("     [name:]alias,...,alias");
52player:notify("or   [name:]alias,...,alias|[name:]alias,...,alias");
53return;
54endif
55player.location:add_virtual_exit(exits[1], other_room);
56if (length(exits) > 1)
57if ($object_utils:has_callable_verb(other_room, "add_virtual_exit"))
58other_room:add_virtual_exit(exits[2], player.location);
59else
60player:notify(tostr($string_utils:nn(other_room), " does not support virtual exits -- you will have to use @dig to create an exit from there."));
61endif
62endif
63endif
64if (player:build_option("quickdig"))
65player:teleport(player, other_room);
66$note_editor:invoke(tostr(other_room, ".description"), "@notedit");
67endif

init_for_core

Spec this none thisFlags rxdOwner #2Definer #118

Referenced by

Source

1if (caller_perms().wizard)
2this.virtual_exits = {};
3pass();
4endif

enterfunc

Spec this none thisFlags rxdOwner #2Definer #118

Referenced by

Source

1if (this.lit_from_outside)
2if ("night" == `this.location:time_of_day() ! ANY => ""')
3this.dark = 1;
4else
5this.dark = 0;
6endif
7endif
8pass(@args);