Modification de Module:Infobox/Matériau
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 | local localdata = require('Module:Infobox/Localdata') | ||
local keyWords = { | |||
['minerai'] = { subject = 'Minerai', link = 'Minerais' }, | |||
} | |||
function buildSubHead(localdata, keyWordType, default) | |||
local subhead = default | |||
if localdata['type'] and keyWords[localdata['type']:lower()] then | |||
local keyWord = keyWords[localdata['type']:lower()] | |||
if keyWord then | |||
subhead = keyWord[keyWordType] | |||
end | |||
end | |||
return subhead | |||
end | |||
return { | return { | ||
parts = { | |||
{ type = 'title', value = 'nom', subtitle = 'sous-titre', icon = 'icône', subhead = { games = 'jeux', subject = buildSubHead(localdata, 'subject', 'Objet'), link = buildSubHead(localdata, 'link', 'Objets') }}, | |||
{ type = 'images', imageparameters = { 'image', 'image2', 'image3', 'image4', 'image5' }, captionparameter = { 'légende', 'image desc' }}, | |||
{ type = 'table', title = 'Propriétés', rows = { | |||
{ type = 'row', label = 'Utilisations', value = 'utilisations' }, | |||
{ type = 'row', label = 'Poids', value = { 'poids', 'masse' }}, | |||
{ type = 'row', label = 'Valeur', value = 'valeur' }, | |||
{ type = 'row', label = 'Effets', value = 'effets' } | |||
}}, | |||
{ type = 'table', title = 'Artisanat', rows = { | |||
{ type = 'row', label = 'Plan', value = 'plan' }, | |||
{ type = 'row', label = 'Composant de', value = 'composant de' }, | |||
{ type = 'row', label = 'Débloque', value = 'débloque' }, | |||
{ type = 'row', label = 'Modifie', value = 'modifie' } | |||
}}, | |||
{ type = 'table', title = 'Quêtes', rows = { | |||
{ type = 'row', label = 'Quêtes', value = 'quêtes' }, | |||
{ type = 'row', label = 'Événements', value = 'événements' } | |||
}}, | |||
{ type = 'table', title = 'Technique', collapseparameters = { collapsible = true, collapsed = true }, rows = { | |||
{ type = 'row', label = 'Editor ID', value = 'editorid' }, | |||
{ type = 'row', label = '[[Form ID|Base ID]]', value = 'baseid' }, | |||
}}, | |||
{ type = 'row', label = 'Variante', value = 'variante' }, | |||
{ type = 'images', imageparameters = 'emplacement', captionparameter = 'emplacement desc', defaultcaption = 'Emplacement' }, | |||
{ type = 'text', value = 'pied' } | |||
} | |||
} | } |