Module:SpriteFile: Difference between revisions

No edit summary
No edit summary
Line 26: Line 26:
local id = mw.text.trim(tostring(args[1] or ""))
local id = mw.text.trim(tostring(args[1] or ""))
local ext = (args.ext or default.ext):gsub("^%.", "")
local ext = (args.ext or default.ext):gsub("^%.", "")
local name = default.modid
local name = args.modid or default.modid
local file = (id == "" and "Grid Unknown.png") or (name .. " " .. id .. "." .. ext)
local file = (id == "" and "Grid Unknown.png") or (name .. " " .. id .. "." .. ext)
Line 36: Line 36:
end
end
-- if mw.ustring.lower( link ) == 'none' then
-- link = ''
-- elseif link ~= '' then
-- local linkPrefix = ( not link:find( '//' ) and args.linkprefix ) or ''
-- link = linkPrefix .. link
-- end
local scale = args.scale or default.scale
local scale = args.scale or default.scale