Merge pull request #558 from argonui/clue-hotkey

Bugfix for take clue hotkey
This commit is contained in:
Entrox-Licher 2024-01-21 15:36:49 -05:00 committed by GitHub
commit d73b4706ac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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
@ -311,9 +312,9 @@ function takeClueFromLocation(playerColor, hoveredObject)
end
if cardName then
broadcastToAll(playerName .. " took one clue from " .. cardName .. ".", playerColor)
broadcastToAll(playerName .. " took one clue from " .. cardName .. ".", "White")
else
broadcastToAll(playerName .. " took one clue.", "Green")
broadcastToAll(playerName .. " took one clue.", "White")
end
victoryDisplayApi.update()