Module:HeroData/nav: Difference between revisions

Jump to navigation Jump to search
fix localized templates by calling for hero link instead of hero name
3D model function
 
Line 163: Line 163:
      
      
     local ret = '<gallery>\n' .. table.concat(parts) .. '</gallery>'
     local ret = '<gallery>\n' .. table.concat(parts) .. '</gallery>'
    if debug_mode then
        return ret
    else
        return frame:preprocess(ret)
    end
end
-- Generate 3D model gallery
function p.get_hero_models(frame)
    local in_herolabs = frame.args['in_herolabs'] or 'false'
    local debug_mode = frame.args['debug_mode'] == 'true'
    local heroes = get_heroes(in_herolabs)
    local parts = {}
    for _, hero in ipairs(heroes) do
        table.insert(parts, string.format('{{3D Model|%s}}', hero.name))
    end
    local ret = table.concat(parts)


     if debug_mode then
     if debug_mode then