62 734
modifications
Page créée avec « local localdata = require( 'Module:Infobox/Localdata' ) local icon = require( 'Module:Icône' ) -------------------------------------------------------- -----… » |
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 : | ||
-------------------------------------------------------- | -------------------------------------------------------- | ||
local damagePerAttackCell = formatData(damNormTotal) | |||
if perksDamNormTotal > 0 then damagePerAttackCell = damagePerAttackCell .. ' (' .. formatData(perksDamNormTotal) .. ')' end | |||
if damExplTotal == '0' then | |||
damagePerAttackCell = damagePerAttackCell .. ' + ' .. formatData(damExplTotal) | |||
if perksDamExplTotal > 0 then damagePerAttackCell = damagePerAttackCell .. ' (' .. formatData(perksDamExplTotal) .. ')' end | |||
if perksDamNormTotal > 0 then damagePerAttackCell = damagePerAttackCell .. ' (' .. perksDamNormTotal .. ')' end | |||
if damExplTotal | |||
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 } |
modifications