Aller au contenu

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

m
aucun résumé des modifications
Kharmitch (discussion | contributions)
Page créée avec « local localdata = require( 'Module:Infobox/Localdata' ) local icon = require( 'Module:Icône' ) -------------------------------------------------------- -----… »
 
Kharmitch (discussion | contributions)
mAucun résumé des modifications
Ligne 20 : Ligne 20 :
-- formattedData = string.format(round, data)
-- formattedData = string.format(round, data)
-- end
-- end
return string.format(round, data)
return string.format(round or "%.1f", data)
end
end


Ligne 175 : Ligne 175 :
--------------------------------------------------------
--------------------------------------------------------


attacksPerSec = formatData(attacksPerSec, "%.1f")
local damagePerAttackCell = formatData(damNormTotal)
perksAttacksPerSec = formatData(perksAttacksPerSec, "%.1f")
if perksDamNormTotal > 0 then damagePerAttackCell = damagePerAttackCell .. ' (' .. formatData(perksDamNormTotal) .. ')' end
perksAttacksPerSecTotal = formatData(perksAttacksPerSecTotal, "%.1f")
if damExplTotal == '0' then
critChance = formatData(critChance, "%.2f")
damagePerAttackCell = damagePerAttackCell .. ' + ' .. formatData(damExplTotal)
critChanceModified = formatData(critChanceModified, "%.2f")
if perksDamExplTotal > 0 then damagePerAttackCell = damagePerAttackCell .. ' (' .. formatData(perksDamExplTotal) .. ')' end
reloadTime = formatData(reloadTime, "%.1f")
perksReloadTime = formatData(perksReloadTime, "%.1f")
perksReloadTimeTotal = formatData(perksReloadTimeTotal, "%.1f")
damNormProj = formatData(damNormProj, "%.1f")
perksDamNorm = formatData(perksDamNorm, "%.1f")
perksDamNormProj = formatData(perksDamNormProj, "%.1f")
perksDamNormTotal = formatData(perksDamNormTotal, "%.1f")
perksDamNormProjTotal = formatData(perksDamNormProjTotal, "%.1f")
perksDamEffProj = formatData(perksDamEffProj, "%.1f")
perksDamEffTotal = formatData(perksDamEffTotal, "%.1f")
perksDamEffProjTotal = formatData(perksDamEffProjTotal, "%.1f")
perksDamExpl = formatData(perksDamExpl, "%.1f")
perksDamExplProj = formatData(perksDamExplProj, "%.1f")
perksDamExplTotal = formatData(perksDamExplTotal, "%.1f")
perksDamExplProjTotal = formatData(perksDamExplProjTotal, "%.1f")
DPS = formatData(DPS, "%.1f")
DPSPerks = formatData(DPSPerks, "%.1f")
DPSReload = formatData(DPSReload, "%.1f")
DPSReloadPerks = formatData(DPSReloadPerks, "%.1f")
 
local damagePerAttackCell = damNormTotal
if perksDamNormTotal > 0 then damagePerAttackCell = damagePerAttackCell .. ' (' .. perksDamNormTotal .. ')' end
if damExplTotal > 0 then
damagePerAttackCell = damagePerAttackCell .. ' + ' .. damExplTotal
if perksDamExplTotal > 0 then damagePerAttackCell = damagePerAttackCell .. ' (' .. perksDamExplTotal .. ')' end
damagePerAttackCell = damagePerAttackCell .. ' ' .. icon.build({ 'explosion' })
damagePerAttackCell = damagePerAttackCell .. ' ' .. icon.build({ 'explosion' })
end
end
Ligne 210 : Ligne 185 :
if damEffTotal > 0 then
if damEffTotal > 0 then
local effectDuration = localdata["effect duration"] or "1"
local effectDuration = localdata["effect duration"] or "1"
damagePerAttackCell = damagePerAttackCell .. ' + ' .. damEffTotal
damagePerAttackCell = damagePerAttackCell .. ' + ' .. formatData(damEffTotal)
if perksDamEffTotal > 0 then damagePerAttackCell = damagePerAttackCell .. ' (' .. perksDamEffTotal .. ')' end
if perksDamEffTotal > 0 then damagePerAttackCell = damagePerAttackCell .. ' (' .. formatData(perksDamEffTotal) .. ')' end
damagePerAttackCell = damagePerAttackCell .. ' sur ' .. effectDuration .. ' s ' .. icon.build({ 'effet' })
damagePerAttackCell = damagePerAttackCell .. ' sur ' .. effectDuration .. ' s ' .. icon.build({ 'effet' })
end
end


