Module:HeroData: Difference between revisionsGive feedback
m write_role_playstyle_quote initial |
m write_infobox now uses hero_key instead of hero_name |
||
| Line 199: | Line 199: | ||
p.write_infobox = function(frame) | p.write_infobox = function(frame) | ||
-- Get hero data | -- Get hero data | ||
hero_key = frame.args[1] | |||
hero_data = | hero_data = heroes_data[hero_key] | ||
if(hero_data == nil) then return "Hero Not Found" end | if(hero_data == nil) then return "Hero " .. hero_key .. " Not Found" end | ||
local infobox_attributes = { | local infobox_attributes = { | ||
| Line 224: | Line 224: | ||
-- Add the main parameters | -- Add the main parameters | ||
template_args["name_english"] = | template_args["name_english"] = lang_module.get_string(hero_key, 'en') | ||
template_args["name_localized"] = localize(hero_key, hero_key) | template_args["name_localized"] = localize(hero_key, hero_key) | ||