diff --git a/components/match2/commons/match_summary_base.lua b/components/match2/commons/match_summary_base.lua index 5cdf9e73bd4..a43c8aa7ca2 100644 --- a/components/match2/commons/match_summary_base.lua +++ b/components/match2/commons/match_summary_base.lua @@ -840,9 +840,8 @@ end ---@param games table[] ---@param maxNumberOfBans integer ----@param defaultIcon string? ---@return {[1]: string[]?, [2]: string[]?}[]? -function MatchSummary.buildCharacterBanData(games, maxNumberOfBans, defaultIcon) +function MatchSummary.buildCharacterBanData(games, maxNumberOfBans) local matchHasBans = false local gamesBans = Array.map(games, function(game) local extradata = game.extradata or {} @@ -854,8 +853,8 @@ function MatchSummary.buildCharacterBanData(games, maxNumberOfBans, defaultIcon) if team1ban or team2ban then gameHasBans = true end - table.insert(banData[1], team1ban or defaultIcon) - table.insert(banData[2], team2ban or defaultIcon) + table.insert(banData[1], team1ban) + table.insert(banData[2], team2ban) end if gameHasBans then diff --git a/components/match2/wikis/heroes/match_summary.lua b/components/match2/wikis/heroes/match_summary.lua index b2d1ece8218..0eaf06a92e2 100644 --- a/components/match2/wikis/heroes/match_summary.lua +++ b/components/match2/wikis/heroes/match_summary.lua @@ -26,7 +26,6 @@ local MatchSummaryWidgets = Lua.import('Module:Widget/Match/Summary/All') local MAX_NUM_BANS = 3 local NUM_CHAMPIONS_PICK = 5 -local NO_CHARACTER = 'default' local GREEN_CHECK = Icon.makeIcon{iconName = 'winner', color = 'forest-green-text', size = '110%'} local NO_CHECK = '[[File:NoCheck.png|link=]]' @@ -106,7 +105,7 @@ function CustomMatchSummary.createBody(match) body:addRow(MatchSummary.makeCastersRow(match.extradata.casters)) -- Add the Character Bans - local characterBansData = MatchSummary.buildCharacterBanData(match.games, MAX_NUM_BANS, NO_CHARACTER) + local characterBansData = MatchSummary.buildCharacterBanData(match.games, MAX_NUM_BANS) body.root:node(MatchSummaryWidgets.CharacterBanTable{ bans = characterBansData, date = match.date, diff --git a/components/match2/wikis/honorofkings/match_summary.lua b/components/match2/wikis/honorofkings/match_summary.lua index 4651d336a72..344435f5aaf 100644 --- a/components/match2/wikis/honorofkings/match_summary.lua +++ b/components/match2/wikis/honorofkings/match_summary.lua @@ -25,7 +25,6 @@ local NUM_CHAMPIONS_PICK = 5 local GREEN_CHECK = Icon.makeIcon{iconName = 'winner', color = 'forest-green-text', size = '110%'} local NO_CHECK = '[[File:NoCheck.png|link=]]' -local NO_CHARACTER = 'default' ---@param args table ---@return Html @@ -76,7 +75,7 @@ function CustomMatchSummary.createBody(match) end -- Add the Character Bans - local characterBansData = MatchSummary.buildCharacterBanData(match.games, MAX_NUM_BANS, NO_CHARACTER) + local characterBansData = MatchSummary.buildCharacterBanData(match.games, MAX_NUM_BANS) body.root:node(MatchSummaryWidgets.CharacterBanTable{ bans = characterBansData, date = match.date, diff --git a/components/match2/wikis/leagueoflegends/match_summary.lua b/components/match2/wikis/leagueoflegends/match_summary.lua index 9e79ef504ed..60a7897e24d 100644 --- a/components/match2/wikis/leagueoflegends/match_summary.lua +++ b/components/match2/wikis/leagueoflegends/match_summary.lua @@ -27,7 +27,6 @@ local NUM_HEROES_PICK_TEAM = 5 local NUM_HEROES_PICK_SOLO = 1 local GREEN_CHECK = Icon.makeIcon{iconName = 'winner', color = 'forest-green-text', size = '110%'} local NO_CHECK = '[[File:NoCheck.png|link=]]' -local NO_CHARACTER = 'default' ---@param args table ---@return Html @@ -76,7 +75,7 @@ function CustomMatchSummary.createBody(match) end -- Add the Character Bans - local characterBansData = MatchSummary.buildCharacterBanData(match.games, MAX_NUM_BANS, NO_CHARACTER) + local characterBansData = MatchSummary.buildCharacterBanData(match.games, MAX_NUM_BANS) body.root:node(MatchSummaryWidgets.CharacterBanTable{ bans = characterBansData, date = match.date, diff --git a/components/match2/wikis/mobilelegends/match_summary.lua b/components/match2/wikis/mobilelegends/match_summary.lua index fd380293758..0d9028c8211 100644 --- a/components/match2/wikis/mobilelegends/match_summary.lua +++ b/components/match2/wikis/mobilelegends/match_summary.lua @@ -25,7 +25,6 @@ local NUM_CHAMPIONS_PICK = 5 local GREEN_CHECK = Icon.makeIcon{iconName = 'winner', color = 'forest-green-text', size = '110%'} local NO_CHECK = '[[File:NoCheck.png|link=]]' -local NO_CHARACTER = 'default' ---@param args table ---@return Html @@ -79,7 +78,7 @@ function CustomMatchSummary.createBody(match) body:addRow(MatchSummary.makeCastersRow(match.extradata.casters)) -- Add the Character Bans - local characterBansData = MatchSummary.buildCharacterBanData(match.games, MAX_NUM_BANS, NO_CHARACTER) + local characterBansData = MatchSummary.buildCharacterBanData(match.games, MAX_NUM_BANS) body.root:node(MatchSummaryWidgets.CharacterBanTable{ bans = characterBansData, date = match.date, diff --git a/components/match2/wikis/pokemon/match_summary.lua b/components/match2/wikis/pokemon/match_summary.lua index a8a5b048c77..4027b898826 100644 --- a/components/match2/wikis/pokemon/match_summary.lua +++ b/components/match2/wikis/pokemon/match_summary.lua @@ -24,7 +24,6 @@ local MatchSummaryWidgets = Lua.import('Module:Widget/Match/Summary/All') local MAX_NUM_BANS = 5 local NUM_CHAMPIONS_PICK = 5 -local NO_CHARACTER = 'default' local GREEN_CHECK = Icon.makeIcon{iconName = 'winner', color = 'forest-green-text', size = '110%'} local NO_CHECK = '[[File:NoCheck.png|link=]]' @@ -78,7 +77,7 @@ function CustomMatchSummary.createBody(match) end -- Add the Character Bans - local characterBansData = MatchSummary.buildCharacterBanData(match.games, MAX_NUM_BANS, NO_CHARACTER) + local characterBansData = MatchSummary.buildCharacterBanData(match.games, MAX_NUM_BANS) body.root:node(MatchSummaryWidgets.CharacterBanTable{ bans = characterBansData, date = match.date, diff --git a/components/match2/wikis/smite/match_summary.lua b/components/match2/wikis/smite/match_summary.lua index e4c13b1dd30..4fb861b7fe2 100644 --- a/components/match2/wikis/smite/match_summary.lua +++ b/components/match2/wikis/smite/match_summary.lua @@ -25,7 +25,6 @@ local NUM_GODS_PICK_TEAM = 5 local NUM_GODS_PICK_SOLO = 1 local GREEN_CHECK = Icon.makeIcon{iconName = 'winner', color = 'forest-green-text', size = '110%'} local NO_CHECK = '[[File:NoCheck.png|link=]]' -local NO_CHARACTER = 'default' local LINK_DATA = { smiteesports = { @@ -63,7 +62,7 @@ function CustomMatchSummary.createBody(match) body:addRow(MatchSummary.makeCastersRow(match.extradata.casters)) -- Add the Character Bans - local characterBansData = MatchSummary.buildCharacterBanData(match.games, MAX_NUM_BANS, NO_CHARACTER) + local characterBansData = MatchSummary.buildCharacterBanData(match.games, MAX_NUM_BANS) body.root:node(MatchSummaryWidgets.CharacterBanTable{ bans = characterBansData, date = match.date, diff --git a/components/match2/wikis/wildrift/match_summary.lua b/components/match2/wikis/wildrift/match_summary.lua index 34e371b4ee4..0ea87d35ec1 100644 --- a/components/match2/wikis/wildrift/match_summary.lua +++ b/components/match2/wikis/wildrift/match_summary.lua @@ -22,7 +22,6 @@ local MatchSummaryWidgets = Lua.import('Module:Widget/Match/Summary/All') local MAX_NUM_BANS = 5 local NUM_CHAMPIONS_PICK = 5 -local NO_CHARACTER = 'default' local GREEN_CHECK = Icon.makeIcon{iconName = 'winner', color = 'forest-green-text', size = '110%'} local NO_CHECK = '[[File:NoCheck.png|link=]]' @@ -76,7 +75,7 @@ function CustomMatchSummary.createBody(match) end -- Add the Character Bans - local characterBansData = MatchSummary.buildCharacterBanData(match.games, MAX_NUM_BANS, NO_CHARACTER) + local characterBansData = MatchSummary.buildCharacterBanData(match.games, MAX_NUM_BANS) body.root:node(MatchSummaryWidgets.CharacterBanTable{ bans = characterBansData, date = match.date,