refresh bug fix

This commit is contained in:
Xertis 2025-01-28 20:23:41 +03:00 committed by GitHub
parent bec7e59e33
commit 2c29e77f82
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -34,17 +34,22 @@ function apply()
end
end
function reposition_func(pack)
function reposition_func(_pack)
local INTERVAL = 2
local STEP = 1
local SIZE = 80
local tbl = packs_excluded
if table.has(packs_included, pack) then
local tbl = nil
if table.has(packs_included, _pack) then
tbl = packs_included
elseif table.has(packs_excluded, _pack) then
tbl = packs_excluded
else
tbl = packs_excluded
table.insert(packs_excluded, pack.get_info(_pack))
end
local indx = table.index(tbl, pack) - 1
local indx = table.index(tbl, _pack) - 1
local pos = {0, (SIZE + INTERVAL) * indx + STEP}
return pos[1], pos[2]