Module:Player
From PC Gaming Shelter
Documentation for this module may be created at Module:Player/doc
local utils = require( 'Module:Utils' )
local p = {}
local function propertiesPlan()
-- ['Form field name'] = { 'Semantic property', 'delimiter' }
local propMap = {
['Image'] = {'Image', 'file' },
['Member of'] = {'Member of', ',' },
['Has status'] = {'Has status' },
['Plays game'] = {'Plays game', ',' },
['Plays mod'] = {'Plays mod', ',' },
['Has favorite mod'] = {'Has favorite mod', ',' },
['Is mentor for'] = {'Is mentor for', ',' },
['Is guardian for'] = {'Is guardian for', ',' },
['Has short description'] = {'Has short description' }
}
return propMap
end
local function infoboxSectionPlan()
local sectionMap = {
['Cover image'] = {
heading = '',
template = 'Infobox/Cover',
order = '1',
rows = {
'Image'
}
},
['Player Info'] = {
heading = 'Player Info',
template = 'Infobox/Player Info',
order = '2',
rows = {
'Member of',
'Has status',
'Plays game',
'Plays mod',
'Has favorite mod'
}
},
['Wiki'] = {
heading = 'Wiki',
template = 'Infobox/Wiki',
order = '3',
rows = {
'Is guardian for',
'Is mentor for',
'Contact links'
}
}
}
return sectionMap
end
function p.infobox(frame)
local category = 'Players'
local properties = propertiesPlan()
local sections = infoboxSectionPlan()
local footer = ''
local infobox = utils.createInfobox(frame, category, properties, sections, footer)
return infobox
end
return p
