Skip to content

Commit

Permalink
Merge branch 'main' into transfer
Browse files Browse the repository at this point in the history
  • Loading branch information
hjpalpha authored Oct 15, 2024
2 parents 2326556 + 774b823 commit 2d3e5de
Show file tree
Hide file tree
Showing 92 changed files with 882 additions and 852 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/deploy test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ jobs:
with:
fetch-depth: 0

- uses: nrwl/nx-set-shas@v4
id: last_successful_commit_push
- uses: younited/[email protected]
id: forkpoint

- id: changed-files
uses: tj-actions/changed-files@v45
with:
base_sha: ${{ steps.last_successful_commit_push.outputs.base }}
base_sha: ${{ steps.forkpoint.outputs.fork_point_sha }}
files: |
components/**/*.lua
standard/**/*.lua
Expand Down
10 changes: 8 additions & 2 deletions components/infobox/commons/infobox_basic.lua
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,19 @@ end
---@param widgets Widget[]
---@return string
function BasicInfobox:build(widgets)
return Infobox{
local infobox = Infobox{
gameName = self.wiki,
forceDarkMode = Logic.readBool(self.args.darkmodeforced),
bottomContent = self.bottomContent,
warnings = self.warnings,
children = widgets,
}:tryMake(self.injector) or ''
}
if self.injector then
-- Customizable backwards compatibility
local CustomizableContext = Lua.import('Module:Widget/Contexts/Customizable')
return CustomizableContext.LegacyCustomizable{value = self.injector, children = {infobox}}:tryMake()
end
return infobox:tryMake()
end

return BasicInfobox
32 changes: 16 additions & 16 deletions components/infobox/wikis/apexlegends/infobox_map_custom.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ function CustomInjector:parse(id, widgets)

if String.isEmpty(args.ring) then return widgets end

local rows = {self.caller:_createRingTableHeader()}
Array.forEach(self.caller:getAllArgsForBase(args, 'ring'), function(ringData)
table.insert(rows, self.caller:_createRingTableRow(ringData))
end)

local ringTable = WidgetTable{
classes = {'fo-nttax-infobox' ,'wiki-bordercolor-light'}, --row alternating bg
css = {
Expand All @@ -58,14 +63,9 @@ function CustomInjector:parse(id, widgets)
['padding-bottom'] = '0px',
['border-top-style'] = 'none',
},
children = rows,
}

ringTable:addRow(self.caller:_createRingTableHeader())

Array.forEach(self.caller:getAllArgsForBase(args, 'ring'), function(ringData)
ringTable:addRow(self.caller:_createRingTableRow(ringData))
end)

Array.appendWith(widgets,
Title{children = 'Ring Information'},
ringTable
Expand All @@ -77,23 +77,23 @@ end

---@return WidgetTableRow
function CustomMap:_createRingTableHeader()
local headerRow = TableRow{css = {['font-weight'] = 'bold'}} -- bg needed
return headerRow
:addCell(TableCell{children = {'Ring'}})
:addCell(TableCell{children = {'Wait (s)'}})
:addCell(TableCell{children = {'Close<br>Time (s)'}})
:addCell(TableCell{children = {'Damage<br>per tick'}})
:addCell(TableCell{children = {'End Diameter (m)'}})
return TableRow{css = {['font-weight'] = 'bold'}, children = {
TableCell{children = {'Ring'}},
TableCell{children = {'Wait (s)'}},
TableCell{children = {'Close Time (s)'}},
TableCell{children = {'Damage per tick'}},
TableCell{children = {'End Diameter (m)'}},
}} -- bg needed
end

---@param ringData string
---@return WidgetTableRow
function CustomMap:_createRingTableRow(ringData)
local row = TableRow{}
local cells = {}
for _, item in ipairs(mw.text.split(ringData, ',')) do
row:addCell(TableCell{children = {item}})
table.insert(cells, TableCell{children = {item}})
end
return row
return TableRow{children = cells}
end

---@param args table
Expand Down
4 changes: 2 additions & 2 deletions components/infobox/wikis/geoguessr/infobox_league_custom.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
local Class = require('Module:Class')
local Lua = require('Module:Lua')

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

local Widgets = require('Module:Infobox/Widget/All')
local Widgets = require('Module:Widget/All')
local Cell = Widgets.Cell

---@class GeoguessrLeagueInfobox: InfoboxLeague
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ local Page = require('Module:Page')
local TeamHistoryAuto = require('Module:TeamHistoryAuto')
local Variables = require('Module:Variables')

local Injector = Lua.import('Module:Infobox/Widget/Injector')
local Injector = Lua.import('Module:Widget/Injector')
local MatchTicker = Lua.import('Module:MatchTicker/Custom')
local Player = Lua.import('Module:Infobox/Person')

local Widgets = require('Module:Infobox/Widget/All')
local Widgets = require('Module:Widget/All')
local Cell = Widgets.Cell

local ROLES = {
Expand Down
3 changes: 1 addition & 2 deletions components/match2/commons/match_group_legacy.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ local Table = require('Module:Table')

local MatchGroup = Lua.import('Module:MatchGroup')
local MatchGroupUtil = Lua.import('Module:MatchGroup/Util')
local MatchSubobjects = Lua.import('Module:Match/Subobjects')

local globalVars = PageVariableNamespace()

Expand Down Expand Up @@ -248,7 +247,7 @@ function MatchGroupLegacy:handleMap(details, mapIndex)
map = self:_copyAndReplace(blueprint, details, true)
end

return MatchSubobjects.luaGetMap(map)
return map
end

---@param isReset boolean
Expand Down
43 changes: 0 additions & 43 deletions components/match2/commons/match_subobjects.lua

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ function MatchFunctions.extractMaps(match, opponents)
local maps = {}
local subGroup = 0
for mapKey, mapInput, mapIndex in Table.iter.pairsByPrefix(match, 'map', {requireIndex = true}) do
if Logic.isEmpty(mapInput) then
break
end
local map
map, subGroup = MapFunctions.readMap(mapInput, subGroup, #opponents)

Expand Down
Loading

0 comments on commit 2d3e5de

Please sign in to comment.