// Petrarch
// Merentha Lib 1.0
// <clone>
varargs int command(string file) {
object ob;
if(!file) return notify_fail("Syntax: clone <file>\n");
if(file[0..0]!="/") file=this_player()->query_cwd()+file;
if(file_size(file)<0) {
file+=".c";
if(file_size(file)<0) return notify_fail("File was directory or did not exist.\n");
}
ob=new(file);
if(ob->move(this_player())) ob->move(environment(this_player()));
message("command", "You clone "+ob->query_short()+".", this_player());
message("command", this_player()->query_cap_name()+" clones "+ob->query_short()+".", environment(this_player()), this_player());
return 1;
}
string help() {
return "Syntax: clone <file>\n\nThis command makes a copy of the file in question. It will attempt to but the object in your inventory, on failure it places it in the room.";
}