Basculer le menu
Changer de menu des préférences
Basculer le menu personnel
Non connecté(e)
Votre adresse IP sera visible au public si vous faites des modifications.

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

De Nefald
Hiob (discussion | contributions)
Aucun résumé des modifications
Balises : Modification par mobile Modification par le web mobile
Hiob (discussion | contributions)
Aucun résumé des modifications
Ligne 1 : Ligne 1 :
local configs = {
local configs = {
    construction = {
        sections = {
            {
                title = "Définition",
                fields = {"auteur", "fonction"}
            },
            {
                title = "Géographie",
                fields = {"monde", "ville", "guilde", "coordonnees"}
            }
        },
        fields = {
            {key = "auteur", label = "Auteur"},
            {key = "fonction", label = "Fonction"},
            {key = "monde", label = "Monde", link = true},
            {key = "ville", label = "Ville", link = true},
            {key = "guilde", label = "Guilde", link = true},
            {key = "coordonnees", label = "Coordonnées"}
        }
    },
   
     monde = {
     monde = {
        titre = function(args) return args.nom or 'Monde sans nom' end,
        image = function(args)
            if args.image then
                return '[[Fichier:' .. args.image .. '|300px]]'
            end
            return nil
        end,
         sections = {
         sections = {
             {
             {
                 title = "Informations techniques",
                 champs = {
                fields = {"seed", "type", "status", "difficulte"}
                    { cle = 'seed', label = 'Seed' },
            },
                    { cle = 'monde', label = 'Type de monde' },
            {
                    { cle = 'x', label = 'Coordonnée X' },
                title = "Géographie",
                    { cle = 'y', label = 'Coordonnée Y' },
                fields = {"coordonnees"}
                    { cle = 'z', label = 'Coordonnée Z' }
            }
                 }
        },
        fields = {
            {key = "seed", label = "Seed"},
            {key = "type", label = "Type"},
            {key = "status", label = "Status"},
            {key = "difficulte", label = "Difficulté"},
            {key = "coordonnees", label = "Coordonnées"}
        }
    },
   
    ville = {
        sections = {
            {
                 title = "Informations générales",
                fields = {"fondation", "bourgmestre", "guilde", "spec", "projet"}
             },
             },
             {
             {
                 title = "Économie",
                 titre = 'Informations',
                fields = {"production", "commerce"}
                 champs = {
            },
                    { cle = 'status', label = 'Statut' },
            {
                    { cle = 'difficulte', label = 'Difficulté' }
                title = "Géographie",
                 }
                fields = {"monde", "region", "coordonnees", "biome"}
            }
        },
        fields = {
            {key = "fondation", label = "Fondation"},
            {key = "bourgmestre", label = "Bourgmestre"},
            {key = "guilde", label = "Guilde(s)"},
            {key = "spec", label = "Spécificité(s)"},
            {key = "projet", label = "Projet"},
            {key = "production", label = "Production"},
            {key = "commerce", label = "Liens commerciaux"},
            {key = "monde", label = "Monde", link = true},
            {key = "region", label = "Région(s)"},
            {key = "coordonnees", label = "Coordonnées"},
            {key = "biome", label = "Biome(s)"}
        }
    },
   
    personnage = {
        sections = {
            {
                title = "Informations générales",
                 fields = {"surnom", "race", "classe", "niveau"}
            },
            {
                title = "Affiliation",
                fields = {"guilde", "origine"}
            }
        },
        fields = {
            {key = "surnom", label = "Surnom"},
            {key = "race", label = "Race"},
            {key = "classe", label = "Classe"},
            {key = "niveau", label = "Niveau"},
            {key = "guilde", label = "Guilde", link = true},
            {key = "origine", label = "Origine"}
        }
    },
   
    roleplay = {
        sections = {
            {
                 title = "Informations",
                fields = {"maitre_jeu", "participants", "duree", "statut"}
            }
        },
        fields = {
            {key = "maitre_jeu", label = "Maître du jeu"},
            {key = "participants", label = "Participants"},
            {key = "duree", label = "Durée"},
            {key = "statut", label = "Statut"}
        }
    },
   
    plugin = {
        sections = {
            {
                title = "Informations techniques",
                fields = {"version", "auteur", "compatibilite", "dependances"}
             }
             }
        },
        fields = {
            {key = "version", label = "Version"},
            {key = "auteur", label = "Auteur"},
            {key = "compatibilite", label = "Compatibilité"},
            {key = "dependances", label = "Dépendances"}
         }
         }
     }
     }

Version du 23 septembre 2025 à 19:39

La documentation pour ce module peut être créée à Module:Infobox/Configs/doc

local configs = {
    monde = {
        titre = function(args) return args.nom or 'Monde sans nom' end,
        image = function(args) 
            if args.image then
                return '[[Fichier:' .. args.image .. '|300px]]'
            end
            return nil
        end,
        sections = {
            {
                champs = {
                    { cle = 'seed', label = 'Seed' },
                    { cle = 'monde', label = 'Type de monde' },
                    { cle = 'x', label = 'Coordonnée X' },
                    { cle = 'y', label = 'Coordonnée Y' },
                    { cle = 'z', label = 'Coordonnée Z' }
                }
            },
            {
                titre = 'Informations',
                champs = {
                    { cle = 'status', label = 'Statut' },
                    { cle = 'difficulte', label = 'Difficulté' }
                }
            }
        }
    }
}

return configs