move register to set_globals

This commit is contained in:
Quaternions 2024-10-21 19:10:58 -07:00
parent c162bb34d7
commit eb2dd9d792
2 changed files with 1 additions and 2 deletions

View File

@ -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(())
} }

View File

@ -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(())