« Module:Infobox/Consommable » : différence entre les versions
Page créée avec « local localdata = require('Module:Infobox/Localdata') function buildPerkLabel(localdata, index) local label = nil if(localdata['aptitude' .. index]) then label = '[['… » |
Aucun résumé des modifications |
||
Ligne 26 : | Ligne 26 : | ||
{ type = 'row', label = 'Addiction', value = 'addiction' }, | { type = 'row', label = 'Addiction', value = 'addiction' }, | ||
{ type = 'row', label = 'Faim', value = 'faim' }, | { type = 'row', label = 'Faim', value = 'faim' }, | ||
{ type = 'row', label = 'Soif', value = 'soif' } | { type = 'row', label = 'Soif', value = 'soif' }, | ||
{ type = 'row', label = 'Maladie', value = 'maladie' } | |||
}}, | }}, | ||
{ type = 'table', title = 'Artisanat', rows = { | { type = 'table', title = 'Artisanat', rows = { | ||
Ligne 37 : | Ligne 38 : | ||
{ type = 'row', label = 'Valeur', value = 'valeur' }, | { type = 'row', label = 'Valeur', value = 'valeur' }, | ||
{ type = 'row', label = 'Quêtes', value = 'quêtes' }, | { type = 'row', label = 'Quêtes', value = 'quêtes' }, | ||
{ type = 'row', label = 'Événements', value = 'événements' }, | |||
{ type = 'row', label = 'Durée avant détérioration', value = 'détérioration' }, | { type = 'row', label = 'Durée avant détérioration', value = 'détérioration' }, | ||
{ type = 'row', label = 'Se détériore en', value = 'détériore' }, | { type = 'row', label = 'Se détériore en', value = 'détériore' }, |
Version du 6 août 2021 à 09:07
Ce module contient le paramétrage de l'infobox {{Infobox consommable}}.
local localdata = require('Module:Infobox/Localdata')
function buildPerkLabel(localdata, index)
local label = nil
if(localdata['aptitude' .. index]) then
label = '[[' .. localdata['aptitude' .. index] .. ']]'
end
return label
end
function buildPerkValue(localdata, index)
local value = nil
if(localdata['effets aptitude' .. index]) then
value = localdata['effets aptitude' .. index]
end
return value
end
return {
parts = {
{ type = 'title', value = 'nom', subtitle = 'sous-titre', icon = 'icône', subhead = { games = 'jeux', subject = 'Consommable', link = 'Consommables' }},
{ type = 'images', imageparameters = { 'image', 'image2', 'image3', 'image4', 'image5' }, captionparameter = { 'légende', 'image desc' }},
{ type = 'table', title = 'Effets', rows = {
{ type = 'row', label = 'Compétence', value = 'compétence' },
{ type = 'row', label = 'Effets', value = 'effets' },
{ type = 'row', label = 'Addiction', value = 'addiction' },
{ type = 'row', label = 'Faim', value = 'faim' },
{ type = 'row', label = 'Soif', value = 'soif' },
{ type = 'row', label = 'Maladie', value = 'maladie' }
}},
{ type = 'table', title = 'Artisanat', rows = {
{ type = 'row', label = 'Composant de', value = 'composant de' },
{ type = 'row', label = 'Composants', value = 'composants' },
{ type = 'row', label = 'Utilisation', value = 'autre utilisation' }
}},
{ type = 'table', title = 'Autres', rows = {
{ type = 'row', label = 'Poids', value = 'poids' },
{ type = 'row', label = 'Valeur', value = 'valeur' },
{ type = 'row', label = 'Quêtes', value = 'quêtes' },
{ type = 'row', label = 'Événements', value = 'événements' },
{ type = 'row', label = 'Durée avant détérioration', value = 'détérioration' },
{ type = 'row', label = 'Se détériore en', value = 'détériore' },
{ type = 'row', label = 'Recette', value = 'recette' }
}},
{ type = 'table', title = 'Aptitudes', collapseparameters = { collapsible = true, collapsed = true }, rows = {
{ type = 'row', label = function(localdata) return buildPerkLabel(localdata, '') end, value = function(localdata) return buildPerkValue(localdata, '') end },
{ type = 'row', label = function(localdata) return buildPerkLabel(localdata, '2') end, value = function(localdata) return buildPerkValue(localdata, '2') end },
{ type = 'row', label = function(localdata) return buildPerkLabel(localdata, '3') end, value = function(localdata) return buildPerkValue(localdata, '3') end },
{ type = 'row', label = function(localdata) return buildPerkLabel(localdata, '4') end, value = function(localdata) return buildPerkValue(localdata, '4') end },
{ type = 'row', label = function(localdata) return buildPerkLabel(localdata, '5') end, value = function(localdata) return buildPerkValue(localdata, '5') end }
}},
{ type = 'table', title = 'Technique', rows = {
{ type = 'row', label = 'Prototype ID', value = 'proto' },
{ type = 'row', label = 'Editor ID', value = 'editor id' },
{ type = 'row', label = '[[Form ID|Base ID]]', value = 'baseid' },
{ type = 'row', label = 'Fichier message', value = 'message' }
}},
{ type = 'text', value = 'pied' }
}
}