Aller au contenu

« Module:Infobox/Matériau » : différence entre les versions

aucun résumé des modifications
Page créée avec « 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 { parts = { { type = 'title', val... »
 
Aucun résumé des modifications
Ligne 1 : Ligne 1 :
local localdata = require('Module:Infobox/Localdata')
local general = require("Module:Infobox/Fonctions")
 
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 = {
    parts = {
{ type = 'title', value = 'nom', subtitle = 'sous-titre', icon = 'icône', subhead = { games = 'jeux', subject = buildSubHead(localdata, 'subject', 'Objet'), link = buildSubHead(localdata, 'link', 'Objets') }},
        general.title(),
{ type = 'images', imageparameters = { 'image', 'image2', 'image3', 'image4', 'image5' }, captionparameter = { 'légende', 'image desc' }},
        general.image(),
{ type = 'table', title = 'Propriétés', rows = {
        {
{ type = 'row', label = 'Utilisations', value = 'utilisations' },
            type = "table",
{ type = 'row', label = 'Poids', value = { 'poids', 'masse' }},
            title = "Propriétés",
{ type = 'row', label = 'Valeur', value = 'valeur' },
            rows = {
{ type = 'row', label = 'Effets', value = 'effets' }
                {type = "row", label = "Utilisations", value = "utilisations"},
}},
                {type = "row", label = "Poids", value = "poids"},
{ type = 'table', title = 'Artisanat', rows = {
                {type = "row", label = "Valeur", value = "valeur"},
{ type = 'row', label = 'Plan', value = 'plan' },
                {type = "row", label = "Effets", value = "effets"}
{ type = 'row', label = 'Composant de', value = 'composant de' },
            }
{ type = 'row', label = 'Débloque', value = 'débloque' },
        },
{ type = 'row', label = 'Modifie', value = 'modifie' }
        {
}},
            type = "table",
{ type = 'table', title = 'Quêtes', rows = {
            title = "Artisanat",
{ type = 'row', label = 'Quêtes', value = 'quêtes' },
            rows = {
{ type = 'row', label = 'Événements', value = 'événements' }
                {type = "row", label = "Plan", value = "plan"},
}},
                {type = "row", label = "Composant de", value = "composant de"},
{ type = 'table', title = 'Technique', collapseparameters = { collapsible = true, collapsed = true }, rows = {
                {type = "row", label = "Débloque", value = "débloque"},
{ type = 'row', label = 'Editor ID', value = 'editorid' },
                {type = "row", label = "Modifie", value = "modifie"}
{ 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 = "table",
{ type = 'text', value = 'pied' }
            title = "Missions",
}
            rows = {
                {type = "row", label = "Missions", value = "missions"},
                {type = "row", label = "Événements", value = "événements"}
            }
        },
        general.creation_kit()
    }
}
}