Skip to content

Commit

Permalink
PUBGM: removing unused |platform= parameter in infobox league (#3699)
Browse files Browse the repository at this point in the history
  • Loading branch information
thangcoi02 authored Dec 27, 2023
1 parent f06a98e commit 8986f8d
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions components/infobox/wikis/pubgmobile/infobox_league_custom.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,6 @@ local _PERSPECTIVES = {
_PERSPECTIVES.first = _PERSPECTIVES.fpp
_PERSPECTIVES.third = _PERSPECTIVES.tpp

local _PLATFORMS = {
mobile = '[[Mobile]][[Category:Mobile Competitions]]',
newstate = '[[New State]][[Category:Mobile Competitions]]',
peace = '[[Peacekeeper Elite|Peace Elite]][[Category:Peacekeeper Elite Competitions]][[Category:Mobile Competitions]]',
bgmi = '[[Battlegrounds Mobile India|BGMI]]' ..
'[[Category:Battlegrounds Mobile India Competitions]][[Category:Mobile Competitions]]',
default = '[[Category:Unknown Platform Competitions]]',
}

function CustomLeague.run(frame)
local league = League(frame)
_args = league.args
Expand All @@ -84,10 +75,6 @@ function CustomInjector:parse(id, widgets)
CustomLeague._getGameMode()
}
},
Cell{name = 'Platform', content = {
CustomLeague._getPlatform()
}
},
}
elseif id == 'customcontent' then
if _args.player_number then
Expand Down Expand Up @@ -142,14 +129,4 @@ function CustomLeague._getGameMode()
return mode .. ' ' .. table.concat(displayPerspectives, ' ')
end

function CustomLeague._getPlatform()
if String.isEmpty(_args.platform) then
return nil
end

local platform = string.lower(_args.platform or '')

return _PLATFORMS[platform] or _PLATFORMS['default']
end

return CustomLeague

0 comments on commit 8986f8d

Please sign in to comment.