606
edits
m |
m |
||
| Line 206: | Line 206: | ||
end | end | ||
local resourceIcon = i.icon(resource, nil, nil, com.firstUpper({resource}), 'en') | local resourceIcon = i.icon(resource, nil, nil, com.firstUpper({resource}), 'en') | ||
table.insert(unlockData, {label = resourceIcon, value = "(" .. | local tierPosition = string.find(displayAmount, "tier", nil, true) -- Find the last occurrence of "tier" | ||
if tierPosition then | |||
local beforeTier = string.sub(displayAmount, 1, tierPosition - 1) | |||
local theTier = string.sub(displayAmount, tierPosition) | |||
table.insert(unlockData, {label = resourceIcon, value = beforeTier .. "(" .. theTier .. ")"}) | |||
else | |||
table.insert(unlockData, {label = resourceIcon, value = displayAmount}) | |||
end | |||
end | |||
if #unlockData > 0 then | if #unlockData > 0 then | ||
edits