This commit is contained in:
Quaternions 2024-01-10 17:58:10 -08:00
parent 360e76177b
commit 43b756bf8e

View File

@ -1104,15 +1104,15 @@ fn recursive_vmt_loader<F:Fn(String)->AResult<Option<Vec<u8>>>>(find_stuff:&F,ma
VMTContent::VMT(s)=>recursive_vmt_loader(find_stuff,get_vmt(find_stuff,s)?),
VMTContent::VTF(s)=>find_stuff(s),
VMTContent::Patch(mat)=>recursive_vmt_loader(find_stuff,
mat.resolve(|search_name|
mat.resolve(|search_name|{
match find_stuff(search_name.to_string())?{
Some(bytes)=>Ok(String::from_utf8(bytes)?),
None=>Err(anyhow::Error::msg("could not find vmt")),
}
)?
})?
),
VMTContent::Unsupported=>Err(anyhow::Error::msg("Unsupported vmt")),
VMTContent::Unresolved=>Err(anyhow::Error::msg("Unresolved vmt")),
VMTContent::Unsupported=>{println!("Unsupported vmt");Ok(None)},//print and move on
VMTContent::Unresolved=>{println!("Unresolved vmt");Ok(None)},
}
}