Modification de Module:Infobox/Créature
La modification peut être annulée. Veuillez vérifier les différences ci-dessous pour voir si c’est bien ce que vous voulez faire, puis publier ces changements pour finaliser l’annulation de cette modification.
Version actuelle | Votre texte | ||
Ligne 1 : | Ligne 1 : | ||
local localdata = require( | local localdata = require('Module:Infobox/Localdata') | ||
local | 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' | |||
local | |||
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 | end | ||
return { | 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 = 'table', title = 'Informations', rows = { | |||
{ type = 'row', label = 'Nom original', value = 'nom original' }, | |||
{ type = 'row', label = 'Localisation', value = 'localisation' }, | |||
{ type = 'row', label = 'Variantes', value = 'variantes' }, | |||
{ type = 'row', label = 'Individus', value = 'individus' }, | |||
{ type = 'row', label = 'Modèles', value = 'modèles' }, | |||
{ type = 'row', label = 'Affiliation', value = 'affiliation' }, | |||
{ type = 'row', label = 'Fichier dialogue', value = 'dialogue' } | |||
}}, | |||
{ type = 'text', value = 'pied' } | |||
} | |||
} | } |