FANDOM


local AD = require('Module:Abstract data')
 
local article = {}
 
local function argList()
    return { 
        'image',
        'tier',
        'description',
        'strength',
        'minabsorption',
        'maxabsorption',
        'degradation',
        'price',
        'inshops',
        'cansell'
    }
end
 
local function section( frame, name )
    return frame:expandTemplate{
        title = 'Article armor/'..name,
        args  = AD.allArgs( frame, argList() )
    }
end
 
function article.infobox( frame )
    local args  = AD.allArgs( frame, argList() )
 
    -- args specific to the infobox
    local image = frame:expandTemplate{ title = 'Item image', args = { args.image } }
    args.image  = AD.getParam( frame, 'infoboximage', image )
    args.levels = AD.getParam( frame, 'levels',  true )
 
    return frame:expandTemplate{
        title = 'Infobox armor',
        args = args
    }
end
 
function article.intro( frame )
    return section( frame, 'Intro' )
end
 
function article.description( frame )
  return section( frame, 'Description' )
end
 
function article.obtaining( frame )
  return section( frame, 'Obtaining' )
end
 
function article.absorption( frame )
  return section( frame, 'Absorption' )
end
 
function article.categories( frame )
  return '[[Category:Armors]]'
end
 
return article
Community content is available under CC-BY-SA unless otherwise noted.