1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +00:00

Fix unnecessary content refreshing (#14705)

This commit is contained in:
rubenwardy 2024-06-24 20:56:37 +01:00 committed by GitHub
parent 9ab447843b
commit 157d129e30
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 193 additions and 181 deletions

View file

@ -133,6 +133,8 @@ local function start_install(package, reason)
conf:set("release", package.release)
conf:write()
end
pkgmgr.reload_by_type(package.type)
end
end
@ -146,7 +148,6 @@ local function start_install(package, reason)
start_install(next.package, next.reason)
end
ui.update()
end
@ -427,8 +428,9 @@ end
function contentdb.update_paths()
pkgmgr.load_all()
local mod_hash = {}
pkgmgr.refresh_globals()
for _, mod in pairs(pkgmgr.global_mods:get_list()) do
local cdb_id = pkgmgr.get_contentdb_id(mod)
if cdb_id then
@ -437,7 +439,6 @@ function contentdb.update_paths()
end
local game_hash = {}
pkgmgr.update_gamelist()
for _, game in pairs(pkgmgr.games) do
local cdb_id = pkgmgr.get_contentdb_id(game)
if cdb_id then
@ -446,7 +447,7 @@ function contentdb.update_paths()
end
local txp_hash = {}
for _, txp in pairs(pkgmgr.get_texture_packs()) do
for _, txp in pairs(pkgmgr.texture_packs) do
local cdb_id = pkgmgr.get_contentdb_id(txp)
if cdb_id then
txp_hash[contentdb.aliases[cdb_id] or cdb_id] = txp