This commit is contained in:
dscarpac 2024-07-03 17:05:00 -05:00
parent ecf2c23976
commit 592e7ecc37

View File

@ -138,7 +138,7 @@ function generateContextMenu()
end
if allowed then
for i = 1, SHOW_MULTI_SEAL do
for i = SHOW_MULTI_SEAL, 1, -1 do
sealToken(map.name, playerColor)
end
else
@ -190,6 +190,7 @@ function sealToken(name, playerColor)
tokenArrangerApi.layout()
if name == "Bless" or name == "Curse" then
blessCurseManagerApi.sealedToken(name, guid)
addStackSize(token, name)
end
end
})
@ -283,5 +284,39 @@ function resolveSealed()
local closestMatColor = playermatApi.getMatColorByPosition(self.getPosition())
local mat = guidReferenceApi.getObjectByOwnerAndType(closestMatColor, "Playermat")
local guidToBeResolved = table.remove(sealedTokens)
local token = getObjectFromGUID(guidToBeResolved)
token.UI.setXml("")
chaosBagApi.drawChaosToken(mat, true, _, guidToBeResolved)
end
function addStackSize(token, name)
if name == "Bless" then
labelColor = "#9D702CE6"
else
labelColor = "#633A84E6"
end
token.UI.setXmlTable({
{
tag = "Panel",
attributes = {
height = 380,
width = 380,
rotation = "0 0 180",
scale = "0.2 0.2 1",
position = "0 0 -12",
color = labelColor
},
children = {
tag = "Text",
attributes = {
fontSize = "380",
font = "font_teutonic-arkham",
color = "#ffffff",
outline = "#000000",
outlineSize = "8 -8",
text = #sealedTokens
}
}
}
})
end