Module:Abilities/icon: Difference between revisionsGive feedback
mNo edit summary |
m Added getScalarIconFile func |
||
| Line 78: | Line 78: | ||
return getScalarIcon(scaleType, attribute) | return getScalarIcon(scaleType, attribute) | ||
end | |||
function p.getScalarIconFile(frame) | |||
local args = frame.args | |||
local scaleType = args[1] | |||
local icon = getScalarIcon(scaleType, attribute) | |||
if not icon or icon.class == "default" then | |||
return string.format('[[Tooltip|?|Missing scaling type "%s" in Module:Abilities/card]]', scaleType) | |||
end | |||
return string.format( | |||
'<span class="ac-scaling--%s">[[%s|link=%s|%s]]</span>', | |||
icon.class, | |||
icon.icon, | |||
icon.link, | |||
icon.size | |||
) | |||
end | end | ||
return p | return p | ||