roblox_emulator: ignore disabled scripts and ModuleScripts
This commit is contained in:
parent
d1f4e2132f
commit
081c95190f
@ -69,7 +69,15 @@ impl Context{
|
||||
})
|
||||
}
|
||||
pub fn scripts(&self)->Vec<crate::runner::instance::Instance>{
|
||||
self.superclass_iter("LuaSourceContainer").map(crate::runner::instance::Instance::new_unchecked).collect()
|
||||
self.superclass_iter("Script")
|
||||
.filter_map(|script_ref|{
|
||||
let script=self.dom.get_by_ref(script_ref)?;
|
||||
if let None|Some(rbx_dom_weak::types::Variant::Bool(false))=script.properties.get(&static_ustr("Disabled")){
|
||||
return Some(crate::runner::instance::Instance::new_unchecked(script_ref));
|
||||
}
|
||||
None
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
|
||||
pub fn from_model(mut dom:WeakDom)->Context{
|
||||
|
Loading…
x
Reference in New Issue
Block a user