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
|
if tokenType == "resource" and stateID ~= nil and stateID ~= 1 then
|
||||||
callback = function(spawned) spawned.setState(stateID) end
|
callback = function(spawned) spawned.setState(stateID) end
|
||||||
elseif tokenType == "universalActionAbility" then
|
elseif tokenType == "universalActionAbility" then
|
||||||
local matColor = playermatApi.getMatColorByPosition(card.getPosition())
|
callback = function(spawned)
|
||||||
local class = playermatApi.returnInvestigatorClass(matColor)
|
local matColor = playermatApi.getMatColorByPosition(card.getPosition())
|
||||||
callback = function(spawned) spawned.call("updateClassAndSymbol", { class = class, symbol = subType or class }) end
|
local activeInvestigatorData = playermatApi.getActiveInvestigatorData(matColor)
|
||||||
|
|
||||||
|
spawned.call("updateClassAndSymbol", {
|
||||||
|
class = activeInvestigatorData.class,
|
||||||
|
symbol = subType or activeInvestigatorData.class
|
||||||
|
})
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
for i = 1, tokenCount do
|
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
|
-- check for nearest investigator card and change action token state to its class
|
||||||
elseif tokenType == "universalActionAbility" then
|
elseif tokenType == "universalActionAbility" then
|
||||||
local matColor = playermatApi.getMatColorByPosition(position)
|
|
||||||
local matRotation = playermatApi.returnRotation(matColor)
|
|
||||||
local class = playermatApi.returnInvestigatorClass(matColor)
|
|
||||||
callback = function(spawned)
|
callback = function(spawned)
|
||||||
|
local matColor = playermatApi.getMatColorByPosition(position)
|
||||||
|
local matRotation = playermatApi.returnRotation(matColor)
|
||||||
|
local activeInvestigatorData = playermatApi.getActiveInvestigatorData(matColor)
|
||||||
|
|
||||||
spawned.setRotation(matRotation)
|
spawned.setRotation(matRotation)
|
||||||
spawned.call("updateClassAndSymbol", { class = class, symbol = class })
|
spawned.call("updateClassAndSymbol", {
|
||||||
|
class = activeInvestigatorData.class,
|
||||||
|
symbol = activeInvestigatorData.class
|
||||||
|
})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user