move register to set_globals
This commit is contained in:
parent
c162bb34d7
commit
eb2dd9d792
@ -42,8 +42,6 @@ fn init(lua:&mlua::Lua)->mlua::Result<()>{
|
|||||||
super::number_sequence::set_globals(lua,&globals)?;
|
super::number_sequence::set_globals(lua,&globals)?;
|
||||||
super::color_sequence::set_globals(lua,&globals)?;
|
super::color_sequence::set_globals(lua,&globals)?;
|
||||||
|
|
||||||
lua.register_userdata_type::<super::script_signal::ScriptSignal>(mlua::UserData::register)?;
|
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -126,6 +126,7 @@ pub fn set_globals(lua:&mlua::Lua,globals:&mlua::Table)->Result<(),mlua::Error>{
|
|||||||
|
|
||||||
lua.register_userdata_type::<ScriptSignal>(|reg|{
|
lua.register_userdata_type::<ScriptSignal>(|reg|{
|
||||||
reg.add_field("Wait",wait);
|
reg.add_field("Wait",wait);
|
||||||
|
mlua::UserData::register(reg);
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
Loading…
Reference in New Issue
Block a user