Module:Infobox/Aptitude

De Les Archives de Vault-Tec
Documentation du module

Ce module contient le paramétrage de l'infobox {{Infobox aptitude}}.

Documentation transclues de Module:Infobox/Aptitude/doc.
local localdata = require('Module:Infobox/Localdata')
local abb = require('Module:Abréviation')

function buildGamesTable(localdata, index)
	local row = { type = 'text' } --fake
	
	if localdata['jeux'..index] then
		if abb.links({ localdata['jeux'..index] }) then
			row = { type = 'table', title = abb.links({ localdata['jeux'..index], 'Aptitudes' }), rows = {
				{ type = 'row', label = 'SPECIAL', value = 'special'..index },
				{ type = 'row', label = 'Exigences', value = 'requiert'..index },
				{ type = 'row', label = 'Rangs', value = 'rangs'..index },
				{ type = 'row', label = 'Effets', value = 'effets'..index },
				{ type = 'row', label = '[[Form ID]]', value = { 'formid'..index, 'baseid'..index }}
			}}
		end
	end
	
	return row
end

return {
	parts = {
		{ type = 'title', value = 'nom', subtitle = 'sous-titre', icon = 'icône', subhead = { games = 'jeux', subject = 'Aptitude', link = 'Aptitude' }},
		{ type = 'images', imageparameters = { 'image', 'image2', 'image3', 'image4', 'image5' }, captionparameter = { 'légende', 'image desc' }},
		buildGamesTable(localdata, '1'),
		buildGamesTable(localdata, '2'),
		buildGamesTable(localdata, '3'),
		buildGamesTable(localdata, '4'),
		buildGamesTable(localdata, '5'),
		buildGamesTable(localdata, '6'),
		buildGamesTable(localdata, '7'),
		buildGamesTable(localdata, '8'),
		{ type = 'text', value = 'pied' }
	}
}