Skip to content

Commit

Permalink
AoE: Add matchticker to player infoboxes (#3478)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbergen authored Nov 6, 2023
1 parent 1e610d6 commit 5419d0a
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ local Game = require('Module:Game')
local Info = require('Module:Info')
local Logic = require('Module:Logic')
local Lua = require('Module:Lua')
local MatchTicker = require('Module:Matches Player')
local Namespace = require('Module:Namespace')
local Operator = require('Module:Operator')
local Page = require('Module:Page')
Expand Down Expand Up @@ -111,6 +112,7 @@ function CustomPlayer.run(frame)
_player.createWidgetInjector = CustomPlayer.createWidgetInjector
_player.getPersonType = CustomPlayer.getPersonType
_player.getWikiCategories = CustomPlayer.getWikiCategories
_player.createBottomContent = CustomPlayer.createBottomContent

local builtInfobox = _player:createInfobox()

Expand Down Expand Up @@ -206,6 +208,10 @@ function CustomInjector:addCustomCells(widgets)
return widgets
end

function CustomPlayer.createBottomContent()
return MatchTicker.get{args = {_player.pagename}}
end

function CustomPlayer.getRating(id, game)
if _args[id] then
return mw.ext.aoedb.currentrating(_args[id], game), mw.ext.aoedb.highestrating(_args[id], game)
Expand Down

0 comments on commit 5419d0a

Please sign in to comment.