lol idk #1

Open
Quaternions wants to merge 826 commits from StrafesNET/strafe-project:master into master
Showing only changes of commit 261e0a474e - Show all commits

View File

@ -66,6 +66,17 @@ impl mlua::UserData for Instance{
Ok(children)
})
);
methods.add_method("GetDescendants",|lua,this,_:()|
dom(lua,|dom|{
let children:Vec<_>=dom
.descendants_of(this.referent)
.map(|instance|
Instance::new(instance.referent())
)
.collect();
Ok(children)
})
);
methods.add_method("IsA",|lua,this,classname:mlua::String|
dom(lua,|dom|{
let instance=this.get(dom)?;