« Module:Infobox/Entreprise de jeux vidéo » : différence entre les versions

De Starfield Wiki
Page créée avec « local localdata = require( 'Module:Infobox/Localdata' ) local tools = require( 'Module:Outils' ) -------------------------------------------------------- ----- Calcul des champs à afficher ----- -------------------------------------------------------- -- Développeur et Éditeur local developer = localdata['développeur'] local editor = localdata['éditeur'] if developer or editor then local abb = require( 'Module:Abréviation' ) if develo... »
 
Aucun résumé des modifications
Ligne 1 : Ligne 1 :
local localdata = require( 'Module:Infobox/Localdata' )
local general = require("Module:Infobox/Fonctions")
local localdata = require("Module:Infobox/Localdata")
local tools = require("Module:Outils")


local tools = require( 'Module:Outils' )
-- Formate la valeur du paramtère MobyGames
 
format_mobygames = function(localdata)
--------------------------------------------------------
local mobygames = localdata["mobygames"]
-----        Calcul des champs à afficher        -----
if mobygames then
--------------------------------------------------------
mobygames = "[" .. mobygames .. " " .. tools.simpletitle(mw.getCurrentFrame()) .. "]"
 
-- Développeur et Éditeur
local developer = localdata['développeur']
local editor = localdata['éditeur']
if developer or editor then
local abb = require( 'Module:Abréviation' )
if developer then
developer = abb.links({ developer, ['séparateur'] = '<br/>' })
end
if editor then
editor = abb.links({ editor, ['séparateur'] = '<br/>' })
end
end
end
end
-- MobyGames
local mobygames = localdata['mobygames']
if mobygames then
mobygames = '[' .. mobygames .. ' ' .. tools.simpletitle(mw.getCurrentFrame()) .. ']'
end
--------------------------------------------------------
-----          Construction de l'infobox          -----
--------------------------------------------------------


return {
return {
parts = {
parts = {
{ type = 'title', value = 'nom', subtitle = 'sous-titre', icon = 'icône', subhead = { subject = 'Entreprise de jeux vidéo' }},
general.title(),
{ type = 'images', imageparameters = { 'image', 'image2', 'image3', 'image4', 'image5' }, captionparameter = { 'légende', 'image desc' }},
        general.image(),
{ type = 'table', title = 'Informations', rows = {
{
{ type = 'row', label = 'Fondateur', value = 'fondateur' },
type = "table",
{ type = 'row', label = 'Direction', value = 'direction' },
title = "Informations",
{ type = 'row', label = 'Date de fondation', value = 'date fondation' },
rows = {
{ type = 'row', label = 'Date de fermeture', value = 'date fermeture' },
{ type = "row", label = "Fondateur", value = "fondateur" },
{ type = 'row', label = 'Siège social', value = 'siège social' },
{ type = "row", label = "Direction", value = "direction" },
{ type = 'row', label = 'Personnalités', value = 'personnalités' }
{ type = "row", label = "Date de fondation", value = "date fondation" },
}},
{ type = "row", label = "Date de fermeture", value = "date fermeture" },
{ type = 'table', title = 'Entreprises connexes', rows = {
{ type = "row", label = "Siège social", value = "siège social" },
{ type = 'row', label = 'Société mère', value = 'société mère' },
{ type = "row", label = "Personnalités", value = "personnalités" }
{ type = 'row', label = 'Filiales', value = 'filiales' }
},
}},
},
{ type = 'table', title = "''Starfield''", rows = {
{
{ type = 'row', label = 'Développeur', value = function() return developer end },
type = "table",
{ type = 'row', label = 'Éditeur', value = function() return editor end }
title = "Entreprises connexes",
}},
rows = {
{ type = 'table', title = 'Autres jeux', rows = {
{ type = "row", label = "Société mère", value = "société mère" },
{ type = 'row', label = 'Développeur', value = 'autre développeur' },
{ type = "row", label = "Filiales", value = "filiales" }
{ type = 'row', label = 'Éditeur', value = 'autre éditeur' }
},
}},
},
{ type = 'table', title = 'Liens externes', rows = {
{
{ type = 'row', label = 'Site officiel', value = 'site officiel' },
type = "table",
{ type = 'row', label = 'Wikipédia', value = 'wikipédia' },
title = "''Starfield''",
{ type = 'row', label = 'MobyGames', value = function() return mobygames end },
rows = {
{ type = 'row', label = 'Facebook', value = 'facebook' },
{ type = "row", label = "Développeur", value = "développeur" },
{ type = 'row', label = 'Instagram', value = 'instagram' },
{ type = "row", label = "Éditeur", value = "éditeur" }
{ type = 'row', label = 'Twitter', value = 'twitter' },
},
{ type = 'row', label = 'Youtube', value = 'youtube' },
},
{ type = 'row', label = 'Twitch', value = 'twitch' },
{
{ type = 'row', label = 'TikTok', value = 'tiktok' },
type = "table",
{ type = 'row', label = 'Serveur Discord', value = 'discord' },
title = "Autres jeux",
{ type = 'row', label = 'Communauté Reddit', value = 'reddit' },
rows = {
{ type = 'row', label = 'Steam', value = 'steam' },
{ type = "row", label = "Développeur", value = "autre développeur" },
{ type = 'row', label = 'ArtStation', value = 'artstation' },
{ type = "row", label = "Éditeur", value = "autre éditeur" }
{ type = 'row', label = 'LinkedIn', value = 'linkedin' },
},
{ type = 'row', label = 'Autres liens', value = 'autres liens' }
},
}},
{
{ type = 'text', value = 'pied' }
type = "table",
}
title = "Liens externes",
rows = {
{ type = "row", label = "Site officiel", value = "site officiel" },
{ type = "row", label = "Wikipédia", value = "wikipédia" },
{ type = "row", label = "MobyGames", value = format_mobygames },
{ type = "row", label = "Facebook", value = "facebook" },
{ type = "row", label = "Instagram", value = "instagram" },
{ type = "row", label = "Twitter", value = "twitter" },
{ type = "row", label = "Youtube", value = "youtube" },
{ type = "row", label = "Twitch", value = "twitch" },
{ type = "row", label = "TikTok", value = "tiktok" },
{ type = "row", label = "Serveur Discord", value = "discord" },
{ type = "row", label = "Communauté Reddit", value = "reddit" },
{ type = "row", label = "Steam", value = "steam" },
{ type = "row", label = "ArtStation", value = "artstation" },
{ type = "row", label = "LinkedIn", value = "linkedin" },
{ type = "row", label = "Autres liens", value = "autres liens" }
},
},
},
}
}

