Fix installed modpacks not being found correctly

This commit is contained in:
rubenwardy 2018-12-26 12:39:28 +00:00
parent badecfa471
commit 7d7ccf5c0f

@ -305,19 +305,25 @@ function store.update_paths()
local mod_hash = {} local mod_hash = {}
pkgmgr.refresh_globals() pkgmgr.refresh_globals()
for _, mod in pairs(pkgmgr.global_mods:get_list()) do for _, mod in pairs(pkgmgr.global_mods:get_list()) do
if mod.author then
mod_hash[mod.name] = mod mod_hash[mod.name] = mod
end end
end
local game_hash = {} local game_hash = {}
pkgmgr.update_gamelist() pkgmgr.update_gamelist()
for _, game in pairs(pkgmgr.games) do for _, game in pairs(pkgmgr.games) do
if game.author then
game_hash[game.id] = game game_hash[game.id] = game
end end
end
local txp_hash = {} local txp_hash = {}
for _, txp in pairs(pkgmgr.get_texture_packs()) do for _, txp in pairs(pkgmgr.get_texture_packs()) do
if txp.author then
txp_hash[txp.name] = txp txp_hash[txp.name] = txp
end end
end
for _, package in pairs(store.packages_full) do for _, package in pairs(store.packages_full) do
local content local content