1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

ContentDB: Add overwrite dialog when content is already installed (#10768)

This commit is contained in:
rubenwardy 2021-01-04 15:18:31 +00:00 committed by GitHub
parent dd5a732fa9
commit edd0836011
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 84 additions and 5 deletions

View file

@ -803,6 +803,15 @@ int ModApiMainMenu::l_copy_dir(lua_State *L)
return 1;
}
/******************************************************************************/
int ModApiMainMenu::l_is_dir(lua_State *L)
{
const char *path = luaL_checkstring(L, 1);
lua_pushboolean(L, fs::IsDir(path));
return 1;
}
/******************************************************************************/
int ModApiMainMenu::l_extract_zip(lua_State *L)
{
@ -1139,6 +1148,7 @@ void ModApiMainMenu::Initialize(lua_State *L, int top)
API_FCT(create_dir);
API_FCT(delete_dir);
API_FCT(copy_dir);
API_FCT(is_dir);
API_FCT(extract_zip);
API_FCT(may_modify_path);
API_FCT(get_mainmenu_path);
@ -1172,6 +1182,7 @@ void ModApiMainMenu::InitializeAsync(lua_State *L, int top)
API_FCT(create_dir);
API_FCT(delete_dir);
API_FCT(copy_dir);
API_FCT(is_dir);
//API_FCT(extract_zip); //TODO remove dependency to GuiEngine
API_FCT(may_modify_path);
API_FCT(download_file);