Version du 25 juin 2023 à 15:11

Documentation[voir] [modifier] [purger]

Ce module contient le paramétrage de l'infobox {{Infobox entreprise de jeux vidéo}}.

local general = require("Module:Infobox/Fonctions")
local localdata = require("Module:Infobox/Localdata")
local tools = require("Module:Outils")

-- Formate la valeur du paramtère MobyGames
format_mobygames = function(localdata)
	local mobygames = localdata["mobygames"]
	if mobygames then
		mobygames = "[" .. mobygames .. " " .. tools.simpletitle(mw.getCurrentFrame()) .. "]"
	end
end

return {
	parts = {
		general.title(),
        general.image(),
		{
			type = "table",
			title = "Informations",
			rows = {
				{ type = "row", label = "Fondateur", value = "fondateur" },
				{ type = "row", label = "Direction", value = "direction" },
				{ type = "row", label = "Date de fondation", value = "date fondation" },
				{ type = "row", label = "Date de fermeture", value = "date fermeture" },
				{ type = "row", label = "Siège social", value = "siège social" },
				{ type = "row", label = "Personnalités", value = "personnalités" }
			},
		},
		{
			type = "table",
			title = "Entreprises connexes",
			rows = {
				{ type = "row", label = "Société mère", value = "société mère" },
				{ type = "row", label = "Filiales", value = "filiales" }
			},
		},
		{
			type = "table",
			title = "''Starfield''",
			rows = {
				{ type = "row", label = "Développeur", value = "développeur"  },
				{ type = "row", label = "Éditeur", value = "éditeur" }
			},
		},
		{
			type = "table",
			title = "Autres jeux",
			rows = {
				{ type = "row", label = "Développeur", value = "autre développeur" },
				{ type = "row", label = "Éditeur", value = "autre éditeur" }
			},
		},
		{
			type = "table",
			title = "Liens externes",
			rows = {
				{ type = "row", label = "Site officiel", value = "site officiel" },
				{ type = "row", label = "Wikipédia", value = "wikipédia" },
				{ type = "row", label = "MobyGames", value = format_mobygames },
				{ type = "row", label = "Facebook", value = "facebook" },
				{ type = "row", label = "Instagram", value = "instagram" },
				{ type = "row", label = "Twitter", value = "twitter" },
				{ type = "row", label = "Youtube", value = "youtube" },
				{ type = "row", label = "Twitch", value = "twitch" },
				{ type = "row", label = "TikTok", value = "tiktok" },
				{ type = "row", label = "Serveur Discord", value = "discord" },
				{ type = "row", label = "Communauté Reddit", value = "reddit" },
				{ type = "row", label = "Steam", value = "steam" },
				{ type = "row", label = "ArtStation", value = "artstation" },
				{ type = "row", label = "LinkedIn", value = "linkedin" },
				{ type = "row", label = "Autres liens", value = "autres liens" }
			},
		},
	},
}