Module:Infobox/Aptitude

De Les Archives de Vault-Tec
Révision datée du 16 juin 2021 à 08:07 par Kharmitch (discussion | contributions) (Page créée avec « local localdata = require('Module:Infobox/Localdata') local games = require('Module:Jeux') function buildGamesTable(localdata, index) local row = {} if localdata['jeu… »)
(diff) ← Version précédente | Voir la version actuelle (diff) | Version suivante → (diff)
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 games = require('Module:Jeux')

function buildGamesTable(localdata, index)
	local row = {}
	
	if localdata['jeux'..index] then
		local game = gamesTool.buildLinksList({ localdata['jeux'..index] })
		
		if game then
			row = { type = 'table', title = game, 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 = '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 = 'Aptitudes' }},
		{ 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' }
	}
}