Module:HeroData/nav: Difference between revisionsGive feedback
Jump to navigation
Jump to search
Gammaton32 (talk | contribs) fix localized templates by calling for hero link instead of hero name |
Gammaton32 (talk | contribs) 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 | ||