Merge pull request #852 from argonui/clean-up-helper

Clean Up Helper: fixed mini card detection
This commit is contained in:
dscarpac 2024-09-04 10:18:40 -05:00 committed by GitHub
commit 0b2df951f8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -258,11 +258,12 @@ function returnMiniCards()
end end
-- move mini cards -- move mini cards
for _, mat in pairs(guidReferenceApi.getObjectsByType("Playermat")) do for _, matColor in ipairs(COLORS) do
local miniId = mat.getVar("activeInvestigatorId") .. "-m" local data = playermatApi.getActiveInvestigatorData(matColor)
local miniId = data.id .. "-m"
if miniCardIndex[miniId] then if miniCardIndex[miniId] then
local pos = mat.positionToWorld(Vector(-1.36, 0, -0.625)):setAt("y", 1.67) local pos = playermatApi.transformLocalPosition(Vector(-1.36, 0, -0.625), matColor)
miniCardIndex[miniId].setPosition(pos) miniCardIndex[miniId].setPosition(pos:setAt("y", 1.67))
end end
end end
end end