Skip to content

Commit

Permalink
t
Browse files Browse the repository at this point in the history
  • Loading branch information
0jc1 committed Apr 10, 2024
1 parent bd7e594 commit 81b0d1f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ fn test(file_name : String) -> Result<(), Box<dyn Error>> {
}

print_type_of(&dom);

println!("Finding all scripts in file");
find_scripts(&dom, root, &mut vec);

if bool_val {
Expand All @@ -44,7 +46,7 @@ fn test(file_name : String) -> Result<(), Box<dyn Error>> {
// iterate over script referents and create new instance
for referent in vec.iter() {
let instance = dom.get_by_ref(*referent).unwrap();

let mut builder = InstanceBuilder::new(instance.class.clone()).with_properties(instance.properties.clone().into_iter());
builder.add_property("Source", String::from("source"));

Expand All @@ -68,6 +70,7 @@ fn test(file_name : String) -> Result<(), Box<dyn Error>> {
}

//write new model or place file
println!("Creating file");
let output = BufWriter::new(File::create("output.rbxl")?);
rbx_binary::to_writer(output, &dom, &[dom.root_ref()])?;

Expand Down

0 comments on commit 81b0d1f

Please sign in to comment.