lol idk #1

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

View File

@ -1,6 +1,6 @@
use std::collections::{hash_map::Entry,HashMap};
use mlua::{FromLuaMulti,IntoLua,IntoLuaMulti};
use mlua::{FromLua,FromLuaMulti,IntoLua,IntoLuaMulti};
use rbx_types::Ref;
use rbx_dom_weak::{InstanceBuilder,WeakDom};
@ -334,9 +334,8 @@ impl mlua::UserData for Instance{
/// A class function definition shorthand.
macro_rules! cf{
($f:expr)=>{
|lua,args|{
//TODO: make this not suck. two fully general conversions? really?
let (this,args):(Instance,mlua::MultiValue)=FromLuaMulti::from_lua_multi(args,lua)?;
|lua,mut args|{
let this=Instance::from_lua(args.pop_front().unwrap_or(mlua::Value::Nil),lua)?;
$f(lua,this,FromLuaMulti::from_lua_multi(args,lua)?)?.into_lua_multi(lua)
}
};