diff --git a/components/hidden_data_box/wikis/valorant/hidden_data_box_custom.lua b/components/hidden_data_box/wikis/valorant/hidden_data_box_custom.lua index cfd7f2cc67f..a603747a4f2 100644 --- a/components/hidden_data_box/wikis/valorant/hidden_data_box_custom.lua +++ b/components/hidden_data_box/wikis/valorant/hidden_data_box_custom.lua @@ -7,6 +7,7 @@ -- local Class = require('Module:Class') +local Logic = require('Module:Logic') local Lua = require('Module:Lua') local Tier = require('Module:Tier/Custom') local Variables = require('Module:Variables') @@ -39,7 +40,8 @@ function CustomHiddenDataBox.addCustomVariables(args, queryResult) Variables.varDefine('tournament_ticker_name', Variables.varDefault('tournament_tickername')) Variables.varDefine('tournament_icon_darkmode', Variables.varDefault('tournament_icondark')) Variables.varDefine('mode', Variables.varDefault('tournament_mode', 'team')) - Variables.varDefine('female', queryResult.extradata.female or args.female and 'true' or 'false') + Variables.varDefine('gamechangers', queryResult.extradata.gamechangers + or tostring(Logic.readBool(args.gc or args.female))) BasicHiddenDataBox.checkAndAssign('patch', args.patch, queryResult.patch) BasicHiddenDataBox.checkAndAssign('tournament_riot_premier', queryResult.tournament_riot_premier, args.riotpremier) end diff --git a/components/infobox/wikis/valorant/infobox_league_custom.lua b/components/infobox/wikis/valorant/infobox_league_custom.lua index 799666fe963..eb975795351 100644 --- a/components/infobox/wikis/valorant/infobox_league_custom.lua +++ b/components/infobox/wikis/valorant/infobox_league_custom.lua @@ -44,6 +44,8 @@ end ---@param args table function CustomLeague:customParseArguments(args) self.data.mode = (args.individual or args.player_number) and '1v1' or 'team' + -- female as a temp alias to bot the old input over + self.data.gameChangers = Logic.readBool(args.gc or args.female) self.data.publishertier = Logic.readBool(args['riot-highlighted']) and 'highlighted' or Logic.readBool(args['riot-sponsored']) and 'sponsored' or nil @@ -89,8 +91,8 @@ end function CustomLeague:getWikiCategories(args) local categories = {} - if Logic.readBool(args.female) then - table.insert(categories, 'Female Tournaments') + if self.data.gameChangers then + table.insert(categories, 'Game Changers Tournaments') end return categories @@ -105,7 +107,7 @@ function CustomLeague:addToLpdb(lpdbData, args) lpdbData.extradata.region = Template.safeExpand(mw.getCurrentFrame(), 'Template:Player region', {args.country}) lpdbData.extradata.startdate_raw = args.sdate or args.date lpdbData.extradata.enddate_raw = args.edate or args.date - lpdbData.extradata.female = args.female or 'false' + lpdbData.extradata.gamechangers = tostring(self.data.gameChangers) return lpdbData end @@ -146,7 +148,7 @@ end ---@param args table function CustomLeague:defineCustomPageVariables(args) -- Wiki Custom - Variables.varDefine('female', args.female or 'false') + Variables.varDefine('gamechangers', tostring(self.data.gameChangers)) Variables.varDefine('tournament_riot_premier', args.riotpremier and 'true' or '') Variables.varDefine('patch', args.patch or '') diff --git a/components/match2/wikis/valorant/match_legacy.lua b/components/match2/wikis/valorant/match_legacy.lua index d12d1abe916..5e36dee22e3 100644 --- a/components/match2/wikis/valorant/match_legacy.lua +++ b/components/match2/wikis/valorant/match_legacy.lua @@ -136,7 +136,7 @@ function MatchLegacy._convertParameters(match2) local extradata = Json.parseIfString(match2.extradata) match.extradata.matchsection = extradata.matchsection - match.extradata.female = Variables.varDefault('female') + match.extradata.gamechangers = Variables.varDefault('gamechangers') match.extradata.hidden = Logic.readBool(Variables.varDefault('match_hidden')) and '1' or '0' match.extradata.cancelled = Logic.readBool(Variables.varDefault('cancelled')) and '1' or '0' match.extradata.bestofx = match2.bestof ~= 0 and tostring(match2.bestof) or ''