From eb2dd9d792a197293274e2f049e0c635a21aeddc Mon Sep 17 00:00:00 2001 From: Quaternions Date: Mon, 21 Oct 2024 19:10:58 -0700 Subject: [PATCH] move register to set_globals --- src/runner/runner.rs | 2 -- src/runner/script_signal.rs | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/runner/runner.rs b/src/runner/runner.rs index 032d539..4b25bd6 100644 --- a/src/runner/runner.rs +++ b/src/runner/runner.rs @@ -42,8 +42,6 @@ fn init(lua:&mlua::Lua)->mlua::Result<()>{ super::number_sequence::set_globals(lua,&globals)?; super::color_sequence::set_globals(lua,&globals)?; - lua.register_userdata_type::(mlua::UserData::register)?; - Ok(()) } diff --git a/src/runner/script_signal.rs b/src/runner/script_signal.rs index 5197065..3dfe8f6 100644 --- a/src/runner/script_signal.rs +++ b/src/runner/script_signal.rs @@ -126,6 +126,7 @@ pub fn set_globals(lua:&mlua::Lua,globals:&mlua::Table)->Result<(),mlua::Error>{ lua.register_userdata_type::(|reg|{ reg.add_field("Wait",wait); + mlua::UserData::register(reg); })?; Ok(())