remove core.quit add 'silent' argument to app.quit

This commit is contained in:
MihailRis 2026-01-07 19:37:57 +03:00
parent 24f867dbac
commit 9af675611f
4 changed files with 20 additions and 17 deletions

View file

@ -208,6 +208,12 @@ static int l_open_url(lua::State* L) {
return 0;
}
/// @brief Quit the game
static int l_quit(lua::State*) {
engine->quit();
return 0;
}
const luaL_Reg applib[] = {
{"get_version", lua::wrap<l_get_version>},
{"is_content_loaded", lua::wrap<l_is_content_loaded>},
@ -224,6 +230,7 @@ const luaL_Reg applib[] = {
{"set_setting", lua::wrap<l_set_setting>},
{"str_setting", lua::wrap<l_str_setting>},
{"get_setting_info", lua::wrap<l_get_setting_info>},
{"quit", lua::wrap<l_quit>},
// for other functions see libcore.cpp and stdlib.lua
{nullptr, nullptr}
};

View file

@ -157,12 +157,6 @@ static int l_reconfig_packs(lua::State* L) {
return 0;
}
/// @brief Quit the game
static int l_quit(lua::State*) {
engine->quit();
return 0;
}
static int l_blank(lua::State*) {
return 0;
}
@ -205,7 +199,6 @@ const luaL_Reg corelib[] = {
{"close_world", lua::wrap<l_close_world>},
{"delete_world", lua::wrap<l_delete_world>},
{"reconfig_packs", lua::wrap<l_reconfig_packs>},
{"quit", lua::wrap<l_quit>},
{"capture_output", lua::wrap<l_capture_output>},
{nullptr, nullptr}
};