Module:KnightMiner/DeprecatedSprites

local p = {} function p.deprecated( f ) local name = f.args[1] .. 'Sprite' -- Load the list of sprites based on the name given local data = mw.loadData( 'Module:' .. name .. '/IDs' ).ids -- Go over every sprite to check for deprecated sprites local output = {} for k, v in pairs( data ) do		if v.deprecated then table.insert( output, ' ' ) end end

-- If we have results, then format them a bit and return results if #output > 0 then table.sort( output )

-- Add a dummy item to make the list easier table.insert( output, 1, '' )

local div = mw.html.create( 'div' ):css{ ['column-width'] = '15em', ['-moz-column-width'] = '15em', ['-webkit-column-width'] = '15em' }:wikitext( table.concat( output, '\n* ' ) ) return ';' .. name .. '\n' .. tostring( div ) end end

return p