added teal highlighting

This commit is contained in:
dscarpac 2024-10-07 09:10:53 -05:00
parent 66de5f3dc1
commit 83dd3ade5c
4 changed files with 13 additions and 3 deletions

View File

@ -19,7 +19,7 @@
},
"ImageScalar": 1,
"ImageSecondaryURL": "",
"ImageURL": "https://steamusercontent-a.akamaihd.net/ugc/2467486908540932616/8370C75D2789E1332836D8C2A31D32542153DE85/",
"ImageURL": "https://steamusercontent-a.akamaihd.net/ugc/2503529021846579660/223F10EFA8B08AB25EC22181C3371161B5301F08/",
"WidthScale": 0
},
"Description": "Press a numpad key to spawn the indicated token.",

View File

@ -2580,7 +2580,7 @@ end
function updateUniversalActionAbilityToken(obj, params)
obj.call("updateClassAndSymbol", params)
if params.addTag then
obj.addTag(params.addTag)
obj.call("addTemporaryStatus")
end
end

View File

@ -272,6 +272,11 @@ function updateClassAndSymbol(params)
updateDisplay()
end
function addTemporaryStatus()
self.addTag("Temporary")
self.highlightOn({0, 200/255, 200/255})
end
function isClassName(str)
for _, className in ipairs(listOfClasses) do
if className == str then

View File

@ -4,6 +4,7 @@ local tokenManagerApi = require("core/token/TokenManagerApi")
local TOKEN_INDEX = {}
TOKEN_INDEX[1] = "universalActionAbility"
TOKEN_INDEX[2] = "universalActionAbility"
TOKEN_INDEX[3] = "resourceCounter"
TOKEN_INDEX[4] = "damage"
TOKEN_INDEX[5] = "path"
@ -65,7 +66,11 @@ function onScriptingButtonDown(index, playerColor)
local activeInvestigatorData = playermatApi.getActiveInvestigatorData(matColor)
rotation = playermatApi.returnRotation(matColor)
callbackName = "updateUniversalActionAbilityToken"
callbackParams = { class = activeInvestigatorData.class, symbol = activeInvestigatorData.class }
if index == 2 then -- temporary version
callbackParams = { class = activeInvestigatorData.class, symbol = activeInvestigatorData.class, addTag = "Temporary" }
else
callbackParams = { class = activeInvestigatorData.class, symbol = activeInvestigatorData.class }
end
end
tokenManagerApi.spawnToken(position, tokenType, rotation, callbackName, callbackParams)