virtual exit room #118
Aliases: virtual exit room, veroom
21 verbs · 62 properties · 9 children
Verbs
| Verb | Spec | Flags | Definer | Lines |
|---|---|---|---|---|
match_exit | this none this | rxd | #118 | 10 |
invoke | this none this | rxd | #118 | 4 |
move | this none this | rxd | #118 | 27 |
announce_msg | this none this | rxd | #118 | 11 |
exit_name | this none this | rxd | #118 | 2 |
exit_unlocked_for | this none this | rxd | #118 | 5 |
defaulting_exit_oleave_msg | this none this | rxd | #118 | 1 |
here_huh | this none this | rxd | #118 | 24 |
add_virtual_exit | this none this | rxd | #118 | 20 |
remove_virtual_exit | this none this | rxd | #118 | 12 |
@remove-vexit @rmvexit @rmv | any none none | rd | #118 | 5 |
@vways @v-ways | none none none | rd | #118 | 12 |
@vlock @plock | any with/using any | rd | #118 | 38 |
@vunlock @punlock | any none none | rd | #118 | 12 |
con*vert-exit | any none none | rxd | #118 | 38 |
bless_for_entry | this none this | rxd | #118 | 4 |
@add-ventrance | any none none | rd | #118 | 8 |
@remove-ventrance | any none none | rd | #118 | 8 |
@vdig | any any any | rd | #118 | 67 |
init_for_core | this none this | rxd | #118 | 4 |
enterfunc | this none this | rxd | #118 | 8 |
Properties
| Property | Definer | Flags | Owner | Value |
|---|---|---|---|---|
virtual_exit_task | #118 | r | #2 | 0 |
defaulting_exit_oleave_msg | #118 | rc | #2 | "" |
blessed_entrances | #118 | rc | #2 | {} |
virtual_exits | #118 | rc | #2 | {} |
give_short_alias | #118 | rc | #2 | 0 |
virtual_exit_to_use | #118 | r | #2 | {} |
lit_from_outside | #118 | rc | #2 | 0 |
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 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 | #104 | r | #2 | <clear> |
dig_level | #104 | rc | #2 | <clear> |
holes | #104 | r | #2 | <clear> |
help_msg | #104 | rc | #2 | <clear> |
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 | {"virtual exit room", "veroom"} |
description | #1 | rc | #2 | <clear> |
object_size | #1 | r | #36 | {20865, -1090650497} |
html | #1 | rc | #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
Showing 48 of 51 verbs; 3 not shown.
Source
match_exit
Referenced by
- #118:remove_virtual_exit line 4:
this:match_exit - #118:@vlock line 11:
this:match_exit - #118:@vunlock line 3:
this:match_exit - #118:con*vert-exit line 1:
this:match_exit - #135:huh line 3:
this:match_exit - #135:huh line 4:
this:match_exit - #135:huh line 19:
this:match_exit
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
Referenced by
none
Source
1this:move(player); 2if (`player.followed_by ! E_PROPNF => $nothing' != $nothing) 3this:move(player.followed_by); 4endif
move
Referenced by
- #118:invoke line 1:
this:move - #118:invoke line 3:
this:move
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
Referenced by
- #118:move line 14:
this:announce_msg - #118:move line 17:
this:announce_msg - #130:move line 12:
this:announce_msg - #130:move line 13:
this:announce_msg
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
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
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
Referenced by
- #118:move line 14:
this:defaulting_exit_oleave_msg - #130:move line 12:
this:defaulting_exit_oleave_msg
Source
1return $string_utils:pronoun_sub(this.(verb), @listdelete(args, 1));
here_huh
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
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
Referenced by
- #118:@remove-vexit line 2:
this:remove_virtual_exit
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
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
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
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
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
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
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
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
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
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
Referenced by
- #129:init_for_core line 11:
pass( - #130:init_for_core line 12:
pass( - #133:init_for_core line 18:
pass( - #135:init_for_core line 13:
pass( - #140:init_for_core line 18:
pass( - #141:init_for_core line 30:
pass(
Source
1if (caller_perms().wizard) 2this.virtual_exits = {}; 3pass(); 4endif
enterfunc
Referenced by
- #62:enterfunc line 5:
pass( - #129:enterfunc line 2:
pass( - #145:enterfunc line 1:
pass(
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);