« Module:Infobox/Créature » : différence entre les versions
tech |
ref id inutile |
||
| (6 versions intermédiaires par le même utilisateur non affichées) | |||
| Ligne 32 : | Ligne 32 : | ||
imageparameters = {"image", "image2", "image3", "image4", "image5"}, | imageparameters = {"image", "image2", "image3", "image4", "image5"}, | ||
captionparameter = {"légende", "image desc"}, | captionparameter = {"légende", "image desc"}, | ||
}, | }, | ||
{ | { | ||
| Ligne 49 : | Ligne 39 : | ||
{type = "row", label = "Localisation", value = "localisation"}, | {type = "row", label = "Localisation", value = "localisation"}, | ||
{type = "row", label = "Affiliation", value = "affiliation"}, | {type = "row", label = "Affiliation", value = "affiliation"}, | ||
{type = "row", label = "Variantes", value = "variantes"}, | |||
{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 = "Événements", value = "événements"}, | ||
| Ligne 58 : | Ligne 49 : | ||
rows = { | rows = { | ||
{type = "row", label = "Fichier dialogue", value = "dialogue"}, | {type = "row", label = "Fichier dialogue", value = "dialogue"}, | ||
{type = "row", label = " | {type = "row", label = "Doubleur anglais", value = "acteur vo"}, | ||
{type = "row", label = " | {type = "row", label = "Doubleur français", value = "acteur vf"}, | ||
{type = "row", label = " | {type = "row", label = "Editor ID", value = "editorid"}, | ||
{type = "row", label = " | {type = "row", label = "Form ID", value = "formid"}, | ||
{type = "row", label = " | {type = "row", label = "Prototype ID", value = "proto"}, | ||
} | } | ||
}, | }, | ||
Dernière version du 18 septembre 2025 à 21:13
Ce module contient le paramétrage de l'infobox {{Infobox créature}}.
local localdata = require("Module:Infobox/Localdata")
local SUBJECTS = {
["créature"] = {"Créature", "Créatures"},
["humain"] = {"Humain", "Créatures"},
["ordinateur"] = {"Ordinateur", "Robots et ordinateurs"},
["robot"] = {"Robot", "Robots et ordinateurs"},
["tourelle"] = {"Tourelle", "Robots et ordinateurs"},
}
-- Lien d'en-tête en fonction du sujet choisi
-- "créature" par défaut
local subject = SUBJECTS[(localdata["type"] or "créature"):lower()]
if subject == nil then
error(string.format(
"Valeur inconnue pour le paramètre type : « %s »",
localdata["type"]
))
end
return {
parts = {
{
type = "title",
value = "nom",
subtitle = "sous-titre",
icon = "icône",
subhead = {games = "jeux", subject = subject[1], link = subject[2]},
},
{
type = "images",
imageparameters = {"image", "image2", "image3", "image4", "image5"},
captionparameter = {"légende", "image desc"},
},
{
type = "table",
title = "Répartition et relations",
rows = {
{type = "row", label = "Localisation", value = "localisation"},
{type = "row", label = "Affiliation", value = "affiliation"},
{type = "row", label = "Variantes", value = "variantes"},
{type = "row", label = "Quêtes", value = "quêtes"},
{type = "row", label = "Événements", value = "événements"},
},
},
{
type = "table",
title = "Technique",
rows = {
{type = "row", label = "Fichier dialogue", value = "dialogue"},
{type = "row", label = "Doubleur anglais", value = "acteur vo"},
{type = "row", label = "Doubleur français", value = "acteur vf"},
{type = "row", label = "Editor ID", value = "editorid"},
{type = "row", label = "Form ID", value = "formid"},
{type = "row", label = "Prototype ID", value = "proto"},
}
},
{type = "text", value = "pied"},
}
}