Module:HeroData: Difference between revisionsGive feedback
m level/spirit scaling now supports multiple scalings at once, mostly for dps/sustained dps |
add hero count |
||
| Line 15: | Line 15: | ||
end | end | ||
return nil | return nil | ||
end | |||
-- Returns an array of item tables that have the same properties | |||
-- @function get_similar_items | |||
-- @param {string} | |||
-- @return {array of tables} | |||
local function get_similar_items(property) | |||
local similarItems = {} | |||
for _, v in pairs(heroes_data) do | |||
if (v[property] ~= nil) then | |||
table.insert(similarItems, v) | |||
end | |||
end | |||
return similarItems | |||
end | end | ||
| Line 549: | Line 563: | ||
local output_str = '<div style="overflow-x: auto; width: 100%;">' .. table_str .. '</div>' | local output_str = '<div style="overflow-x: auto; width: 100%;">' .. table_str .. '</div>' | ||
return output_str | return output_str | ||
end | |||
-- {{Hero count}} access point | |||
function p.get_headcount() | |||
local iter = 0 | |||
for _, v in pairs(heroes_data) do | |||
if (v["InDevelopment"] == false and v["Name"] ~= nil and v["IsDisabled"] == false) then | |||
iter = iter + 1 | |||
end | |||
end | |||
return iter | |||
end | end | ||
return p | return p | ||