Module:Abilities/icon: Difference between revisionsGive feedback
migrated icon functions to its own module Tag: Recreated |
m Move p.get_attr_icon to here |
||
| Line 27: | Line 27: | ||
end | end | ||
function p. | function p.getAttrIcon(attrType) | ||
return getAttrIcon(attrType) | return getAttrIcon(attrType) | ||
end | end | ||
function p. | function p.getAttrIconFile(frame) | ||
local args = frame.args | local args = frame.args | ||
local attrType = args[1] | local attrType = args[1] | ||
return | local attr_type = frame.args[1] | ||
local icon = getAttrIcon(attr_type) | |||
if icon == nil then | |||
return '' | |||
end | |||
return string.format('[[File:%s|%s|18px|link=%s]]', icon.img or '', icon.size or '', icon.link or '') | |||
end | end | ||