Module:InfoboxHero: Difference between revisions

added link for voice actor, adjusted order
Vergir (talk | contribs)
Categorise heroes whose abilities Street Brawl changes (with help from vergir-bot LLM)
Line 28: Line 28:
local dict_module = require('Module:Dictionary')
local dict_module = require('Module:Dictionary')
local hero_module = require('Module:HeroData')
local hero_module = require('Module:HeroData')
local sb_module  = require('Module:StreetBrawlAbilities')


local get_stat, has_stat, has_override_or_stat, stat_number
local get_stat, has_stat, has_override_or_stat, stat_number
Line 431: Line 432:
return 'Heroes with medium dash speed'
return 'Heroes with medium dash speed'
end,
end,
},
{
name = 'Heroes with Street Brawl changes',
when = function(ctx) return sb_module.hero_has_changes(ctx.hero_key) end,
},
},
}
}
Line 638: Line 643:
wrap:tag('div'):addClass('infobox-h-title-hero-left')
wrap:tag('div'):addClass('infobox-h-title-hero-left')


-- Name logo: <Name>_name.svg, or <Name>_name_<lang>.svg on translated pages.
-- Name logo: <n>_name.svg, or <n>_name_<lang>.svg on translated pages.
-- Heroes without a logo fall back to their name as plain text.
-- Heroes without a logo fall back to their name as plain text.
local svg = ((ctx.args.name ~= '' and ctx.args.name) or ctx.hero_en) .. '_name'
local svg = ((ctx.args.name ~= '' and ctx.args.name) or ctx.hero_en) .. '_name'