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

15 octets enlevés ,  21 janvier 2023
Harmonisation des identifiants techniques
Kharmitch (discussion | contributions)
Page créée avec « local localdata = require('Module:Infobox/Localdata') function buildSuccess(localdata) local success = nil local icon = require('Module:Icône') if localdata['achèv… »
 
Kharmitch (discussion | contributions)
Harmonisation des identifiants techniques
 
(5 versions intermédiaires par le même utilisateur non affichées)
Ligne 5 : Ligne 5 :
local icon = require('Module:Icône')
local icon = require('Module:Icône')
if localdata['achèvement'] then
if localdata['succès'] then
success = localdata['achèvement']
success = localdata['succès']
end
end


if localdata['gamerscore'] or localdata['type trophée'] then
local gamerscore = localdata['gamerscore']
local trophy = localdata['type de trophée']
if gamerscore or trophy then
if success == nil then
if success == nil then
success = mw.title.getCurrentTitle().text
success = mw.title.getCurrentTitle().text
Ligne 16 : Ligne 19 :
success = success ..'<div style="float:right;padding-left:15px;position:relative;white-space:nowrap;">'
success = success ..'<div style="float:right;padding-left:15px;position:relative;white-space:nowrap;">'
if localdata['gamerscore'] then
if gamerscore then
success = success ..'<span style="padding-left:4px;">'.. icon.build({ 'gamerscore' }) ..'</span>'
success = success ..'<span style="padding-left:4px;">'.. icon._build({ 'gamerscore' }) ..'</span>'
success = success ..'<span style="padding-left: 2px;position:relative;top:1px;">'.. localdata['gamerscore'] ..'</span>'
success = success ..'<span style="padding-left: 2px;position:relative;top:1px;">'.. gamerscore ..'</span>'
end
end
if localdata['type trophée'] then
if trophy then
success = success ..'<span style="padding-left:4px;">'.. icon.build({ 'trophéeps3' }) ..'</span>'
success = success ..'<span style="padding-left:4px;">'.. icon._build({ 'trophéeps3' }) ..'</span>'
success = success ..'<span style="padding-left: 2px;position:relative;top:1px;">'.. localdata['type trophée'] ..'</span>'
success = success ..'<span style="padding-left: 2px;position:relative;top:1px;">'.. trophy ..'</span>'
end
end
Ligne 39 : Ligne 42 :
{ type = 'row', label = 'Tâche', value = 'tâche' },
{ type = 'row', label = 'Tâche', value = 'tâche' },
{ type = 'row', label = 'Requiert', value = 'requiert' },
{ type = 'row', label = 'Requiert', value = 'requiert' },
{ type = 'row', label = 'Récompense', value = 'Récompense' },
{ type = 'row', label = 'Récompense', value = 'récompense' },
{ type = 'row', label = 'Succès', value = function (localdata) return buildSuccess(localdata) end },
{ type = 'row', label = 'Succès', value = function (localdata) return buildSuccess(localdata) end },
{ type = 'row', label = 'Répétition', value = 'répétition' },
{ type = 'row', label = 'Répétable', value = 'répétable' },
{ type = 'row', label = '[[Form ID|Base ID]]', value = 'baseid' }
{ type = 'row', label = '[[Form ID|Base ID]]', value = 'formid' }
}},
}},
{ type = 'text', value = 'pied' }
{ type = 'text', value = 'pied' }
}
}
}
}
Bureaucrate, commentadmin, emailconfirmed, Administrateurs d’interface, staff, Administrateur
62 737

modifications