Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lua/wikis/ageofempires/Infobox/Person/Player/Custom.lua
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ function CustomInjector:parse(id, widgets)
--Elo ratings
local ratingCells = {}
for game, ratings in Table.iter.spairs(RATINGCONFIG) do
game = Game.raw{game = game}
local gameData = Game.raw{game = game}
Array.forEach(ratings, function(rating)
local children = {}
local currentRating, bestRating
Expand All @@ -163,7 +163,7 @@ function CustomInjector:parse(id, widgets)
table.insert(children, bestRating)
end
if Logic.isNotEmpty(children) then
table.insert(ratingCells, Cell{name = rating.text .. ' (' .. game.abbreviation .. ')', children = children})
table.insert(ratingCells, Cell{name = rating.text .. ' (' .. gameData.abbreviation .. ')', children = children})
end
end)
end
Expand Down
2 changes: 1 addition & 1 deletion lua/wikis/commons/MatchGroup/Input/Util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1174,7 +1174,7 @@ function MatchGroupInputUtil.standardProcessMatch(match, Parser, FfaParser, mapP
match.finished = MatchGroupInputUtil.matchIsFinished(match, games, opponents)

if match.finished then
match.status = MatchGroupInputUtil.getMatchStatus(matchInput.winner, matchInput.finished, opponents)
match.status = MatchGroupInputUtil.getMatchStatus(matchInput.winner, matchInput.finished --[[@as string?]], opponents)
match.winner = MatchGroupInputUtil.getWinner(match.status, matchInput.winner, opponents)
Array.forEach(opponents, function(opponent, opponentIndex)
opponent.placement = MatchGroupInputUtil.placementFromWinner(match.status, match.winner, opponentIndex)
Expand Down
3 changes: 2 additions & 1 deletion lua/wikis/rocketleague/Infobox/Person/Player/Custom.lua
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,9 @@ function CustomInjector:parse(id, widgets)
}
elseif id == 'history' then
local getHistoryCells = function(key, title)
if String.isEmpty(args[key]) then return end
return {
String.isNotEmpty(args[key]) and Title{children = title} or nil,
Title{children = title},
Center{children = {args[key]}},
}
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ function CustomInjector:parse(id, widgets)


Array.extendWith(widgets,
{
raceBreakdown and Title{children = 'Racial Distribution of Champions'} or nil,
raceBreakdown and Breakdown{children = raceBreakdown.display, classes = { 'infobox-center' }} or nil,
},
raceBreakdown and {
Title{children = 'Racial Distribution of Champions'},
Breakdown{children = raceBreakdown.display, classes = { 'infobox-center' }},
} or nil,
self.caller:_buildCellsFromBase('countries with multiple champions', 'Countries with Multiple Champions'),
self.caller:_buildCellsFromBase('teams with multiple champions', 'Teams with Multiple Champions')
)
Expand Down
14 changes: 9 additions & 5 deletions lua/wikis/stormgate/Infobox/Building/Custom.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@ local Faction = Lua.import('Module:Faction')
local Hotkeys = Lua.import('Module:Hotkey')
local Icon = Lua.import('Module:Icon')
local Logic = Lua.import('Module:Logic')
local MessageBox = Lua.import('Module:Message box')
local Page = Lua.import('Module:Page')
local String = Lua.import('Module:StringUtils')
local Table = Lua.import('Module:Table')
local MessageBox = Lua.import('Module:Message box')

local Injector = Lua.import('Module:Widget/Injector')
local Building = Lua.import('Module:Infobox/Building')

local HtmlWidgets = Lua.import('Module:Widget/Html/All')
local Widgets = Lua.import('Module:Widget/All')
local Cell = Widgets.Cell
local Title = Widgets.Title
Expand Down Expand Up @@ -59,9 +60,12 @@ function CustomBuilding.run(frame)

local builtInfobox = building:createInfobox()

return mw.html.create()
:node(builtInfobox)
:node(CustomBuilding._deprecatedWarning(building.args.deprecatedDisplay))
return HtmlWidgets.Fragment{
children = {
builtInfobox,
CustomBuilding._deprecatedWarning(building.args.deprecatedDisplay)
}
}
end

---@param id string
Expand Down Expand Up @@ -356,7 +360,7 @@ function CustomBuilding:_processPatchFromId(key)
end

---@param patch string?
---@return Html? -would need to check what warningbox actually returns ... am on phone ...
---@return Html?
function CustomBuilding._deprecatedWarning(patch)
if not patch then return end

Expand Down
10 changes: 7 additions & 3 deletions lua/wikis/stormgate/Infobox/Skill/Custom.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ local MessageBox = Lua.import('Module:Message box')
local Injector = Lua.import('Module:Widget/Injector')
local Skill = Lua.import('Module:Infobox/Skill')

local HtmlWidgets = Lua.import('Module:Widget/Html/All')
local Widgets = Lua.import('Module:Widget/All')
local Cell = Widgets.Cell

Expand Down Expand Up @@ -64,9 +65,12 @@ function CustomSkill.run(frame)

local builtInfobox = skill:createInfobox()

return mw.html.create()
:node(builtInfobox)
:node(CustomSkill._deprecatedWarning(skill.args.deprecatedDisplay))
return HtmlWidgets.Fragment{
children = {
builtInfobox,
CustomSkill._deprecatedWarning(skill.args.deprecatedDisplay)
}
}
end

---@param args table
Expand Down
10 changes: 7 additions & 3 deletions lua/wikis/stormgate/Infobox/Unit/Custom.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ local MessageBox = Lua.import('Module:Message box')
local Injector = Lua.import('Module:Widget/Injector')
local Unit = Lua.import('Module:Infobox/Unit')

local HtmlWidgets = Lua.import('Module:Widget/Html/All')
local Widgets = Lua.import('Module:Widget/All')
local Cell = Widgets.Cell

Expand Down Expand Up @@ -60,9 +61,12 @@ function CustomUnit.run(frame)

local builtInfobox = unit:createInfobox()

return mw.html.create()
:node(builtInfobox)
:node(CustomUnit._deprecatedWarning(unit.args.deprecatedDisplay))
return HtmlWidgets.Fragment{
children = {
builtInfobox,
CustomUnit._deprecatedWarning(unit.args.deprecatedDisplay)
}
}
end

---@param id string
Expand Down
Loading