Module:OutfitInfobox
Jump to navigation
Jump to search
Documentation for this module may be created at Module:OutfitInfobox/doc
local common = require('Module:Common')
local cargo = require('Module:Common/Cargo')
local p = {}
function p.cargo(frame)
local args = common.getArgs( frame )
local variants = {}
for key, val in pairs(args) do
if key:find('^variant') then
table.insert( variants, val )
end
end
-- Store into Cargo
cargo.store({
['_table'] = 'Outfits',
['name'] = args['title'] or '',
['image'] = args['image'] or '',
['variants'] = table.concat( variants, ',' ),
['obtain'] = args['obtain'] or '',
['pieces'] = args['pieces'] or nil,
['eachprice'] = args['eachprice'] or 0,
['bundleprice'] = args['bundleprice'] or 0,
['releasedate'] = args['releasedate'] or '',
['available'] = args['available'] or true
})
end
return p