[Turn on line numbering]
arg source, dest, name;
var pname, parent, exit, line;
[parent, pname] = (> ._build__parse_name(name[1][1], $exit) <);
name = replace(name, 1, replace(name[1], 1, pname));
exit = (| source.match_environment(pname) |);
if (exit) {
throw(~stop, name[1] + " already exists");
} else {
catch any
exit = (> parent.new() <);
with
throw(~stop, "Unable to create exit: " + traceback()[1][2]);
}
catch any {
exit.attach(source, dest);
(> ._build__set_name(exit, @name, source) <);
.tell("** Attached exit " + exit.name() + " from " + source.name() + " to " + dest.name() + ".");
} with {
.tell("Unable to attach " + exit.name() + " because: ");
.tell(" " + traceback()[1][2]);
line = (> .prompt("Continue building? ") <);
if (line in ["no", "n"])
throw(~abort, "Aborted");
}
return exit;
// $#Edited: 20 Apr 04 22:05 $brandon
// $#Edited: 20 Apr 04 22:54 $lynx
// $#Edited: 20 Apr 04 23:02 $lynx
// $#Edited: 20 Apr 04 23:25 $lynx
// $#Edited: 20 Apr 04 23:32 $lynx
// $#Edited: 20 Apr 04 23:33 $lynx
["// Created 26-Mar-1995 as a part of ColdCore, see: @help Credit"]