bugfix for take clue hotkey

This commit is contained in:
Chr1Z93 2024-01-21 21:21:41 +01:00
parent d41f452f86
commit 08ce4e0e2a

View File

@ -279,8 +279,9 @@ function takeClueFromLocation(playerColor, hoveredObject)
return
end
local searchResult = searchLib.belowPosition(hoveredObject.getPosition(), "isCard")
clue = hoveredObject
local searchResult = searchLib.belowPosition(clue.getPosition(), "isCard")
if #searchResult ~= 0 then
cardName = searchResult[1].getName()
end
@ -313,7 +314,7 @@ function takeClueFromLocation(playerColor, hoveredObject)
if cardName then
broadcastToAll(playerName .. " took one clue from " .. cardName .. ".", playerColor)
else
broadcastToAll(playerName .. " took one clue.", "Green")
broadcastToAll(playerName .. " took one clue.", playerColor)
end
victoryDisplayApi.update()