Merge pull request #874 from argonui/playercardpanel-bugfix

PlayerCard Panel: spawn investigators even if there are no other cards
This commit is contained in:
dscarpac 2024-09-18 09:32:13 -05:00 committed by GitHub
commit d768324896
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -735,14 +735,14 @@ function spawnCycle(cycle)
end end
local cardList = allCardsBagApi.getCardsByCycle(cycle, sortByMetadata, includeNoLevelCards) local cardList = allCardsBagApi.getCardsByCycle(cycle, sortByMetadata, includeNoLevelCards)
prepareToPlaceCards()
local rowCount = spawnInvestigators(cycle)
if #cardList == 0 then if #cardList == 0 then
printToAll("Didn't find any cards for '" .. cycle .. "'.") printToAll("Didn't find any cards for '" .. cycle .. "'.")
return return
end end
prepareToPlaceCards()
local rowCount = spawnInvestigators(cycle)
-- need to shift the start position for cycle down if there are multiple rows of investigators -- need to shift the start position for cycle down if there are multiple rows of investigators
local rowOffset = Vector((rowCount - 1) * investigatorPositionShiftRow) local rowOffset = Vector((rowCount - 1) * investigatorPositionShiftRow)
local cycleStartPos = Vector(startPositions.cycle):add(rowOffset) local cycleStartPos = Vector(startPositions.cycle):add(rowOffset)