Module:HeroDataArrays: Difference between revisions

Jump to navigation Jump to search
merged light and heavy melee table
bullet radius
Line 971: Line 971:
             columns = {
             columns = {
                 { label = "Gravity Scale", field = "altGravityScale"  },
                 { label = "Gravity Scale", field = "altGravityScale"  },
            }
        }
    }
    local output = {}
    for _, def in ipairs(tableDefs) do
        local t = buildTable(frame, rows, def, def.options)
        if t ~= "" then
            table.insert(output, t)
        end
    end
    return table.concat(output, "\n\n")
end
p.bulletRadiusTable = function(frame)
    local heroBulletRadiusData = heroDataArray({"Name", "Weapon>BulletRadius"})
    local rows = {}
    for name, data in pairs(heroBulletRadiusData) do
        table.insert(rows, {
            name = name,
            bulletRadius  = (data["Weapon>BulletRadius"] or 0),
        })
    end
    sortHeroes(rows)
    local tableDefs = {
    {
            title  = "Base Bullet Radius Stats",
            columns = {
                { label = "Bullet Radius", field = "bulletRadius"  },
             }
             }
         }
         }