From e853ef36ba8fa637f5d089cb78156b965bf8fc1e Mon Sep 17 00:00:00 2001 From: Rikard Blixt Date: Wed, 9 Oct 2024 18:43:46 +0200 Subject: [PATCH 1/5] refactor(match2): remove deprecated processMap, simplify subobjects --- .../match2/commons/brkts_wiki_specific_base.lua | 11 ----------- components/match2/commons/match_subobjects.lua | 13 ------------- .../wikis/apexlegends/match_group_input_custom.lua | 2 -- .../wikis/arenafps/match_group_input_custom.lua | 2 -- .../wikis/battlerite/match_group_input_custom.lua | 2 -- .../wikis/brawlhalla/match_group_input_custom.lua | 2 -- .../wikis/brawlstars/match_group_input_custom.lua | 2 -- .../wikis/callofduty/match_group_input_custom.lua | 2 -- .../wikis/clashofclans/match_group_input_custom.lua | 2 -- .../wikis/criticalops/match_group_input_custom.lua | 2 -- .../wikis/crossfire/match_group_input_custom.lua | 2 -- .../wikis/deadlock/match_group_input_custom.lua | 2 -- .../match2/wikis/dota2/match_group_input_custom.lua | 2 -- .../wikis/fighters/match_group_input_custom.lua | 2 -- .../wikis/geoguessr/match_group_input_custom.lua | 2 -- .../match2/wikis/halo/match_group_input_custom.lua | 2 -- .../wikis/heroes/match_group_input_custom.lua | 2 -- .../wikis/honorofkings/match_group_input_custom.lua | 2 -- .../leagueoflegends/match_group_input_custom.lua | 2 -- .../match2/wikis/magic/match_group_input_custom.lua | 2 -- .../mobilelegends/match_group_input_custom.lua | 2 -- .../omegastrikers/match_group_input_custom.lua | 2 -- .../match2/wikis/osu/match_group_input_custom.lua | 2 -- .../wikis/overwatch/match_group_input_custom.lua | 2 -- .../wikis/rainbowsix/match_group_input_custom.lua | 2 -- .../wikis/rocketleague/match_group_input_custom.lua | 2 -- .../wikis/sideswipe/match_group_input_custom.lua | 2 -- .../match2/wikis/smite/match_group_input_custom.lua | 2 -- .../wikis/splatoon/match_group_input_custom.lua | 2 -- .../wikis/splitgate/match_group_input_custom.lua | 2 -- .../match2/wikis/starcraft/brkts_wiki_specific.lua | 4 ---- .../match2/wikis/starcraft2/brkts_wiki_specific.lua | 4 ---- .../match2/wikis/stormgate/brkts_wiki_specific.lua | 2 -- .../wikis/teamfortress/match_group_input_custom.lua | 2 -- .../wikis/tetris/match_group_input_custom.lua | 2 -- .../wikis/trackmania/match_group_input_custom.lua | 2 -- .../wikis/valorant/match_group_input_custom.lua | 2 -- .../match2/wikis/warcraft/brkts_wiki_specific.lua | 2 -- .../wikis/wildrift/match_group_input_custom.lua | 2 -- .../wikis/worldoftanks/match_group_input_custom.lua | 2 -- .../match2/wikis/zula/match_group_input_custom.lua | 2 -- 41 files changed, 106 deletions(-) diff --git a/components/match2/commons/brkts_wiki_specific_base.lua b/components/match2/commons/brkts_wiki_specific_base.lua index 46f7734615c..22d01d72a7c 100644 --- a/components/match2/commons/brkts_wiki_specific_base.lua +++ b/components/match2/commons/brkts_wiki_specific_base.lua @@ -24,17 +24,6 @@ WikiSpecificBase.processMatch = FnUtil.lazilyDefineFunction(function() or error('Function "processMatch" not implemented on wiki in "Module:MatchGroup/Input/Custom"') end) --- called from Module:Match/Subobjects --- used to transform wiki-specific input of templates to the generalized --- format that is required by Module:MatchGroup --- @parameter map - a map --- @returns the map after changes have been applied -WikiSpecificBase.processMap = FnUtil.lazilyDefineFunction(function() - local InputModule = Lua.import('Module:MatchGroup/Input/Custom') - return InputModule and InputModule.processMap - or error('Function "processMap" not implemented on wiki in "Module:MatchGroup/Input/Custom"') -end) - --[[ Converts a match record to a structurally typed table with the appropriate data types for field values. The match record is either a match created in the store diff --git a/components/match2/commons/match_subobjects.lua b/components/match2/commons/match_subobjects.lua index 32510897ad1..9a4427190b6 100644 --- a/components/match2/commons/match_subobjects.lua +++ b/components/match2/commons/match_subobjects.lua @@ -12,8 +12,6 @@ local Json = require('Module:Json') local Logic = require('Module:Logic') local Lua = require('Module:Lua') -local WikiSpecific = Lua.import('Module:Brkts/WikiSpecific') - local ENTRY_POINT_NAMES = {'getMap'} local MatchSubobjects = {} @@ -32,17 +30,6 @@ function MatchSubobjects.luaGetMap(args) if Logic.isEmpty(args.map) then return nil else - args = WikiSpecific.processMap(args) - - args.participants = args.participants or {} - for key, item in pairs(args.participants) do - if not key:match('%d_%d') then - error('Key \'' .. key .. '\' in match2game.participants has invalid format: \'_\' expected') - elseif type(item) ~= 'table' then - error('Item \'' .. tostring(item) .. '\' in match2game.participants has invalid format: table expected') - end - end - return args end end diff --git a/components/match2/wikis/apexlegends/match_group_input_custom.lua b/components/match2/wikis/apexlegends/match_group_input_custom.lua index 999a87cc89a..aeea980157e 100644 --- a/components/match2/wikis/apexlegends/match_group_input_custom.lua +++ b/components/match2/wikis/apexlegends/match_group_input_custom.lua @@ -91,8 +91,6 @@ function CustomMatchGroupInput.processMatch(match, options) return match end -CustomMatchGroupInput.processMap = FnUtil.identity - ---@param match table ---@param opponents table[] ---@param scoreSettings table diff --git a/components/match2/wikis/arenafps/match_group_input_custom.lua b/components/match2/wikis/arenafps/match_group_input_custom.lua index 8f3df0f363d..d9f5d345a48 100644 --- a/components/match2/wikis/arenafps/match_group_input_custom.lua +++ b/components/match2/wikis/arenafps/match_group_input_custom.lua @@ -77,8 +77,6 @@ function CustomMatchGroupInput.processMatch(match, options) return match end -CustomMatchGroupInput.processMap = FnUtil.identity - -- -- match related functions -- diff --git a/components/match2/wikis/battlerite/match_group_input_custom.lua b/components/match2/wikis/battlerite/match_group_input_custom.lua index 1e16b90b04d..14b83217956 100644 --- a/components/match2/wikis/battlerite/match_group_input_custom.lua +++ b/components/match2/wikis/battlerite/match_group_input_custom.lua @@ -80,8 +80,6 @@ function CustomMatchGroupInput.processMatch(match, options) return match end -CustomMatchGroupInput.processMap = FnUtil.identity - -- -- match related functions -- diff --git a/components/match2/wikis/brawlhalla/match_group_input_custom.lua b/components/match2/wikis/brawlhalla/match_group_input_custom.lua index dfcd85003c7..f88afd36997 100644 --- a/components/match2/wikis/brawlhalla/match_group_input_custom.lua +++ b/components/match2/wikis/brawlhalla/match_group_input_custom.lua @@ -73,8 +73,6 @@ function CustomMatchGroupInput.processMatch(match, options) return match end -CustomMatchGroupInput.processMap = FnUtil.identity - ---@param match table ---@param matchOpponents table[] ---@return table[] diff --git a/components/match2/wikis/brawlstars/match_group_input_custom.lua b/components/match2/wikis/brawlstars/match_group_input_custom.lua index 38ad4470758..200165ec368 100644 --- a/components/match2/wikis/brawlstars/match_group_input_custom.lua +++ b/components/match2/wikis/brawlstars/match_group_input_custom.lua @@ -124,8 +124,6 @@ function CustomMatchGroupInput.extractMaps(match, opponents) return maps end -CustomMatchGroupInput.processMap = FnUtil.identity - -- -- match related functions -- diff --git a/components/match2/wikis/callofduty/match_group_input_custom.lua b/components/match2/wikis/callofduty/match_group_input_custom.lua index 52cf8607863..bae94f227a7 100644 --- a/components/match2/wikis/callofduty/match_group_input_custom.lua +++ b/components/match2/wikis/callofduty/match_group_input_custom.lua @@ -111,8 +111,6 @@ function CustomMatchGroupInput.extractMaps(match, opponentCount) return maps end -CustomMatchGroupInput.processMap = FnUtil.identity - -- -- match related functions -- diff --git a/components/match2/wikis/clashofclans/match_group_input_custom.lua b/components/match2/wikis/clashofclans/match_group_input_custom.lua index 47ad466e392..7d9ea2e22f9 100644 --- a/components/match2/wikis/clashofclans/match_group_input_custom.lua +++ b/components/match2/wikis/clashofclans/match_group_input_custom.lua @@ -86,8 +86,6 @@ function CustomMatchGroupInput.processMatch(match, options) return match end -CustomMatchGroupInput.processMap = FnUtil.identity - -- -- match related functions -- diff --git a/components/match2/wikis/criticalops/match_group_input_custom.lua b/components/match2/wikis/criticalops/match_group_input_custom.lua index f77961a9576..d0e93f06496 100644 --- a/components/match2/wikis/criticalops/match_group_input_custom.lua +++ b/components/match2/wikis/criticalops/match_group_input_custom.lua @@ -86,8 +86,6 @@ function CustomMatchGroupInput.processMatch(match, options) return match end -CustomMatchGroupInput.processMap = FnUtil.identity - -- -- match related functions -- diff --git a/components/match2/wikis/crossfire/match_group_input_custom.lua b/components/match2/wikis/crossfire/match_group_input_custom.lua index 29d4f5fd54b..9643d6e8db7 100644 --- a/components/match2/wikis/crossfire/match_group_input_custom.lua +++ b/components/match2/wikis/crossfire/match_group_input_custom.lua @@ -84,8 +84,6 @@ function CustomMatchGroupInput.processMatch(match, options) return match end -CustomMatchGroupInput.processMap = FnUtil.identity - -- -- match related functions -- diff --git a/components/match2/wikis/deadlock/match_group_input_custom.lua b/components/match2/wikis/deadlock/match_group_input_custom.lua index fa1cdc4ad96..17a6fe2abcf 100644 --- a/components/match2/wikis/deadlock/match_group_input_custom.lua +++ b/components/match2/wikis/deadlock/match_group_input_custom.lua @@ -113,8 +113,6 @@ function MatchFunctions.extractMaps(match, opponents) return maps end -CustomMatchGroupInput.processMap = FnUtil.identity - ---@param maps table[] ---@return fun(opponentIndex: integer): integer function MatchFunctions.calculateMatchScore(maps) diff --git a/components/match2/wikis/dota2/match_group_input_custom.lua b/components/match2/wikis/dota2/match_group_input_custom.lua index 1c131c319b4..64269a3a4dc 100644 --- a/components/match2/wikis/dota2/match_group_input_custom.lua +++ b/components/match2/wikis/dota2/match_group_input_custom.lua @@ -164,8 +164,6 @@ function MatchFunctions.extractMaps(MatchParser, match, opponents) return maps end -CustomMatchGroupInput.processMap = FnUtil.identity - ---@param maps table[] ---@return fun(opponentIndex: integer): integer function MatchFunctions.calculateMatchScore(maps) diff --git a/components/match2/wikis/fighters/match_group_input_custom.lua b/components/match2/wikis/fighters/match_group_input_custom.lua index c8ea24e3ee7..c39a3ab1d01 100644 --- a/components/match2/wikis/fighters/match_group_input_custom.lua +++ b/components/match2/wikis/fighters/match_group_input_custom.lua @@ -126,8 +126,6 @@ function CustomMatchGroupInput.extractMaps(match, matchOpponents) return maps end -CustomMatchGroupInput.processMap = FnUtil.identity - ---@param maps table[] ---@return fun(opponentIndex: integer): integer function CustomMatchGroupInput.calculateMatchScore(maps) diff --git a/components/match2/wikis/geoguessr/match_group_input_custom.lua b/components/match2/wikis/geoguessr/match_group_input_custom.lua index 0bc8661c0d5..d3f6f33e6c3 100644 --- a/components/match2/wikis/geoguessr/match_group_input_custom.lua +++ b/components/match2/wikis/geoguessr/match_group_input_custom.lua @@ -108,8 +108,6 @@ function CustomMatchGroupInput.extractMaps(match, opponentCount) return maps end -CustomMatchGroupInput.processMap = FnUtil.identity - -- -- match related functions -- diff --git a/components/match2/wikis/halo/match_group_input_custom.lua b/components/match2/wikis/halo/match_group_input_custom.lua index aec66a5a30f..ffda61d920b 100644 --- a/components/match2/wikis/halo/match_group_input_custom.lua +++ b/components/match2/wikis/halo/match_group_input_custom.lua @@ -79,8 +79,6 @@ function CustomMatchGroupInput.processMatch(match, options) return match end -CustomMatchGroupInput.processMap = FnUtil.identity - -- -- match related functions -- diff --git a/components/match2/wikis/heroes/match_group_input_custom.lua b/components/match2/wikis/heroes/match_group_input_custom.lua index 7d0689a6af1..b1b7e0e2989 100644 --- a/components/match2/wikis/heroes/match_group_input_custom.lua +++ b/components/match2/wikis/heroes/match_group_input_custom.lua @@ -123,8 +123,6 @@ function CustomMatchGroupInput.extractMaps(match, opponentCount) return maps end -CustomMatchGroupInput.processMap = FnUtil.identity - -- -- match related functions diff --git a/components/match2/wikis/honorofkings/match_group_input_custom.lua b/components/match2/wikis/honorofkings/match_group_input_custom.lua index 1694f135769..83245c8c56b 100644 --- a/components/match2/wikis/honorofkings/match_group_input_custom.lua +++ b/components/match2/wikis/honorofkings/match_group_input_custom.lua @@ -129,8 +129,6 @@ function CustomMatchGroupInput.extractMaps(match, opponentCount) return maps end -CustomMatchGroupInput.processMap = FnUtil.identity - -- -- match related functions -- diff --git a/components/match2/wikis/leagueoflegends/match_group_input_custom.lua b/components/match2/wikis/leagueoflegends/match_group_input_custom.lua index eefb3333264..63d58b3b71b 100644 --- a/components/match2/wikis/leagueoflegends/match_group_input_custom.lua +++ b/components/match2/wikis/leagueoflegends/match_group_input_custom.lua @@ -163,8 +163,6 @@ function MatchFunctions.extractMaps(MatchParser, match, opponents) return maps end -CustomMatchGroupInput.processMap = FnUtil.identity - ---@param maps table[] ---@return fun(opponentIndex: integer): integer function MatchFunctions.calculateMatchScore(maps) diff --git a/components/match2/wikis/magic/match_group_input_custom.lua b/components/match2/wikis/magic/match_group_input_custom.lua index 5b71e38ce13..635399db7c5 100644 --- a/components/match2/wikis/magic/match_group_input_custom.lua +++ b/components/match2/wikis/magic/match_group_input_custom.lua @@ -123,8 +123,6 @@ function CustomMatchGroupInput.extractMaps(match, opponents) return maps end -CustomMatchGroupInput.processMap = FnUtil.identity - ---@param maps table[] ---@return fun(opponentIndex: integer): integer function CustomMatchGroupInput.calculateMatchScore(maps) diff --git a/components/match2/wikis/mobilelegends/match_group_input_custom.lua b/components/match2/wikis/mobilelegends/match_group_input_custom.lua index bb475894948..a7f85bf950e 100644 --- a/components/match2/wikis/mobilelegends/match_group_input_custom.lua +++ b/components/match2/wikis/mobilelegends/match_group_input_custom.lua @@ -115,8 +115,6 @@ function CustomMatchGroupInput.extractMaps(match, opponents) return maps end -CustomMatchGroupInput.processMap = FnUtil.identity - -- -- match related functions -- diff --git a/components/match2/wikis/omegastrikers/match_group_input_custom.lua b/components/match2/wikis/omegastrikers/match_group_input_custom.lua index c798a3f8482..97d589b99d4 100644 --- a/components/match2/wikis/omegastrikers/match_group_input_custom.lua +++ b/components/match2/wikis/omegastrikers/match_group_input_custom.lua @@ -113,8 +113,6 @@ function CustomMatchGroupInput.extractMaps(match, opponents) return maps end -CustomMatchGroupInput.processMap = FnUtil.identity - -- -- match related functions -- diff --git a/components/match2/wikis/osu/match_group_input_custom.lua b/components/match2/wikis/osu/match_group_input_custom.lua index 75e0336ac41..7abbe3b7456 100644 --- a/components/match2/wikis/osu/match_group_input_custom.lua +++ b/components/match2/wikis/osu/match_group_input_custom.lua @@ -80,8 +80,6 @@ function CustomMatchGroupInput.processMatch(match, options) return match end -CustomMatchGroupInput.processMap = FnUtil.identity - -- -- match related functions -- diff --git a/components/match2/wikis/overwatch/match_group_input_custom.lua b/components/match2/wikis/overwatch/match_group_input_custom.lua index 12c89e82db8..f0ba6d84d41 100644 --- a/components/match2/wikis/overwatch/match_group_input_custom.lua +++ b/components/match2/wikis/overwatch/match_group_input_custom.lua @@ -115,8 +115,6 @@ function CustomMatchGroupInput.extractMaps(match, opponentCount) return maps end -CustomMatchGroupInput.processMap = FnUtil.identity - -- -- match related functions -- diff --git a/components/match2/wikis/rainbowsix/match_group_input_custom.lua b/components/match2/wikis/rainbowsix/match_group_input_custom.lua index 582be452f97..8505d1cb8da 100644 --- a/components/match2/wikis/rainbowsix/match_group_input_custom.lua +++ b/components/match2/wikis/rainbowsix/match_group_input_custom.lua @@ -80,8 +80,6 @@ function CustomMatchGroupInput.processMatch(match, options) return match end -CustomMatchGroupInput.processMap = FnUtil.identity - -- -- match related functions -- diff --git a/components/match2/wikis/rocketleague/match_group_input_custom.lua b/components/match2/wikis/rocketleague/match_group_input_custom.lua index a3542280876..a6662b25062 100644 --- a/components/match2/wikis/rocketleague/match_group_input_custom.lua +++ b/components/match2/wikis/rocketleague/match_group_input_custom.lua @@ -124,8 +124,6 @@ function CustomMatchGroupInput.extractMaps(match, opponentCount) return maps end -CustomMatchGroupInput.processMap = FnUtil.identity - ---@param opponent table ---@return table function CustomMatchGroupInput.getOpponentExtradata(opponent) diff --git a/components/match2/wikis/sideswipe/match_group_input_custom.lua b/components/match2/wikis/sideswipe/match_group_input_custom.lua index 6f75be945fb..c125b7a7449 100644 --- a/components/match2/wikis/sideswipe/match_group_input_custom.lua +++ b/components/match2/wikis/sideswipe/match_group_input_custom.lua @@ -107,8 +107,6 @@ function CustomMatchGroupInput.extractMaps(match, opponentCount) return maps end -CustomMatchGroupInput.processMap = FnUtil.identity - -- -- match related functions -- diff --git a/components/match2/wikis/smite/match_group_input_custom.lua b/components/match2/wikis/smite/match_group_input_custom.lua index aebb6d169c3..1f2e7a3ea8a 100644 --- a/components/match2/wikis/smite/match_group_input_custom.lua +++ b/components/match2/wikis/smite/match_group_input_custom.lua @@ -86,8 +86,6 @@ function CustomMatchGroupInput.processMatch(match, options) return match end -CustomMatchGroupInput.processMap = FnUtil.identity - -- -- match related functions -- diff --git a/components/match2/wikis/splatoon/match_group_input_custom.lua b/components/match2/wikis/splatoon/match_group_input_custom.lua index d3f8c22dcd2..80e095d44ec 100644 --- a/components/match2/wikis/splatoon/match_group_input_custom.lua +++ b/components/match2/wikis/splatoon/match_group_input_custom.lua @@ -122,8 +122,6 @@ function MatchFunctions.extractMaps(match, opponents) return maps end -CustomMatchGroupInput.processMap = FnUtil.identity - -- -- match related functions -- diff --git a/components/match2/wikis/splitgate/match_group_input_custom.lua b/components/match2/wikis/splitgate/match_group_input_custom.lua index 115d51d8e1d..78a9a3867e0 100644 --- a/components/match2/wikis/splitgate/match_group_input_custom.lua +++ b/components/match2/wikis/splitgate/match_group_input_custom.lua @@ -79,8 +79,6 @@ function CustomMatchGroupInput.processMatch(match, options) return match end -CustomMatchGroupInput.processMap = FnUtil.identity - -- -- match related functions -- diff --git a/components/match2/wikis/starcraft/brkts_wiki_specific.lua b/components/match2/wikis/starcraft/brkts_wiki_specific.lua index daea42e93d4..171219b0417 100644 --- a/components/match2/wikis/starcraft/brkts_wiki_specific.lua +++ b/components/match2/wikis/starcraft/brkts_wiki_specific.lua @@ -62,8 +62,4 @@ WikiSpecific.matchHasDetails = FnUtil.lazilyDefineFunction(function() return StarcraftMatchGroupUtil.matchHasDetails end) --- useless functions that should be present for some default checks --- would get called from Module:Match/Subobjects if we wouldn't circumvent that module completly -WikiSpecific.processMap = FnUtil.identity - return WikiSpecific diff --git a/components/match2/wikis/starcraft2/brkts_wiki_specific.lua b/components/match2/wikis/starcraft2/brkts_wiki_specific.lua index 11d1320d08d..2ef983abaad 100644 --- a/components/match2/wikis/starcraft2/brkts_wiki_specific.lua +++ b/components/match2/wikis/starcraft2/brkts_wiki_specific.lua @@ -62,8 +62,4 @@ WikiSpecific.matchHasDetails = FnUtil.lazilyDefineFunction(function() return StarcraftMatchGroupUtil.matchHasDetails end) --- useless functions that should be present for some default checks --- would get called from Module:Match/Subobjects if we wouldn't circumvent that module completly -WikiSpecific.processMap = FnUtil.identity - return WikiSpecific diff --git a/components/match2/wikis/stormgate/brkts_wiki_specific.lua b/components/match2/wikis/stormgate/brkts_wiki_specific.lua index e6003defff1..b89952c9bd0 100644 --- a/components/match2/wikis/stormgate/brkts_wiki_specific.lua +++ b/components/match2/wikis/stormgate/brkts_wiki_specific.lua @@ -21,8 +21,6 @@ WikiSpecific.matchFromRecord = FnUtil.lazilyDefineFunction(function() return CustomMatchGroupUtil.matchFromRecord end) -WikiSpecific.processMap = FnUtil.identity - ---Determine if a match has details that should be displayed via popup ---@param match table ---@return boolean diff --git a/components/match2/wikis/teamfortress/match_group_input_custom.lua b/components/match2/wikis/teamfortress/match_group_input_custom.lua index 297fbf6e7c1..b2cc0d95089 100644 --- a/components/match2/wikis/teamfortress/match_group_input_custom.lua +++ b/components/match2/wikis/teamfortress/match_group_input_custom.lua @@ -109,8 +109,6 @@ function CustomMatchGroupInput.extractMaps(match, opponentCount) return maps end -CustomMatchGroupInput.processMap = FnUtil.identity - -- -- match related functions -- diff --git a/components/match2/wikis/tetris/match_group_input_custom.lua b/components/match2/wikis/tetris/match_group_input_custom.lua index 15ea93aa5cf..6706f05afa2 100644 --- a/components/match2/wikis/tetris/match_group_input_custom.lua +++ b/components/match2/wikis/tetris/match_group_input_custom.lua @@ -125,8 +125,6 @@ function CustomMatchGroupInput.extractMaps(match, opponents) return maps end -CustomMatchGroupInput.processMap = FnUtil.identity - ---@param maps table[] ---@return fun(opponentIndex: integer): integer function CustomMatchGroupInput.calculateMatchScore(maps) diff --git a/components/match2/wikis/trackmania/match_group_input_custom.lua b/components/match2/wikis/trackmania/match_group_input_custom.lua index 0ab9dfd4e59..a5785d15df4 100644 --- a/components/match2/wikis/trackmania/match_group_input_custom.lua +++ b/components/match2/wikis/trackmania/match_group_input_custom.lua @@ -110,8 +110,6 @@ function CustomMatchGroupInput.extractMaps(match, opponentCount) return maps end -CustomMatchGroupInput.processMap = FnUtil.identity - ---@param opponent table ---@return table function CustomMatchGroupInput.getOpponentExtradata(opponent) diff --git a/components/match2/wikis/valorant/match_group_input_custom.lua b/components/match2/wikis/valorant/match_group_input_custom.lua index bce110d7d2b..84fc1bfdf8a 100644 --- a/components/match2/wikis/valorant/match_group_input_custom.lua +++ b/components/match2/wikis/valorant/match_group_input_custom.lua @@ -120,8 +120,6 @@ function CustomMatchGroupInput.extractMaps(match, opponents) return maps end -CustomMatchGroupInput.processMap = FnUtil.identity - -- -- match related functions -- diff --git a/components/match2/wikis/warcraft/brkts_wiki_specific.lua b/components/match2/wikis/warcraft/brkts_wiki_specific.lua index f3ffa7e8e23..8866d35f830 100644 --- a/components/match2/wikis/warcraft/brkts_wiki_specific.lua +++ b/components/match2/wikis/warcraft/brkts_wiki_specific.lua @@ -19,8 +19,6 @@ WikiSpecific.matchFromRecord = FnUtil.lazilyDefineFunction(function() return CustomMatchGroupUtil.matchFromRecord end) -WikiSpecific.processMap = FnUtil.identity - ---Determine if a match has details that should be displayed via popup ---@param match table ---@return boolean diff --git a/components/match2/wikis/wildrift/match_group_input_custom.lua b/components/match2/wikis/wildrift/match_group_input_custom.lua index b1a9b311d68..4a6abb8b3ac 100644 --- a/components/match2/wikis/wildrift/match_group_input_custom.lua +++ b/components/match2/wikis/wildrift/match_group_input_custom.lua @@ -128,8 +128,6 @@ function CustomMatchGroupInput.extractMaps(match, opponentCount) return maps end -CustomMatchGroupInput.processMap = FnUtil.identity - -- -- match related functions -- diff --git a/components/match2/wikis/worldoftanks/match_group_input_custom.lua b/components/match2/wikis/worldoftanks/match_group_input_custom.lua index b3ec8b6bcb5..a4cdcc0fbcd 100644 --- a/components/match2/wikis/worldoftanks/match_group_input_custom.lua +++ b/components/match2/wikis/worldoftanks/match_group_input_custom.lua @@ -80,8 +80,6 @@ function CustomMatchGroupInput.processMatch(match, options) return match end -CustomMatchGroupInput.processMap = FnUtil.identity - -- -- match related functions -- diff --git a/components/match2/wikis/zula/match_group_input_custom.lua b/components/match2/wikis/zula/match_group_input_custom.lua index 84c7ba913e4..72309d9c10b 100644 --- a/components/match2/wikis/zula/match_group_input_custom.lua +++ b/components/match2/wikis/zula/match_group_input_custom.lua @@ -81,8 +81,6 @@ function CustomMatchGroupInput.processMatch(match, options) return match end -CustomMatchGroupInput.processMap = FnUtil.identity - -- -- match related functions -- From 50d4b1cdbd7bb828885ed60269ba877e31ef80df Mon Sep 17 00:00:00 2001 From: Rikard Blixt Date: Wed, 9 Oct 2024 18:44:59 +0200 Subject: [PATCH 2/5] simplify --- .../match2/wikis/brawlhalla/match_group_input_custom.lua | 3 --- components/match2/wikis/fighters/match_group_input_custom.lua | 3 --- components/match2/wikis/valorant/match_group_input_custom.lua | 3 --- 3 files changed, 9 deletions(-) diff --git a/components/match2/wikis/brawlhalla/match_group_input_custom.lua b/components/match2/wikis/brawlhalla/match_group_input_custom.lua index f88afd36997..85b18c76f04 100644 --- a/components/match2/wikis/brawlhalla/match_group_input_custom.lua +++ b/components/match2/wikis/brawlhalla/match_group_input_custom.lua @@ -93,9 +93,6 @@ function CustomMatchGroupInput.extractMaps(match, matchOpponents) map.opponents = Array.map(matchOpponents, function(opponent, opponentIndex) return CustomMatchGroupInput.getParticipantsOfOpponent(map, opponent, opponentIndex) end) - -- Match/Subobjects:luaGetMap sets a empty table as default value for participants. - -- Once subobjects have been refactored away this can be removed. - map.participants = nil local opponentInfo = Array.map(matchOpponents, function(_, opponentIndex) local score, status = MatchGroupInputUtil.computeOpponentScore({ diff --git a/components/match2/wikis/fighters/match_group_input_custom.lua b/components/match2/wikis/fighters/match_group_input_custom.lua index c39a3ab1d01..7a627afd2c7 100644 --- a/components/match2/wikis/fighters/match_group_input_custom.lua +++ b/components/match2/wikis/fighters/match_group_input_custom.lua @@ -98,9 +98,6 @@ function CustomMatchGroupInput.extractMaps(match, matchOpponents) map.opponents = Array.map(matchOpponents, function(opponent, opponentIndex) return CustomMatchGroupInput.getParticipantsOfOpponent(map, opponent, opponentIndex) end) - -- Match/Subobjects:luaGetMap sets a empty table as default value for participants. - -- Once subobjects have been refactored away this can be removed. - map.participants = nil local opponentInfo = Array.map(matchOpponents, function(_, opponentIndex) local score, status = MatchGroupInputUtil.computeOpponentScore({ diff --git a/components/match2/wikis/valorant/match_group_input_custom.lua b/components/match2/wikis/valorant/match_group_input_custom.lua index 84fc1bfdf8a..6ff61262d51 100644 --- a/components/match2/wikis/valorant/match_group_input_custom.lua +++ b/components/match2/wikis/valorant/match_group_input_custom.lua @@ -90,9 +90,6 @@ function CustomMatchGroupInput.extractMaps(match, opponents) local winnerInput = map.winner --[[@as string?]] map.opponents = MapFunctions.getParticipants(map, opponents) - -- Match/Subobjects:luaGetMap sets a empty table as default value for participants. - -- Once subobjects have been refactored away this can be removed. - map.participants = nil map.extradata = MapFunctions.getExtraData(map, map.opponents) map.finished = MatchGroupInputUtil.mapIsFinished(map) From b18a613246d3dfc0fcf419c8b4558f6c80de7fab Mon Sep 17 00:00:00 2001 From: Rikard Blixt Date: Wed, 9 Oct 2024 18:48:18 +0200 Subject: [PATCH 3/5] ensure it's always set in the end --- components/match2/commons/match.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/match2/commons/match.lua b/components/match2/commons/match.lua index 0aeb7b5aa63..d5e9ee43b19 100644 --- a/components/match2/commons/match.lua +++ b/components/match2/commons/match.lua @@ -385,9 +385,9 @@ end function Match._prepareGameRecordForStore(matchRecord, gameRecord) gameRecord.parent = matchRecord.parent gameRecord.tournament = matchRecord.tournament - if not gameRecord.participants and gameRecord.opponents then + if not gameRecord.participants then gameRecord.participants = {} - for opponentId, opponent in ipairs(gameRecord.opponents) do + for opponentId, opponent in ipairs(gameRecord.opponents or {}) do for playerId, player in pairs(opponent.players) do -- Deep copy have to be used here, otherwise a json.stringify complains about circular references -- between participants and opponents From dcc8e3dca12b78d7052bbd216388f56c04451fe4 Mon Sep 17 00:00:00 2001 From: Rikard Blixt Date: Thu, 10 Oct 2024 09:47:51 +0200 Subject: [PATCH 4/5] remove unused imports, remove on cs,tft,fifa --- .../match2/wikis/apexlegends/match_group_input_custom.lua | 1 - components/match2/wikis/arenafps/match_group_input_custom.lua | 1 - .../match2/wikis/battlerite/match_group_input_custom.lua | 1 - .../match2/wikis/brawlhalla/match_group_input_custom.lua | 1 - .../match2/wikis/callofduty/match_group_input_custom.lua | 1 - .../match2/wikis/clashofclans/match_group_input_custom.lua | 1 - .../match2/wikis/counterstrike/match_group_input_custom.lua | 3 --- components/match2/wikis/crossfire/match_group_input_custom.lua | 1 - .../match2/wikis/easportsfc/match_group_input_custom.lua | 2 -- components/match2/wikis/fighters/match_group_input_custom.lua | 1 - components/match2/wikis/geoguessr/match_group_input_custom.lua | 1 - components/match2/wikis/halo/match_group_input_custom.lua | 1 - components/match2/wikis/magic/match_group_input_custom.lua | 1 - components/match2/wikis/osu/match_group_input_custom.lua | 1 - components/match2/wikis/overwatch/match_group_input_custom.lua | 1 - .../match2/wikis/rocketleague/match_group_input_custom.lua | 1 - components/match2/wikis/sideswipe/match_group_input_custom.lua | 1 - components/match2/wikis/splatoon/match_group_input_custom.lua | 1 - components/match2/wikis/splitgate/match_group_input_custom.lua | 1 - .../match2/wikis/teamfortress/match_group_input_custom.lua | 1 - components/match2/wikis/tetris/match_group_input_custom.lua | 1 - components/match2/wikis/tft/match_group_input_custom.lua | 3 --- .../match2/wikis/trackmania/match_group_input_custom.lua | 1 - .../match2/wikis/worldoftanks/match_group_input_custom.lua | 1 - components/match2/wikis/zula/match_group_input_custom.lua | 1 - 25 files changed, 30 deletions(-) diff --git a/components/match2/wikis/apexlegends/match_group_input_custom.lua b/components/match2/wikis/apexlegends/match_group_input_custom.lua index aeea980157e..e6ce590965e 100644 --- a/components/match2/wikis/apexlegends/match_group_input_custom.lua +++ b/components/match2/wikis/apexlegends/match_group_input_custom.lua @@ -7,7 +7,6 @@ -- local Array = require('Module:Array') -local FnUtil = require('Module:FnUtil') local Json = require('Module:Json') local Logic = require('Module:Logic') local Lua = require('Module:Lua') diff --git a/components/match2/wikis/arenafps/match_group_input_custom.lua b/components/match2/wikis/arenafps/match_group_input_custom.lua index d9f5d345a48..b261b433d68 100644 --- a/components/match2/wikis/arenafps/match_group_input_custom.lua +++ b/components/match2/wikis/arenafps/match_group_input_custom.lua @@ -7,7 +7,6 @@ -- local Array = require('Module:Array') -local FnUtil = require('Module:FnUtil') local Logic = require('Module:Logic') local Lua = require('Module:Lua') local Operator = require('Module:Operator') diff --git a/components/match2/wikis/battlerite/match_group_input_custom.lua b/components/match2/wikis/battlerite/match_group_input_custom.lua index 14b83217956..712d0b903a5 100644 --- a/components/match2/wikis/battlerite/match_group_input_custom.lua +++ b/components/match2/wikis/battlerite/match_group_input_custom.lua @@ -7,7 +7,6 @@ -- local Array = require('Module:Array') -local FnUtil = require('Module:FnUtil') local Lua = require('Module:Lua') local Operator = require('Module:Operator') local Streams = require('Module:Links/Stream') diff --git a/components/match2/wikis/brawlhalla/match_group_input_custom.lua b/components/match2/wikis/brawlhalla/match_group_input_custom.lua index 85b18c76f04..4cf0b03840e 100644 --- a/components/match2/wikis/brawlhalla/match_group_input_custom.lua +++ b/components/match2/wikis/brawlhalla/match_group_input_custom.lua @@ -8,7 +8,6 @@ local Array = require('Module:Array') local CharacterStandardization = mw.loadData('Module:CharacterStandardization') -local FnUtil = require('Module:FnUtil') local Lua = require('Module:Lua') local Operator = require('Module:Operator') local String = require('Module:StringUtils') diff --git a/components/match2/wikis/callofduty/match_group_input_custom.lua b/components/match2/wikis/callofduty/match_group_input_custom.lua index bae94f227a7..9efb8ad9df7 100644 --- a/components/match2/wikis/callofduty/match_group_input_custom.lua +++ b/components/match2/wikis/callofduty/match_group_input_custom.lua @@ -7,7 +7,6 @@ -- local Array = require('Module:Array') -local FnUtil = require('Module:FnUtil') local Logic = require('Module:Logic') local Lua = require('Module:Lua') local Operator = require('Module:Operator') diff --git a/components/match2/wikis/clashofclans/match_group_input_custom.lua b/components/match2/wikis/clashofclans/match_group_input_custom.lua index 7d9ea2e22f9..e23dc6516c3 100644 --- a/components/match2/wikis/clashofclans/match_group_input_custom.lua +++ b/components/match2/wikis/clashofclans/match_group_input_custom.lua @@ -7,7 +7,6 @@ -- local Array = require('Module:Array') -local FnUtil = require('Module:FnUtil') local Logic = require('Module:Logic') local Lua = require('Module:Lua') local MathUtil = require('Module:MathUtil') diff --git a/components/match2/wikis/counterstrike/match_group_input_custom.lua b/components/match2/wikis/counterstrike/match_group_input_custom.lua index da18a3192ef..7ea55243ab1 100644 --- a/components/match2/wikis/counterstrike/match_group_input_custom.lua +++ b/components/match2/wikis/counterstrike/match_group_input_custom.lua @@ -8,7 +8,6 @@ local Array = require('Module:Array') local DateExt = require('Module:Date/Ext') local EarningsOf = require('Module:Earnings of') -local FnUtil = require('Module:FnUtil') local Logic = require('Module:Logic') local Lua = require('Module:Lua') local Operator = require('Module:Operator') @@ -91,8 +90,6 @@ function CustomMatchGroupInput.processMatch(match, options) return match end -CustomMatchGroupInput.processMap = FnUtil.identity - -- -- match related functions -- diff --git a/components/match2/wikis/crossfire/match_group_input_custom.lua b/components/match2/wikis/crossfire/match_group_input_custom.lua index 9643d6e8db7..bb92e3ced09 100644 --- a/components/match2/wikis/crossfire/match_group_input_custom.lua +++ b/components/match2/wikis/crossfire/match_group_input_custom.lua @@ -7,7 +7,6 @@ -- local Array = require('Module:Array') -local FnUtil = require('Module:FnUtil') local Logic = require('Module:Logic') local Lua = require('Module:Lua') local Operator = require('Module:Operator') diff --git a/components/match2/wikis/easportsfc/match_group_input_custom.lua b/components/match2/wikis/easportsfc/match_group_input_custom.lua index f99b1e50420..244f1b15bab 100644 --- a/components/match2/wikis/easportsfc/match_group_input_custom.lua +++ b/components/match2/wikis/easportsfc/match_group_input_custom.lua @@ -7,7 +7,6 @@ -- local Array = require('Module:Array') -local FnUtil = require('Module:FnUtil') local Logic = require('Module:Logic') local Lua = require('Module:Lua') local Ordinal = require('Module:Ordinal') @@ -131,7 +130,6 @@ function CustomMatchGroupInput.extractMaps(match, opponents) return maps end -CustomMatchGroupInput.processMap = FnUtil.identity --- TODO: Investigate if some parts of this should be a display rather than storage. --- If penalties is supplied, than one map MUST have the penalty flag set to true. diff --git a/components/match2/wikis/fighters/match_group_input_custom.lua b/components/match2/wikis/fighters/match_group_input_custom.lua index 7a627afd2c7..17e41b8592d 100644 --- a/components/match2/wikis/fighters/match_group_input_custom.lua +++ b/components/match2/wikis/fighters/match_group_input_custom.lua @@ -7,7 +7,6 @@ -- local Array = require('Module:Array') -local FnUtil = require('Module:FnUtil') local Game = require('Module:Game') local Json = require('Module:Json') local Lua = require('Module:Lua') diff --git a/components/match2/wikis/geoguessr/match_group_input_custom.lua b/components/match2/wikis/geoguessr/match_group_input_custom.lua index d3f6f33e6c3..d1b7d25090b 100644 --- a/components/match2/wikis/geoguessr/match_group_input_custom.lua +++ b/components/match2/wikis/geoguessr/match_group_input_custom.lua @@ -7,7 +7,6 @@ -- local Array = require('Module:Array') -local FnUtil = require('Module:FnUtil') local Logic = require('Module:Logic') local Lua = require('Module:Lua') local Operator = require('Module:Operator') diff --git a/components/match2/wikis/halo/match_group_input_custom.lua b/components/match2/wikis/halo/match_group_input_custom.lua index ffda61d920b..3108d9133d2 100644 --- a/components/match2/wikis/halo/match_group_input_custom.lua +++ b/components/match2/wikis/halo/match_group_input_custom.lua @@ -7,7 +7,6 @@ -- local Array = require('Module:Array') -local FnUtil = require('Module:FnUtil') local Logic = require('Module:Logic') local Lua = require('Module:Lua') local Operator = require('Module:Operator') diff --git a/components/match2/wikis/magic/match_group_input_custom.lua b/components/match2/wikis/magic/match_group_input_custom.lua index 635399db7c5..3842b61bf0d 100644 --- a/components/match2/wikis/magic/match_group_input_custom.lua +++ b/components/match2/wikis/magic/match_group_input_custom.lua @@ -7,7 +7,6 @@ -- local Array = require('Module:Array') -local FnUtil = require('Module:FnUtil') local Logic = require('Module:Logic') local Lua = require('Module:Lua') local Operator = require('Module:Operator') diff --git a/components/match2/wikis/osu/match_group_input_custom.lua b/components/match2/wikis/osu/match_group_input_custom.lua index 7abbe3b7456..8b00e5cba5e 100644 --- a/components/match2/wikis/osu/match_group_input_custom.lua +++ b/components/match2/wikis/osu/match_group_input_custom.lua @@ -7,7 +7,6 @@ -- local Array = require('Module:Array') -local FnUtil = require('Module:FnUtil') local Logic = require('Module:Logic') local Lua = require('Module:Lua') local Operator = require('Module:Operator') diff --git a/components/match2/wikis/overwatch/match_group_input_custom.lua b/components/match2/wikis/overwatch/match_group_input_custom.lua index f0ba6d84d41..6666057c8e8 100644 --- a/components/match2/wikis/overwatch/match_group_input_custom.lua +++ b/components/match2/wikis/overwatch/match_group_input_custom.lua @@ -7,7 +7,6 @@ -- local Array = require('Module:Array') -local FnUtil = require('Module:FnUtil') local Logic = require('Module:Logic') local Lua = require('Module:Lua') local Operator = require('Module:Operator') diff --git a/components/match2/wikis/rocketleague/match_group_input_custom.lua b/components/match2/wikis/rocketleague/match_group_input_custom.lua index a6662b25062..0132d22f908 100644 --- a/components/match2/wikis/rocketleague/match_group_input_custom.lua +++ b/components/match2/wikis/rocketleague/match_group_input_custom.lua @@ -9,7 +9,6 @@ local CustomMatchGroupInput = {} local Array = require('Module:Array') -local FnUtil = require('Module:FnUtil') local Json = require('Module:Json') local Logic = require('Module:Logic') local Lua = require('Module:Lua') diff --git a/components/match2/wikis/sideswipe/match_group_input_custom.lua b/components/match2/wikis/sideswipe/match_group_input_custom.lua index c125b7a7449..1ea8782f8ea 100644 --- a/components/match2/wikis/sideswipe/match_group_input_custom.lua +++ b/components/match2/wikis/sideswipe/match_group_input_custom.lua @@ -9,7 +9,6 @@ local CustomMatchGroupInput = {} local Array = require('Module:Array') -local FnUtil = require('Module:FnUtil') local Logic = require('Module:Logic') local Lua = require('Module:Lua') local Operator = require('Module:Operator') diff --git a/components/match2/wikis/splatoon/match_group_input_custom.lua b/components/match2/wikis/splatoon/match_group_input_custom.lua index 80e095d44ec..2dee94f7bcf 100644 --- a/components/match2/wikis/splatoon/match_group_input_custom.lua +++ b/components/match2/wikis/splatoon/match_group_input_custom.lua @@ -7,7 +7,6 @@ -- local Array = require('Module:Array') -local FnUtil = require('Module:FnUtil') local Logic = require('Module:Logic') local Lua = require('Module:Lua') local Operator = require('Module:Operator') diff --git a/components/match2/wikis/splitgate/match_group_input_custom.lua b/components/match2/wikis/splitgate/match_group_input_custom.lua index 78a9a3867e0..91ceb42aedd 100644 --- a/components/match2/wikis/splitgate/match_group_input_custom.lua +++ b/components/match2/wikis/splitgate/match_group_input_custom.lua @@ -7,7 +7,6 @@ -- local Array = require('Module:Array') -local FnUtil = require('Module:FnUtil') local Logic = require('Module:Logic') local Lua = require('Module:Lua') local Operator = require('Module:Operator') diff --git a/components/match2/wikis/teamfortress/match_group_input_custom.lua b/components/match2/wikis/teamfortress/match_group_input_custom.lua index b2cc0d95089..d18db788421 100644 --- a/components/match2/wikis/teamfortress/match_group_input_custom.lua +++ b/components/match2/wikis/teamfortress/match_group_input_custom.lua @@ -7,7 +7,6 @@ -- local Array = require('Module:Array') -local FnUtil = require('Module:FnUtil') local Logic = require('Module:Logic') local Lua = require('Module:Lua') local Operator = require('Module:Operator') diff --git a/components/match2/wikis/tetris/match_group_input_custom.lua b/components/match2/wikis/tetris/match_group_input_custom.lua index 6706f05afa2..6f10d28a17f 100644 --- a/components/match2/wikis/tetris/match_group_input_custom.lua +++ b/components/match2/wikis/tetris/match_group_input_custom.lua @@ -7,7 +7,6 @@ -- local Array = require('Module:Array') -local FnUtil = require('Module:FnUtil') local Logic = require('Module:Logic') local Lua = require('Module:Lua') local Operator = require('Module:Operator') diff --git a/components/match2/wikis/tft/match_group_input_custom.lua b/components/match2/wikis/tft/match_group_input_custom.lua index 90aef34115b..537fc4ba4a2 100644 --- a/components/match2/wikis/tft/match_group_input_custom.lua +++ b/components/match2/wikis/tft/match_group_input_custom.lua @@ -7,7 +7,6 @@ -- local Array = require('Module:Array') -local FnUtil = require('Module:FnUtil') local Lua = require('Module:Lua') local Operator = require('Module:Operator') local Table = require('Module:Table') @@ -23,8 +22,6 @@ local CustomMatchGroupInput = {} local MatchFunctions = {} local MapFunctions = {} -CustomMatchGroupInput.processMap = FnUtil.identity - ---@param match table ---@param options table? ---@return table diff --git a/components/match2/wikis/trackmania/match_group_input_custom.lua b/components/match2/wikis/trackmania/match_group_input_custom.lua index a5785d15df4..6995e7f6a6b 100644 --- a/components/match2/wikis/trackmania/match_group_input_custom.lua +++ b/components/match2/wikis/trackmania/match_group_input_custom.lua @@ -9,7 +9,6 @@ local CustomMatchGroupInput = {} local Array = require('Module:Array') -local FnUtil = require('Module:FnUtil') local Logic = require('Module:Logic') local Lua = require('Module:Lua') local Operator = require('Module:Operator') diff --git a/components/match2/wikis/worldoftanks/match_group_input_custom.lua b/components/match2/wikis/worldoftanks/match_group_input_custom.lua index a4cdcc0fbcd..b665907c111 100644 --- a/components/match2/wikis/worldoftanks/match_group_input_custom.lua +++ b/components/match2/wikis/worldoftanks/match_group_input_custom.lua @@ -7,7 +7,6 @@ -- local Array = require('Module:Array') -local FnUtil = require('Module:FnUtil') local Logic = require('Module:Logic') local Lua = require('Module:Lua') local Operator = require('Module:Operator') diff --git a/components/match2/wikis/zula/match_group_input_custom.lua b/components/match2/wikis/zula/match_group_input_custom.lua index 72309d9c10b..91b228ea4f4 100644 --- a/components/match2/wikis/zula/match_group_input_custom.lua +++ b/components/match2/wikis/zula/match_group_input_custom.lua @@ -7,7 +7,6 @@ -- local Array = require('Module:Array') -local FnUtil = require('Module:FnUtil') local Logic = require('Module:Logic') local Lua = require('Module:Lua') local Operator = require('Module:Operator') From 11941cd1969115de097fb499558a636c023aaf6c Mon Sep 17 00:00:00 2001 From: Rikard Blixt Date: Thu, 10 Oct 2024 11:53:49 +0200 Subject: [PATCH 5/5] from review --- components/match2/commons/match_subobjects.lua | 3 +-- .../match2/wikis/criticalops/match_group_input_custom.lua | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/components/match2/commons/match_subobjects.lua b/components/match2/commons/match_subobjects.lua index 9a4427190b6..b0783b4ca7d 100644 --- a/components/match2/commons/match_subobjects.lua +++ b/components/match2/commons/match_subobjects.lua @@ -29,9 +29,8 @@ function MatchSubobjects.luaGetMap(args) -- dont save map if 'map' is not filled in if Logic.isEmpty(args.map) then return nil - else - return args end + return args end if FeatureFlag.get('perf') then diff --git a/components/match2/wikis/criticalops/match_group_input_custom.lua b/components/match2/wikis/criticalops/match_group_input_custom.lua index d0e93f06496..59ac2e1917f 100644 --- a/components/match2/wikis/criticalops/match_group_input_custom.lua +++ b/components/match2/wikis/criticalops/match_group_input_custom.lua @@ -7,7 +7,6 @@ -- local Array = require('Module:Array') -local FnUtil = require('Module:FnUtil') local Logic = require('Module:Logic') local Lua = require('Module:Lua') local MathUtil = require('Module:MathUtil')