« Module:Infobox/Aptitude » : différence entre les versions
mAucun résumé des modifications |
Aucun résumé des modifications |
||
(4 versions intermédiaires par 2 utilisateurs non affichées) | |||
Ligne 1 : | Ligne 1 : | ||
local localdata = require('Module:Infobox/Localdata') | local localdata = require('Module:Infobox/Localdata') | ||
local | local abb = require('Module:Abréviation') | ||
function buildGamesTable(localdata, index) | function buildGamesTable(localdata, index) | ||
Ligne 6 : | Ligne 6 : | ||
if localdata['jeux'..index] then | if localdata['jeux'..index] then | ||
if abb.links({ localdata['jeux'..index] }) then | |||
row = { type = 'table', title = abb.links({ localdata['jeux'..index], 'Aptitudes' }), rows = { | |||
row = { type = 'table', title = | |||
{ type = 'row', label = 'SPECIAL', value = 'special'..index }, | { type = 'row', label = 'SPECIAL', value = 'special'..index }, | ||
{ type = 'row', label = 'Exigences', value = 'requiert'..index }, | { type = 'row', label = 'Exigences', value = 'requiert'..index }, | ||
{ type = 'row', label = 'Rangs', value = 'rangs'..index }, | { type = 'row', label = 'Rangs', value = 'rangs'..index }, | ||
{ type = 'row', label = 'Effets', value = 'effets'..index }, | { type = 'row', label = 'Effets', value = 'effets'..index }, | ||
{ type = 'row', label = '[[Form | { type = 'row', label = '[[Form ID]]', value = { 'formid'..index, 'baseid'..index }} | ||
}} | }} | ||
end | end |
Dernière version du 8 octobre 2022 à 20:52
Ce module contient le paramétrage de l'infobox {{Infobox aptitude}}.
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' }
}
}