resolving comments

This commit is contained in:
Chr1Z93 2023-04-10 11:06:05 +02:00
parent f592cd17ea
commit 9abcfc46e1
2 changed files with 12 additions and 11 deletions

1
SCED.wiki Submodule

@ -0,0 +1 @@
Subproject commit 01065bfc202457c2c2edc4e8fa9a2385a4e3ecd5

View File

@ -74,6 +74,8 @@ function onLoad(saveState)
percentage = false percentage = false
else else
percentage = "basic" percentage = "basic"
broadcastToAll("Percentages are unreliable when using tokens that draw other tokens (bless or curse for example).",
"Yellow")
end end
layout() layout()
end) end)
@ -83,8 +85,9 @@ function onLoad(saveState)
percentage = "basic" percentage = "basic"
else else
percentage = "cumulative" percentage = "cumulative"
broadcastToAll("Cumulative percentages are unreliable when using tokens that draw other tokens (bless or curse for example).", Color.Yellow)
end end
broadcastToAll("Percentages are unreliable when using tokens that draw other tokens (bless or curse for example).",
"Yellow")
layout() layout()
end) end)
@ -209,16 +212,12 @@ end
-- order function for data sorting -- order function for data sorting
function tokenValueComparator(left, right) function tokenValueComparator(left, right)
if left.value > right.value then if (left.value ~= right.value) then
return true return left.value > right.value
elseif right.value > left.value then elseif left.order ~= right.order then
return false return left.order < right.order
elseif left.order < right.order then
return true
elseif right.order < left.order then
return false
else else
return left.token.getGUID() > right.token.getGUID() return false
end end
end end
@ -358,6 +357,7 @@ function layout(_, _, isRightClick)
tokenName = item.token.getName() tokenName = item.token.getName()
-- set tokenName to false if it does not contain letters -- set tokenName to false if it does not contain letters
-- tokenName is used by `createPercentageButton()` to determine the textcolor for percentages
if string.match(tokenName, "%a") == nil then if string.match(tokenName, "%a") == nil then
tokenName = false tokenName = false
end end