Bugfix for getting investigator data
This commit is contained in:
parent
c70de840f7
commit
e786bef6e5
@ -245,9 +245,15 @@ do
|
||||
if tokenType == "resource" and stateID ~= nil and stateID ~= 1 then
|
||||
callback = function(spawned) spawned.setState(stateID) end
|
||||
elseif tokenType == "universalActionAbility" then
|
||||
local matColor = playermatApi.getMatColorByPosition(card.getPosition())
|
||||
local class = playermatApi.returnInvestigatorClass(matColor)
|
||||
callback = function(spawned) spawned.call("updateClassAndSymbol", { class = class, symbol = subType or class }) end
|
||||
callback = function(spawned)
|
||||
local matColor = playermatApi.getMatColorByPosition(card.getPosition())
|
||||
local activeInvestigatorData = playermatApi.getActiveInvestigatorData(matColor)
|
||||
|
||||
spawned.call("updateClassAndSymbol", {
|
||||
class = activeInvestigatorData.class,
|
||||
symbol = subType or activeInvestigatorData.class
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
for i = 1, tokenCount do
|
||||
|
@ -66,12 +66,16 @@ function onScriptingButtonDown(index, playerColor)
|
||||
|
||||
-- check for nearest investigator card and change action token state to its class
|
||||
elseif tokenType == "universalActionAbility" then
|
||||
local matColor = playermatApi.getMatColorByPosition(position)
|
||||
local matRotation = playermatApi.returnRotation(matColor)
|
||||
local class = playermatApi.returnInvestigatorClass(matColor)
|
||||
callback = function(spawned)
|
||||
local matColor = playermatApi.getMatColorByPosition(position)
|
||||
local matRotation = playermatApi.returnRotation(matColor)
|
||||
local activeInvestigatorData = playermatApi.getActiveInvestigatorData(matColor)
|
||||
|
||||
spawned.setRotation(matRotation)
|
||||
spawned.call("updateClassAndSymbol", { class = class, symbol = class })
|
||||
spawned.call("updateClassAndSymbol", {
|
||||
class = activeInvestigatorData.class,
|
||||
symbol = activeInvestigatorData.class
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user