limit stupid bs

This commit is contained in:
Quaternions 2024-01-11 22:02:10 -08:00
parent bbbbd6bf64
commit 29b4211484

View File

@ -447,12 +447,12 @@ fn write_item(dom:&rbx_dom_weak::WeakDom,mut file:std::path::PathBuf,node:&TreeN
return Ok(())
}
assert!(file.set_extension("lua"),"could not set extension");
assert!(dom.get_by_ref(node.referent).is_some_and(|item|{
if let Some(item)=dom.get_by_ref(node.referent){
//TODO: delete disabled scripts
if let Some(rbx_dom_weak::types::Variant::String(source))=item.properties.get("Source"){
std::fs::write(file,source).is_ok()
}else{false}
}),"no string property or file failed to write");
std::fs::write(file,source)?;
}
}
},
Class::Model=>{
if !write_models{