m-lua-script: add object_deactivate API

This commit is contained in:
Julian Bouzas
2021-03-12 11:41:29 -05:00
parent 003afc3e7b
commit 1b5980476b

View File

@@ -261,8 +261,18 @@ object_activate (lua_State *L)
return 0;
}
static int
object_deactivate (lua_State *L)
{
WpObject *o = wplua_checkobject (L, 1, WP_TYPE_OBJECT);
WpObjectFeatures features = luaL_checkinteger (L, 2);
wp_object_deactivate (o, features);
return 0;
}
static const luaL_Reg object_methods[] = {
{ "activate", object_activate },
{ "deactivate", object_deactivate },
{ NULL, NULL }
};