From f118c27cd3435d71186841a3e07c810476fa014f Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Wed, 14 Aug 2024 23:51:03 +0200 Subject: [PATCH] Improved "Take Clue for X" hotkeys --- src/core/GameKeyHandler.ttslua | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/core/GameKeyHandler.ttslua b/src/core/GameKeyHandler.ttslua index 43edb90b..8b6e19ff 100644 --- a/src/core/GameKeyHandler.ttslua +++ b/src/core/GameKeyHandler.ttslua @@ -448,19 +448,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 @@ -506,15 +506,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 }