Module:Infobox/Créature
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' }
}
}