From 6f2f365278eb1866c773890471b7269a5ef45305 Mon Sep 17 00:00:00 2001 From: MihailRis Date: Tue, 5 Nov 2024 14:10:07 +0300 Subject: [PATCH] fix: generator-providing pack may be removed --- res/layouts/pages/content.xml.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/res/layouts/pages/content.xml.lua b/res/layouts/pages/content.xml.lua index 115e6aed..d03c6e80 100644 --- a/res/layouts/pages/content.xml.lua +++ b/res/layouts/pages/content.xml.lua @@ -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