Module:Infobox/Objet

De Starfield Wiki
Documentation[voir] [modifier] [purger]
local localdata = require('Module:Infobox/Localdata')

local keyWords = {
	['note']             = { subject = 'Note', link = 'notes' }
}

function buildSubHead(localdata, keyWordType, default)
	local subhead = default
	if localdata['type'] and keyWords[localdata['type']:lower()] then
		local keyWord = keyWords[localdata['type']:lower()]
		if keyWord then
			subhead = keyWord[keyWordType]
		end
	end
	return subhead
end

return {
	parts = {
		{ type = 'title', value = 'nom', subtitle = 'sous-titre', icon = 'icône', subhead = { games = 'jeux', subject = buildSubHead(localdata, 'subject', 'Objet'), link = buildSubHead(localdata, 'link', 'Objets') }},
		{ type = 'images', imageparameters = { 'image', 'image2', 'image3', 'image4', 'image5' }, captionparameter = { 'légende', 'image desc' }},
		{ type = 'table', title = 'Propriétés', rows = {
			{ type = 'row', label = 'Utilisations', value = 'utilisations' },
			{ type = 'row', label = 'Poids', value = { 'poids', 'masse' }},
			{ type = 'row', label = 'Poids hardcore', value = 'poids hardcore' },
			{ type = 'row', label = 'Valeur', value = 'valeur' },
			{ type = 'row', label = 'Effets', value = 'effets' }
		}},
		{ type = 'table', title = 'Artisanat', rows = {
			{ type = 'row', label = 'Plan', value = 'plan' },
			{ type = 'row', label = 'Composant de', value = 'composant de' },
			{ type = 'row', label = 'Débloque', value = 'débloque' },
			{ type = 'row', label = 'Modifie', value = 'modifie' }
		}},
		{ type = 'table', title = 'Quêtes', rows = {
			{ type = 'row', label = 'Quêtes', value = 'quêtes' },
			{ type = 'row', label = 'Événements', value = 'événements' }
		}},
		{ type = 'table', title = 'Technique', collapseparameters = { collapsible = true, collapsed = true }, rows = {
			{ type = 'row', label = 'Proto ID', value = 'proto' },
			{ type = 'row', label = 'Editor ID', value = 'editorid' },
			{ type = 'row', label = '[[Form ID]]', value = 'formid' },
			{ type = 'row', label = 'Fichier dialogue', value = 'dialogue' },
			{ type = 'row', label = 'Fichier message', value = 'message' }
		}},
		{ type = 'row', label = 'Précédent', value = 'précédent' },
		{ type = 'row', label = 'Suivant', value = 'suivant' },
		{ type = 'row', label = 'Variante', value = 'variante' },
		{ type = 'images', imageparameters = 'emplacement', captionparameter = 'emplacement desc', defaultcaption = 'Emplacement' },
		{ type = 'text', value = 'pied' }
	}
}