Module:HeroDataArrays: Difference between revisionsGive feedback
Jump to navigation
Jump to search
Gammaton32 (talk | contribs) No edit summary |
Gammaton32 (talk | contribs) added alt fire table to heroDpsTable |
||
| Line 118: | Line 118: | ||
p.heroDpsTable = function(frame) | p.heroDpsTable = function(frame) | ||
local heroDpsData = heroDataArray({"Name","Weapon>DPS","Weapon>ReloadSingle","Weapon>ReloadDelay","Weapon>ReloadTime", | local heroDpsData = heroDataArray({"Name","Weapon>DPS","Weapon>ReloadSingle","Weapon>ReloadDelay","Weapon>ReloadTime", | ||
"Weapon>ClipSize","Weapon>RoundsPerSecond","Weapon>BulletDamage","Weapon>BulletsPerShot"}) | "Weapon>ClipSize","Weapon>RoundsPerSecond","Weapon>BulletDamage","Weapon>BulletsPerShot","Weapon>AltFire>DPS", | ||
"Weapon>AltFire>AmmoConsumedPerShot","Weapon>AltFire>RoundsPerSecond","Weapon>AltFire>BulletDamage","Weapon>AltFire>BulletsPerShot"}) | |||
local rows = {} | local rows = {} | ||
| Line 130: | Line 131: | ||
roundsPerSecond = data["Weapon>RoundsPerSecond"] or 0, | roundsPerSecond = data["Weapon>RoundsPerSecond"] or 0, | ||
bulletDamage = data["Weapon>BulletDamage"] or 0, | bulletDamage = data["Weapon>BulletDamage"] or 0, | ||
bulletsPerShot = data["Weapon>BulletsPerShot"] or 0 | bulletsPerShot = data["Weapon>BulletsPerShot"] or 0, | ||
altDPS = data["Weapon>AltFire>DPS"] or 0, | |||
altAmmoConsumedPerShot = data["Weapon>AltFire>AmmoConsumedPerShot"] or 0, | |||
altRoundsPerSecond = data["Weapon>AltFire>RoundsPerSecond"] or 0, | |||
altBulletDamage = data["Weapon>AltFire>BulletDamage"] or 0, | |||
altBulletsPerShot = data["Weapon>AltFire>BulletsPerShot"] or 0 | |||
}) | }) | ||
end | end | ||
| Line 147: | Line 153: | ||
" || "..r.roundsPerSecond.." || "..r.bulletDamage.." || "..r.bulletsPerShot.." \n" | " || "..r.roundsPerSecond.." || "..r.bulletDamage.." || "..r.bulletsPerShot.." \n" | ||
end | end | ||
z = z.."|}" | |||
table.sort(rows, function(a, b) return a.name:lower() < b.name:lower() end) | table.sort(rows, function(a, b) return a.name:lower() < b.name:lower() end) | ||
| Line 173: | Line 161: | ||
title = "Hero Base Alt Fire Stats", | title = "Hero Base Alt Fire Stats", | ||
columns = { | columns = { | ||
{ label = "Damage per sec", field = " | { label = "Damage per sec", field = "altDPS" }, | ||
{ label = "Ammo Per Shot", field = " | { label = "Ammo Per Shot", field = "altAmmoConsumedPerShot" }, | ||
{ label = "Bullets per sec", field = " | { label = "Bullets per sec", field = "altRoundsPerSecond" }, | ||
{ label = "Bullet Damage", field = " | { label = "Bullet Damage", field = "altBulletDamage" }, | ||
{ label = "Bullets Per Shot", field = " | { label = "Bullets Per Shot", field = "altBulletsPerShot" }, | ||
} | } | ||
} | } | ||
| Line 229: | Line 217: | ||
end | end | ||
return output | return z .. "\n\n" .. output | ||
end | end | ||