« Module:Infobox/Consommable » : différence entre les versions
mAucun résumé des modifications |
Aucun résumé des modifications |
||
(Une version intermédiaire par un autre utilisateur non affichée) | |||
Ligne 54 : | Ligne 54 : | ||
{ type = 'row', label = 'Recette', value = 'recette' } | { type = 'row', label = 'Recette', value = 'recette' } | ||
}}, | }}, | ||
{ type = 'table', title = 'Technique', rows = { | { type = 'table', title = 'Technique', collapseparameters = { collapsible = true, collapsed = true }, rows = { | ||
{ type = 'row', label = 'Prototype ID', value = 'proto' }, | { type = 'row', label = 'Prototype ID', value = 'proto' }, | ||
{ type = 'row', label = 'Editor ID', value = 'editor id' }, | { type = 'row', label = 'Editor ID', value = 'editor id' }, | ||
{ type = 'row', label = '[[Form | { type = 'row', label = '[[Form ID]]', value = 'formid' }, | ||
{ type = 'row', label = 'Fichier message', value = 'message' } | { type = 'row', label = 'Fichier message', value = 'message' } | ||
}}, | }}, |
Dernière version du 2 décembre 2023 à 01:01
Ce module contient le paramétrage de l'infobox {{Infobox consommable}}.
local localdata = require('Module:Infobox/Localdata')
function buildPerkRow(localdata, index)
local row = { type = 'text' } --fake
local perkLink = localdata['aptitude' .. index]
local perkEffect = localdata['effets aptitude' .. index]
if perkLink and perkEffect then
row = {
type = 'row',
label = function(localdata) return localdata['aptitude' .. index] end,
value = function(localdata) return localdata['effets aptitude' .. index] end,
}
end
return row
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 = 'Maladie', value = 'maladie' },
{ type = 'row', label = 'Points de vie', value = 'pv' },
{ type = 'row', label = 'Radiation', value = 'radiation' },
{ type = 'row', label = 'Soif', value = 'soif' }
}},
{ type = 'table', title = 'Effets des aptitudes', collapseparameters = { collapsible = true, collapsed = true }, rows = {
{ type = 'row', label = 'Mutation', value = 'mutation' },
buildPerkRow(localdata, 1),
buildPerkRow(localdata, 2),
buildPerkRow(localdata, 3),
buildPerkRow(localdata, 4),
buildPerkRow(localdata, 5)
}},
{ 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 = 'Technique', collapseparameters = { collapsible = true, collapsed = true }, rows = {
{ type = 'row', label = 'Prototype ID', value = 'proto' },
{ type = 'row', label = 'Editor ID', value = 'editor id' },
{ type = 'row', label = '[[Form ID]]', value = 'formid' },
{ type = 'row', label = 'Fichier message', value = 'message' }
}},
{ type = 'images', imageparameters = 'emplacement', captionparameter = 'emplacement desc', defaultcaption = 'Emplacement' },
{ type = 'text', value = 'pied' }
}
}