Module:HeroData: Difference between revisionsGive feedback
m return empty string directly |
m get_her_scalar_str requires hero_data instead of hero_name now |
||
| Line 43: | Line 43: | ||
local hero_name = frame.args[1] | local hero_name = frame.args[1] | ||
local hero_stat_key = frame.args[2] | local hero_stat_key = frame.args[2] | ||
local hero_data = get_json_item(hero_name) | |||
return p.get_hero_scalar_str( | if(hero == nil) then return "Hero Not Found" end | ||
return p.get_hero_scalar_str(hero_data, hero_stat_key) --surely theres a better way | |||
end | end | ||
function p.get_hero_scalar_str( | function p.get_hero_scalar_str(hero, hero_stat_key) | ||
local scaling_type_full | local scaling_type_full | ||
local scaling_data | local scaling_data | ||