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