Module:Game
From PC Gaming Shelter
Documentation for this module may be created at Module:Game/doc
local utils = require( 'Module:Utils' )
local p = {}
local function propertiesPlan()
-- ['Form field name'] = { 'Semantic property', 'delimiter', 'template' }
local propMap = {
['Release date'] = {'Has release date', '', '' },
['Developer'] = {'Has developer', ',', '' },
['Publisher'] = {'Has publisher', '', '' },
['Series'] = {'Has series', ',', '' },
['Image'] = {'Image', '', '' },
['Current version'] = {'Has version', '', '' },
['Genre'] = {'Has genre', ',', '' },
['Setting'] = {'Has setting', ',', '' },
['Has game mode'] = {'Has game mode', ',', '' },
['Platform'] = {'Has platform', ',', '' },
}
return propMap
end
local function infoboxOrderPlan()
local propOrder = {
'Release date',
'Developer',
'Publisher',
'Series',
'Current version',
'Genre',
'Setting',
'Has game mode',
'Platform'
}
return propOrder
end
local function subobjectPlan()
return {}
end
function p.infobox(frame)
local category = 'Games'
local properties = propertiesPlan()
local order = infoboxOrderPlan()
local subobjects = subobjectPlan()
local infobox = utils.createInfobox(frame, category, properties, order, subobjects)
return infobox
end
return p
