Module:HeroData: Difference between revisionsGive feedback
Jump to navigation
Jump to search
m get_list_elem also allows key being passed |
m write_default_items now uses unlocalized |
||
| Line 94: | Line 94: | ||
p.write_default_items = function(frame) | p.write_default_items = function(frame) | ||
local | local hero_key = frame.args[1] --unlocalized | ||
if ( | if (hero_key == nil) then return "No hero key provided" end | ||
local str = "" | local str = "" | ||
local hero = heroes_data[ | local hero = heroes_data[hero_key] | ||
if (hero == nil) then return "Hero not found, must be | if (hero == nil) then return "Hero not found, must be unlocalized" end | ||
local template_title = 'PageRef' | local template_title = 'PageRef' | ||
for i, item_key in ipairs(hero["RecommendedItems"]) do | for i, item_key in ipairs(hero["RecommendedItems"]) do | ||