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

De Starfield Wiki
Aucun résumé des modifications
Linarphy (discussion | contributions)
Proposition d'ajout d'un champ "Nom de cellule"
 
(16 versions intermédiaires par 4 utilisateurs non affichées)
Ligne 1 : Ligne 1 :
localdata = require( "Module:Infobox/Localdata" )
local general = require("Module:Infobox/Fonctions")
 
-- sujet
function buildSubject(localdata)
local subject = 'Lieu'
if localdata['type'] then
local types = {
['ville']        = 'Ville',
}
subject = types[localdata['type']:lower()] or subject
end
return subject
end
 
function buildIcon(localdata)
local icon = 'Icon landmark.png'
if localdata['icône'] then
icon = localdata['icône']
elseif localdata['type'] then
local types = {
['ville']        = 'Icon ville.png',
}
icon = types[localdata['type']:lower()] or icon
end
return icon
end


return {
return {
parts = {
    parts = {
{ type = 'title', value = 'nom', subtitle = 'sous-titre', icon = function(localdata) return buildIcon(localdata) end, subhead = { games = 'jeu', subject = buildSubject(localdata), link = 'Lieu' }},
        general.title(),
{ type = "images", imageparameters = { "image", "image2", "image3", "image4", "image5" }, captionparameter = { "légende", "image desc" }},
        general.image(),
{ type = "table", separator = true, rows = {
        {
{ type = "row", label = "Faction", value = "faction" },
            type = "table",
}},
            title = "Informations générales",  
{ type = "text", value = "pied" }
            rows = {
}
            {type = "row", label = "Type", value = "type"},
                {type = "row", label = "Système", value = "système"},
                {type = "row", label = "Faction", value = "faction"},
                {type = "row", label = "Planète", value = "planète"},
            }
        },
        {
            type = "table",  
            title = "Technique",
            collapseparameters = {collapsible = true, collapsed = true},  
            rows = {
            {type = "row", label = "Nom de cellule", value = "Nom de cellule"},
            {type = "row", label = "Proto ID", value = "proto"},
            {type = "row", label = "[[Editor ID]]", value = "editorid"},
            {type = "row", label = "[[Form ID]]", value = "formid"},
            },
        },
    }
}
}

Dernière version du 23 juin 2024 à 00:32

Documentation[voir] [modifier] [purger]
local general = require("Module:Infobox/Fonctions")

return {
    parts = {
        general.title(),
        general.image(),
        {
            type = "table",
            title = "Informations générales", 
            rows = {
             	{type = "row", label = "Type", value = "type"},
                {type = "row", label = "Système", value = "système"},
                {type = "row", label = "Faction", value = "faction"},
                {type = "row", label = "Planète", value = "planète"},
            }
        },
        {
            type = "table", 
            title = "Technique", 
            collapseparameters = {collapsible = true, collapsed = true}, 
            rows = {
            	{type = "row", label = "Nom de cellule", value = "Nom de cellule"},
             	{type = "row", label = "Proto ID", value = "proto"},
             	{type = "row", label = "[[Editor ID]]", value = "editorid"},
             	{type = "row", label = "[[Form ID]]", value = "formid"},
            },
        },
    }
}