probably was wrong but idc about testing it
This commit is contained in:
parent
a17901d473
commit
7fbcb206ff
@ -665,9 +665,14 @@ fn replace() -> AResult<()>{
|
|||||||
println!("One or more scripts failed to replace.");
|
println!("One or more scripts failed to replace.");
|
||||||
}else{
|
}else{
|
||||||
let mut dest=std::path::PathBuf::from("maps/unprocessed");
|
let mut dest=std::path::PathBuf::from("maps/unprocessed");
|
||||||
dest.set_file_name(file_thing.file_name());
|
dest.push(file_thing.file_name());
|
||||||
let output = std::io::BufWriter::new(std::fs::File::open(dest)?);
|
let output = std::io::BufWriter::new(std::fs::File::open(dest)?);
|
||||||
rbx_binary::to_writer(output, &dom, &[dom.root_ref()])?;
|
//write workspace:GetChildren()[1]
|
||||||
|
let workspace_children=dom.root().children();
|
||||||
|
if workspace_children.len()!=1{
|
||||||
|
return Err(anyhow::Error::msg("there can only be one model"));
|
||||||
|
}
|
||||||
|
rbx_binary::to_writer(output, &dom, &[workspace_children[0]])?;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
|
Loading…
Reference in New Issue
Block a user