« Module:Infobox/Créature » : différence entre les versions
Page créée avec « local localdata = require('Module:Infobox/Localdata') function buildSubject(arg) local subject = 'créature' if arg then local types = { ['créature'] = 'Cré… » |
mAucun résumé des modifications |
||
Ligne 2 : | Ligne 2 : | ||
function buildSubject(arg) | function buildSubject(arg) | ||
local subject = ' | local subject = 'Créature' | ||
if arg then | if arg then |
Version du 15 juin 2021 à 15:58
Ce module contient le paramétrage de l'infobox {{Infobox créature}}.
local localdata = require('Module:Infobox/Localdata')
function buildSubject(arg)
local subject = 'Créature'
if arg then
local types = {
['créature'] = 'Créature',
['ordinateur'] = 'Ordinateur',
['robot'] = 'Robot'
}
subject = types[arg:lower()] or subject
end
return subject
end
function buildLink(arg)
local subject = 'Créatures'
if arg then
local types = {
['créature'] = 'Créatures',
['ordinateur'] = 'Robots et ordinateurs',
['robot'] = 'Robots et ordinateurs'
}
subject = types[arg:lower()] or subject
end
return subject
end
return {
parts = {
{ type = 'title', value = 'nom', subtitle = 'sous-titre', icon = 'icône', subhead = { games = 'jeux', subject = buildSubject(localdata['type']), link = buildLink(localdata['type']) }},
{ type = 'images', imageparameters = { 'image', 'image2', 'image3', 'image4', 'image5' }, captionparameter = { 'légende', 'image desc' }},
{ type = 'row', label = 'Nom original', value = 'nom original' },
{ type = 'row', label = 'Variantes', value = 'variantes' },
{ type = 'row', label = 'Localisation', value = 'localisation' },
{ type = 'row', label = 'Affiliation', value = 'affiliation' },
{ type = 'row', label = 'Fichier dialogue', value = 'dialogue' },
{ type = 'text', value = 'pied' }
}
}