Module:Abilities/card: Difference between revisions

Jump to navigation Jump to search
m move resource lookup load inside of function call
Vergir (talk | contribs)
m make upgradebox fonts smaller so they always fit into the box
Line 425: Line 425:
-- Vary the font size based on the number of characters to prevent overflow
-- Vary the font size based on the number of characters to prevent overflow
local fontsize = '1rem'
local fontsize = '0.85rem'
if #description > 60 and #description < 71 then
if #description > 60 and #description < 71 then
fontsize = '0.95rem'
fontsize = '0.8rem'
elseif #description > 70 and #description < 91 then
elseif #description > 70 and #description < 91 then
fontsize = '0.875rem'
fontsize = '0.75rem'
elseif #description > 90 then
elseif #description > 90 then
fontsize = '0.8rem'
fontsize = '0.7rem'
end
end