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

De Starfield Wiki
Page créée avec « localdata = require( "Module:Infobox/Localdata" ) -- sujet function buildSubject(localdata) local subject = 'Robot' if localdata['type'] then local types = { ['robot'] = 'Robot', ['compagnon'] = 'Compagnon', } subject = types[localdata['type']:lower()] or subject end return subject end return { parts = { { type = 'title', value = 'nom', subtitle = 'sous-titre', subhead = { games = 'jeu', subject = buildSubject(localdata), link = '... »
(Aucune différence)

Version du 22 juillet 2022 à 08:57

Documentation[voir] [modifier] [purger]
localdata = require( "Module:Infobox/Localdata" )

-- sujet
function buildSubject(localdata)
	local subject = 'Robot'
	if localdata['type'] then
		local types = {
			['robot']         = 'Robot',
			['compagnon']     = 'Compagnon',
		}
		subject = types[localdata['type']:lower()] or subject
	end
	return subject
end

return {
	parts = {
		{ type = 'title', value = 'nom', subtitle = 'sous-titre', subhead = { games = 'jeu', subject = buildSubject(localdata), link = 'Robot' }},
		{ type = "images", imageparameters = { "image", "image2", "image3", "image4", "image5" }, captionparameter = { "légende", "image desc" }},
		{ type = "table", separator = true, rows = {
			{ type = "row", label = "Concepteur", value = "concepteur" },
			{ type = "row", label = "Faction", value = "faction" },
		}},
		{ type = "text", value = "pied" }
	}
}