Module:Card: Difference between revisions
m Icons for galaxy is <Galaxy> Icon |
ReisuDesign (talk | contribs) No edit summary |
||
| Line 198: | Line 198: | ||
local requestedType = out.nonDefaults and out.nonDefaults.type or nil | local requestedType = out.nonDefaults and out.nonDefaults.type or nil | ||
out.type, out.data = p.getTypeAndData(out.name, requestedType) | out.type, out.data = p.getTypeAndData(out.name, requestedType) | ||
-- Base name for assets. | |||
-- Removes a trailing disambiguation such as "(Currency)" | |||
-- while keeping the full name for lookup and links. | |||
out.image_name = out.name:gsub('%s*%([^()]*%)$', '') | |||
-- Boolean params | -- Boolean params | ||
| Line 312: | Line 316: | ||
out.final_file = out.image | out.final_file = out.image | ||
else | else | ||
out.final_file = lib.sanitizeFileName(out. | out.final_file = lib.sanitizeFileName(out.image_name) .. out.suffix .. '.' .. out.image_ext | ||
end | end | ||
| Line 324: | Line 328: | ||
out.image_size, | out.image_size, | ||
'px|alt=', | 'px|alt=', | ||
out.name, | out.data and (out.data.name or out.data.title) or out.name, | ||
linkPart, | linkPart, | ||
']]' | ']]' | ||