fix: generator-providing pack may be removed

This commit is contained in:
MihailRis 2024-11-05 14:10:07 +03:00
parent d4f0c906d2
commit 6f2f365278

View File

@ -91,6 +91,14 @@ function refresh()
packs_cur:clear()
packs_add:clear()
-- lock pack that contains used generator
if world.is_open() then
local genpack, genname = parse_path(world.get_generator())
if genpack ~= "core" then
table.insert(base_packs, genpack)
end
end
for i,id in ipairs(packs_installed) do
local packinfo = pack.get_info(id)
packinfo.index = i