Binding of Isaac: Rebirth Wiki
Advertisement

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

local p = {}
local Tableau
local fiche = require( "Module:Fiche" )
local dlc = require( "Module:Dlc" )
local icone = require( "Module:Icone" )
local police = require( "Module:Police" )
local succes = require( "Module:Succes" )


function p.main( f )
	return fiche.mode( f, "case / nom / tableau / tableauSimple" )
end


function p.args( f )
	return {
		animation = f:getParent().args['animation'],
		citation = f:getParent().args['citation'],
		deblocage = f:getParent().args['déblocage'],
		description = f:getParent().args['description'],
		disp = f:getParent().args['disp'],
		dlc = f:getParent().args['dlc'],
		id = f:getParent().args['id'],
		imageCase = f:getParent().args['image-case'],
		imageNom = f:getParent().args['image-nom'],
		imageTableau = f:getParent().args['image-tableau'],
		nom = f:getParent().args['nom'],
		remplaceImage = f:getParent().args['remplaceimage'],
		remplaceNom = f:getParent().args['remplacenom'],
		temp = f:getParent().args['temp'],
		visible = f:getParent().args['visible']
	}
end


function p.case( args, page )
	Tableau = fiche.image( args.nom, args.remplaceNom, args.imageCase, '40x40px', true, '', '_Icon' )
	
	return Tableau
end


function p.nom( args, page )
	if args and page.valeur.dlc then
		Tableau = dlc.icone( args.dlc )
	end
	
	Tableau = Tableau .. fiche.image( args.nom, args.remplaceNom, args.imageNom, '20x20px', true, '', '_Icon' )
	
	Tableau = Tableau .. fiche.nom( args.nom, args.remplaceNom, 2 )
	
	return Tableau
end


function p.tableau( args, page )
	Tableau = '<tr><td>' .. fiche.nom( args.nom, args.remplaceNom, 2 )
	
	if args.dlc and page.valeur.dlc then
		Tableau = Tableau .. dlc.icone( args.dlc )
	end
	
	Tableau = Tableau .. '</td><td style="text-align:center>' .. args.id .. '</td>'
	
	Tableau = Tableau .. '<td style="text-align:center">' .. fiche.image( args.nom, args.remplaceNom, args.remplaceImage, '45x45px', true, '', '_Icon' ) .. '</td>'
	
	Tableau = Tableau .. '<td>' .. fiche.citation( args.citation, true ) .. '</td>'
	
	Tableau = Tableau .. '<td>' .. args.description .. '</td></tr>'
	
	return Tableau
end


function p.tableauSimple( args, page )
	Tableau = '<tr><td>' .. fiche.nom( args.nom, args.remplaceNom, 2 )
	
	if args.dlc and page.valeur.dlc then
		Tableau = Tableau .. dlc.icone( args.dlc )
	end
	
	Tableau = Tableau .. '</td><td style="text-align:center">' .. fiche.image( args.nom, args.remplaceNom, args.remplaceImage, '45x45px', true, '', '_Icon' ) .. '</td>'
	
	Tableau = Tableau .. '<td>' .. args.description .. '</td></tr>'
	
	return Tableau
end


function p.fiche( args, page )
	local affichage = mw.text.split( args.disp, ', ' )
	local _c = ''
	
	Tableau = '<table class="ficheCadre" ><tr><td><table class="ficheCadreLargeDebut"><th style="height:80px">' .. fiche.nom( args.nom, args.remplaceNom, 0 )
	
	Tableau = Tableau .. '</th><tr><td style="height:120px">' .. fiche.image( args.nom, args.remplaceNom, args.remplaceImage, '70x70px', false, '', '_Icon' ) .. '</td></tr><tr><td>\n\n[[Image:TableDividingLine1.png|lien=]]</td></tr>'
	
	if args.citation then
		Tableau = Tableau .. '<tr><th>' .. police.gras( 'TeamMeat', 'Citation' ) .. '</th></tr><tr><td>' .. fiche.citation( args.citation, true ) .. '</td></tr>'
	else
		_c = _c .. '<tr><td style="height:120px">[[Catégorie:Objets sans Citation]]</td></tr>'
	end
	
	Tableau = Tableau .. '</table><table class="ficheCadreLargeCentre">'
	
	if args.animation then
		Tableau = Tableau .. '<tr><td>' .. fiche.image( args.nom, args.remplaceNom, args.animation, '70x70px', false, '', '_Icon', '.gif' ) .. '</td></tr>'
	end
	
	if args.personnage then
		Tableau = Tableau .. '<tr><th>' .. police.gras( 'TeamMeat', 'Apparence du personnage' ) .. '</th></tr><tr><td>' .. fiche.image( args.nom, args.remplaceNom, args.personnage, '100px', false, '', '_App' ) .. '</td></tr>'
	end
	
	if args.larmes then
		Tableau = Tableau .. '<tr><th>' .. police.gras( 'TeamMeat', 'Apparence des larmes' ) .. '</th></tr><tr><td>' .. fiche.image( args.nom, args.remplaceNom, args.larmes, '100px', false, '', '_Tears' ) .. '</td></tr>'
	end
	
	Tableau = Tableau .. '<tr><td>[[Image:TableDividingLine2.png|lien=]]</td></tr>'
	
	if args.id then
		Tableau = Tableau .. '<tr><th>' .. police.gras( 'TeamMeat', 'ID de l\'objet' ) .. '</th></tr><tr><td>' .. args.id .. '</td></tr>'
	else
		_c = _c .. '[[Catégorie:Objets sans ID]]'
	end
	
	if args.liste then
		Tableau = Tableau .. '<tr><th>' .. police.gras( 'TeamMeat', 'Liste de gEnEration', 'E-eacute' ) .. '</th></tr><tr><td>' .. icone.liste( mw.text.split( args.liste, ',%s' ), 'm' ) .. '</td></tr>'
	end
	
	if args.deblocage then
		Tableau = Tableau .. '<tr><th>' .. police.gras( 'TeamMeat', 'MEthode de dEblocage', 'E-eacute' ) .. '</th></tr><tr><td>' .. succes.deblocage( args.deblocage, false ) .. '</td></tr>'
	end
	
	Tableau = Tableau .. '</table><table class="ficheCadreLargeFin"><tr><td style="height: 110px"></td></tr></table></td></tr></table>'
	
	if args.dlc then
		Tableau = Tableau .. '<table class="ficheDlc"><tr><td style="text-align:center">' .. dlc.icone( args.dlc ) .. '</td></tr></table>'
	end
	
	if args.visible ~= 0 then
		return Tableau .. _c
	else
		return _c
	end
end

return p
Advertisement