Merge branch 'main' into global-api

This commit is contained in:
Chr1Z93 2024-08-04 00:01:38 +02:00
commit d81d395f2e

View File

@ -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
callback = function(spawned)
local matColor = playermatApi.getMatColorByPosition(position)
local matRotation = playermatApi.returnRotation(matColor)
local class = playermatApi.returnInvestigatorClass(matColor)
callback = function(spawned)
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