handling for stacked clues

This commit is contained in:
Chr1Z93 2023-05-16 10:13:13 +02:00
parent bf2352f79b
commit 189f08cce3

View File

@ -108,8 +108,13 @@ function takeClueFromLocation(playerColor, hoveredObject)
cardName = "nameless card"
end
clue.setPositionSmooth(pos)
clue.setRotation(rot)
-- check if found clue is a stack or single token
if clue.getQuantity() > 1 then
clue.takeObject({position = pos, rotation = rot})
else
clue.setPositionSmooth(pos)
clue.setRotation(rot)
end
if cardName then
broadcastToAll(playerName .. " took one clue from " .. cardName .. ".", playerColor)