Fixed Take Clue GameKey with Clickable Clues
This commit is contained in:
parent
79f7861f1e
commit
1213771ef9
@ -1,6 +1,7 @@
|
|||||||
local blessCurseManagerApi = require("chaosbag/BlessCurseManagerApi")
|
local blessCurseManagerApi = require("chaosbag/BlessCurseManagerApi")
|
||||||
local playmatApi = require("playermat/PlaymatApi")
|
local playmatApi = require("playermat/PlaymatApi")
|
||||||
local victoryDisplayApi = require("core/VictoryDisplayApi")
|
local victoryDisplayApi = require("core/VictoryDisplayApi")
|
||||||
|
local optionPanelApi = require("core/OptionPanelApi")
|
||||||
|
|
||||||
function onLoad()
|
function onLoad()
|
||||||
addHotkey("Add Doom to Agenda", addDoomToAgenda)
|
addHotkey("Add Doom to Agenda", addDoomToAgenda)
|
||||||
@ -98,14 +99,18 @@ function takeClueFromLocation(playerColor, hoveredObject)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local clickableClues = optionPanelApi.getOptions()["useClueClickers"]
|
||||||
local playerName = Player[playerColor].steam_name
|
local playerName = Player[playerColor].steam_name
|
||||||
local matColor = playmatApi.getMatColor(playerColor)
|
local matColor = playmatApi.getMatColor(playerColor)
|
||||||
local pos = playmatApi.transformLocalPosition({x = -1.12, y = 0.05, z = 0.7}, matColor)
|
local pos = nil
|
||||||
local rot = playmatApi.returnRotation(matColor)
|
if clickableClues then
|
||||||
|
pos = {x = 0.49, y = 2.66, z = 0.00}
|
||||||
if cardName == "" or cardName == nil then
|
playmatApi.updateClueClicker(playerColor, playmatApi.getClueCount(clickableClues, playerColor) + 1)
|
||||||
cardName = "nameless card"
|
else
|
||||||
|
pos = playmatApi.transformLocalPosition({x = -1.12, y = 0.05, z = 0.7}, matColor)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local rot = playmatApi.returnRotation(matColor)
|
||||||
|
|
||||||
-- check if found clue is a stack or single token
|
-- check if found clue is a stack or single token
|
||||||
if clue.getQuantity() > 1 then
|
if clue.getQuantity() > 1 then
|
||||||
|
@ -191,6 +191,10 @@ do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
PlaymatApi.updateClueClicker = function(playerColor, val)
|
||||||
|
return getObjectFromGUID(CLUE_CLICKER_GUIDS[playerColor]).call("updateVal", val)
|
||||||
|
end
|
||||||
|
|
||||||
-- Convenience function to look up a mat's object by color, or get all mats.
|
-- Convenience function to look up a mat's object by color, or get all mats.
|
||||||
---@param matColor String for one of the active player colors - White, Orange, Green, Red. Also
|
---@param matColor String for one of the active player colors - White, Orange, Green, Red. Also
|
||||||
-- accepts "All" as a special value which will return all four mats.
|
-- accepts "All" as a special value which will return all four mats.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user