Export new datatypes

This commit is contained in:
Filip Tibell 2023-03-11 10:26:33 +01:00
parent fd369f707f
commit e330986da5
No known key found for this signature in database

View file

@ -17,8 +17,14 @@ where
Ok(tab)
}
#[rustfmt::skip]
pub fn module(lua: &Lua) -> LuaResult<LuaTable> {
let datatypes = vec![("Vector3", make_dt(lua, Vector3::make_dt_table)?)];
let datatypes = vec![
("Vector2", make_dt(lua, Vector2::make_dt_table)?),
("Vector2int16", make_dt(lua, Vector2int16::make_dt_table)?),
("Vector3", make_dt(lua, Vector3::make_dt_table)?),
("Vector3int16", make_dt(lua, Vector3int16::make_dt_table)?),
];
let exports = lua.create_table()?;
for (name, tab) in datatypes {
exports.set(name, tab)?;