rbx_loader: stronger Place & Model types

This commit is contained in:
2025-04-22 14:35:17 -07:00
parent 08d47b0f63
commit 615372aad5
5 changed files with 58 additions and 46 deletions

View File

@@ -97,7 +97,7 @@ pub fn load<P:AsRef<std::path::Path>>(path:P)->Result<LoadFormat,LoadError>{
ReadFormat::SNFM(map)=>Ok(LoadFormat::Map(map)),
#[cfg(feature="roblox")]
ReadFormat::Roblox(model)=>{
let mut place=model.into_place();
let mut place=strafesnet_rbx_loader::Place::from(model);
place.run_scripts();
Ok(LoadFormat::Map(
place.to_snf(LoadFailureMode::DefaultToNone).map_err(LoadError::LoadRoblox)?