Method code for $builder.build_cmd()

[Turn on line numbering]
arg cmdstr, cmd, args;
var dest, source, path, set, str, i, exits;

(> .perms(caller(), 'command) <);
str = args[1].join();
source = .location();
args = args[2];
if (!(| source.will_attach('source) |))
    return "This room is not publicly extendable.";

// Establish the objects
catch any {
    dest = (> ._build__get_location(str) <);
    if (!(| dest[1].will_attach('dest) |)) {
        .tell(dest[1].name() + " will not allow you to attach to it!");
        ._build__cleanup(dest);
        return "** Build Aborted **";
    }
    exits = (> ._build__get_path(source, dest[1]) <);
} with {
    if (dest)
        ._build__cleanup(dest);
    if (exits)
        ._build__cleanup([exits[1], exits[1]], [exits[2], exits[2]]);
    if (error() == ~abort)
        return "** Build Aborted **";
    return [traceback()[1][2], "** Build Aborted **"];
}
.tell("Completed building to " + dest[1].name() + ".");
if ((i = "conf?igure" in args.slice(1))) {
    if (!args[i][3])
        return "Skipping post-configuration.";
}
.tell("post-configuration..");

// Flesh them out
set = #[['named_name, 1]];
if (dest[2])
    (> dest[1].configure(set) <);
if (exits[1])
    (> exits[1].configure(set) <);
if (exits[2])
    (> exits[2].configure(set) <);
return "Completed post-configuration.";

// $#Edited: 13 Sep 97 15:11 $brandon
// $#Edited: 15 Feb 98 15:30 $user_tangent
// $#Edited: 16 Feb 98 10:46 $user_tangent
// $#Edited: 20 Apr 04 22:22 $brandon
// $#Edited: 20 Apr 04 22:57 $lynx
// $#Edited: 20 Apr 04 23:30 $lynx

["// Created 26-Mar-1995 as a part of ColdCore, see: @help Credit"]

the Cold Dark