Module:Sprite: Difference between revisions
No edit summary |
No edit summary |
||
| Line 3: | Line 3: | ||
local args = f | local args = f | ||
if f == mw.getCurrentFrame() then | if f == mw.getCurrentFrame() then | ||
args = require( 'Module:ProcessArgs' ).merge() | args = require( 'Module:ProcessArgs' ).merge( true ) | ||
end | end | ||
local name = args.name | local name = args.name | ||
| Line 77: | Line 77: | ||
local args = f | local args = f | ||
if f == mw.getCurrentFrame() then | if f == mw.getCurrentFrame() then | ||
args = require( 'Module:ProcessArgs' ).merge() | args = require( 'Module:ProcessArgs' ).merge( true ) | ||
end | end | ||
| Line 88: | Line 88: | ||
local pos = ids[name] or ids[name:lower():gsub( '%s', '-' )] | local pos = ids[name] or ids[name:lower():gsub( '%s', '-' )] | ||
if not pos then | if not pos then | ||
category = '[[Category:Pages with | category = '[[Category:Pages with missing sprites]]' | ||
end | end | ||
args.pos = pos | args.pos = pos | ||
| Line 102: | Line 102: | ||
end | end | ||
local link = ( args[1] or '' ):match( '^(.-)%-' ) | local link = ( args[1] or '' ):match( '^(.-)%-' ) or args[1] | ||
local text = args[2] or link | local text = args[2] or link | ||