local damagePerProjCell = damNormProj
local damagePerProjCell = formatData(damNormProj)
if perksDamNormProj > 0 then damagePerProjCell = damagePerProjCell .. ' (' .. perksDamNormProj .. ')' end
if perksDamNormProj > 0 then damagePerProjCell = damagePerProjCell .. ' (' .. formatData(perksDamNormProj) .. ')' end
if damExplProj > 0 then
if damExplProj > 0 then
damagePerProjCell = damagePerProjCell .. ' + ' .. damExplProj
damagePerProjCell = damagePerProjCell .. ' + ' .. formatData(damExplProj)
if perksDamExplProjTotal > 0 then damagePerProjCell = damagePerProjCell .. ' (' .. perksDamExplProjTotal .. ')' end
if perksDamExplProjTotal > 0 then damagePerProjCell = damagePerProjCell .. ' (' .. formatData(perksDamExplProjTotal) .. ')' end
damagePerProjCell = damagePerProjCell .. ' ' .. icon.build({ 'explosion' })
damagePerProjCell = damagePerProjCell .. ' ' .. icon.build({ 'explosion' })
end
end
Ligne 225 : Ligne 200 :
if damEffProj > 0 then
if damEffProj > 0 then
local effectDuration = localdata["effect duration"] or "1"
local effectDuration = localdata["effect duration"] or "1"
damagePerProjCell = damagePerProjCell .. ' + ' .. damEffProj
damagePerProjCell = damagePerProjCell .. ' + ' .. formatData(damEffProj)
if perksDamEffProjTotal > 0 then damagePerProjCell = damagePerProjCell .. ' (' .. perksDamEffProjTotal .. ')' end
if perksDamEffProjTotal > 0 then damagePerProjCell = damagePerProjCell .. ' (' .. formatData(perksDamEffProjTotal) .. ')' end
damagePerProjCell = damagePerProjCell .. ' sur ' .. effectDuration .. ' s ' .. icon.build({ 'effet' })
damagePerProjCell = damagePerProjCell .. ' sur ' .. effectDuration .. ' s ' .. icon.build({ 'effet' })
end
end


local dpsCell = DPS
local dpsCell = formatData(DPS)
if DPSPerks > 0 then dpsCell = dpsCell .. ' ('.. DPSPerks .. ')' end
if DPSPerks > 0 then dpsCell = dpsCell .. ' ('.. formatData(DPSPerks) .. ')' end
if damEffTotal > 0 then
if damEffTotal > 0 then
dpsCell = dpsCell .. ' + ' .. damEffTotal
dpsCell = dpsCell .. ' + ' .. formatData(damEffTotal)
if perksDamEffTotal > 0 then dpsCell = dpsCell .. ' (' .. perksDamEffTotal .. ')' end
if perksDamEffTotal > 0 then dpsCell = dpsCell .. ' (' .. perksDamEffTotal .. ')' end
dpsCell = dpsCell .. ' ' .. icon.build({ 'effet' })
dpsCell = dpsCell .. ' ' .. icon.build({ 'effet' })
end
end


local dpsReloadCell = DPSReload
local dpsReloadCell = formatData(DPSReload)
if DPSReloadPerks > 0 then dpsReloadCell = dpsReloadCell .. ' ('.. DPSReloadPerks .. ')' end
if DPSReloadPerks > 0 then dpsReloadCell = dpsReloadCell .. ' ('.. formatData(DPSReloadPerks) .. ')' end
if damEffTotal > 0 then
if damEffTotal > 0 then
dpsReloadCell = dpsReloadCell .. ' + ' .. damEffTotal
dpsReloadCell = dpsReloadCell .. ' + ' .. formatData(damEffTotal)
if perksDamEffTotal > 0 then dpsReloadCell = dpsReloadCell .. ' (' .. perksDamEffTotal .. ')' end
if perksDamEffTotal > 0 then dpsReloadCell = dpsReloadCell .. ' (' .. formatData(perksDamEffTotal) .. ')' end
dpsReloadCell = dpsReloadCell .. ' ' .. icon.build({ 'effet' })
dpsReloadCell = dpsReloadCell .. ' ' .. icon.build({ 'effet' })
end
end
Ligne 248 : Ligne 223 :
local critMultCell = critChance
local critMultCell = critChance
if critChanceModified > 0 then critMultCell = critChanceModified end
if critChanceModified > 0 then critMultCell = critChanceModified end
critMultCell = 'x ' .. critMultCell
critMultCell = 'x ' .. formatData(critMultCell, "%.2f")


local attackPerSecondCell = attacksPerSecError
local attackPerSecondCell = formatData(attacksPerSecError)
if perksAttacksPerSecTotal > 0 then attackPerSecondCell = attackPerSecondCell .. ' (' .. perksAttacksPerSecTotal .. ')' end
if perksAttacksPerSecTotal > 0 then attackPerSecondCell = attackPerSecondCell .. ' (' .. formatData(perksAttacksPerSecTotal) .. ')' end


local reloadTimeCell = reloadTime
local reloadTimeCell = formatData(reloadTime)
if perksReloadTimeTotal > 0 then reloadTimeCell = reloadTimeCell .. ' (' .. perksReloadTimeTotal .. ')' end
if perksReloadTimeTotal > 0 then reloadTimeCell = reloadTimeCell .. ' (' .. formatData(perksReloadTimeTotal) .. ')' end


--------------------------------------------------------
--------------------------------------------------------
Ligne 285 : Ligne 260 :
{ type = 'row', label = 'Type de munitions', value = 'ammo' },
{ type = 'row', label = 'Type de munitions', value = 'ammo' },
{ type = 'row', label = 'Projectiles par tir', value = 'ammo use' },
{ type = 'row', label = 'Projectiles par tir', value = 'ammo use' },
{ type = 'row', label = 'Tirs par magasin', function() return shotsPerReload end },
{ type = 'row', label = 'Tirs par magasin', function() return formatData(shotsPerReload) end },
{ type = 'row', label = 'Capacité', value = 'clip rounds' },
{ type = 'row', label = 'Capacité', value = 'clip rounds' },
{ type = 'row', label = 'Durée de rechargement', value = function() return reloadTimeCell end }
{ type = 'row', label = 'Durée de rechargement', value = function() return reloadTimeCell end }
Bureaucrate, commentadmin, emailconfirmed, Administrateurs d’interface, staff, Administrateur
62 734

modifications