Rename other weakness list

This commit is contained in:
Buhallin 2023-01-05 01:32:53 -08:00
parent 9dcd53fbe0
commit fe6c8411a6
No known key found for this signature in database
GPG Key ID: DB3C362823852294

View File

@ -640,13 +640,13 @@ function spawnWeaknesses()
end end
local weaknessIdList = allCardsBag.call("getUniqueWeaknesses") local weaknessIdList = allCardsBag.call("getUniqueWeaknesses")
local basicWeaknessList = { } local basicWeaknessList = { }
local campaignWeaknessList = { } local otherWeaknessList = { }
for i, id in ipairs(weaknessIdList) do for i, id in ipairs(weaknessIdList) do
local cardMetadata = allCardsBag.call("getCardById", { id = id }).metadata local cardMetadata = allCardsBag.call("getCardById", { id = id }).metadata
if cardMetadata.basicWeaknessCount ~= nil and cardMetadata.basicWeaknessCount > 0 then if cardMetadata.basicWeaknessCount ~= nil and cardMetadata.basicWeaknessCount > 0 then
table.insert(basicWeaknessList, id) table.insert(basicWeaknessList, id)
elseif excludedNonBasicWeaknesses[id] == nil then elseif excludedNonBasicWeaknesses[id] == nil then
table.insert(campaignWeaknessList, id) table.insert(otherWeaknessList, id)
end end
end end
local groupPos = Vector(START_POSITIONS.classCards) local groupPos = Vector(START_POSITIONS.classCards)
@ -669,8 +669,8 @@ function spawnWeaknesses()
}) })
groupPos.x = groupPos.x - math.ceil(#EVOLVED_WEAKNESSES / 20) * CARD_ROW_OFFSET - CARD_GROUP_OFFSET groupPos.x = groupPos.x - math.ceil(#EVOLVED_WEAKNESSES / 20) * CARD_ROW_OFFSET - CARD_GROUP_OFFSET
spawnBag.spawn({ spawnBag.spawn({
name = "campaignWeaknesses", name = "otherWeaknesses",
cards = campaignWeaknessList, cards = otherWeaknessList,
globalPos = groupPos, globalPos = groupPos,
rotation = FACE_UP_ROTATION, rotation = FACE_UP_ROTATION,
spread = true, spread = true,