Module:HeroData: Difference between revisionsGive feedback
Jump to navigation
Jump to search
m _get_string > get_string |
m get_hero_var now supports passing hero key |
||
| Line 49: | Line 49: | ||
local sig_figs_or_localize = frame.args[3] | local sig_figs_or_localize = frame.args[3] | ||
local hero = p.get_json_item(hero_name) | local hero = heroes_data[hero_name] --check if hero key is passed instead | ||
if(hero == nil) then return "Hero Not Found" end | if(hero == nil) then hero = p.get_json_item(hero_name) end --check if hero name is passed | ||
if(hero == nil) then return "Hero Not Found" end --both invalid, error | |||
local var_value = hero[hero_stat_key] | local var_value = hero[hero_stat_key] | ||