Merge pull request #812 from argonui/chat-color

Improved "Take Clue for X" hotkeys
This commit is contained in:
dscarpac 2024-08-15 04:27:49 -05:00 committed by GitHub
commit 76f4144836
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -449,19 +449,19 @@ function switchSeat(playerColor, direction)
end
function takeClueFromLocationWhite(_, hoveredObject)
takeClueFromLocation("White", hoveredObject)
takeClueFromLocation(playermatApi.getPlayerColor("White"), hoveredObject)
end
function takeClueFromLocationOrange(_, hoveredObject)
takeClueFromLocation("Orange", hoveredObject)
takeClueFromLocation(playermatApi.getPlayerColor("Orange"), hoveredObject)
end
function takeClueFromLocationGreen(_, hoveredObject)
takeClueFromLocation("Green", hoveredObject)
takeClueFromLocation(playermatApi.getPlayerColor("Green"), hoveredObject)
end
function takeClueFromLocationRed(_, hoveredObject)
takeClueFromLocation("Red", hoveredObject)
takeClueFromLocation(playermatApi.getPlayerColor("Red"), hoveredObject)
end
-- takes a clue from a location, player needs to hover the clue directly or the location
@ -507,15 +507,10 @@ function takeClueFromLocation(playerColor, hoveredObject)
return
end
-- determine the matColor and position
local clickableClues = GlobalApi.getOptionPanelState()["useClueClickers"]
-- handling for calling this for a specific mat via hotkey
local matColor, pos
if Player[playerColor] and Player[playerColor].seated then
matColor = playermatApi.getMatColor(playerColor)
else
matColor = playerColor
end
local matColor = playermatApi.getMatColor(playerColor)
local pos
if clickableClues then
pos = { x = 0.49, y = 2.66, z = 0.00 }