added continue for empty bags

This commit is contained in:
Chr1Z93 2024-05-19 20:23:48 +02:00
parent fb70bbae68
commit fdcec57908

View File

@ -77,7 +77,11 @@ function buildIndex()
-- process hotfix bags (and the additional playercards bag)
for _, hotfixBag in ipairs(getObjectsWithTag("AllCardsHotfix")) do
local hotfixData = hotfixBag.getData()
if not hotfixData.ContainedObjects then break end
-- if the bag is empty, continue with the next bag
if not hotfixData.ContainedObjects then
goto nextBag
end
for _, cardData in ipairs(hotfixData.ContainedObjects) do
-- process containers
@ -100,6 +104,7 @@ function buildIndex()
end
end
end
::nextBag::
end
buildSupplementalIndexes()