Skip to content

Commit

Permalink
Apply date to team in SquadRow (#3277)
Browse files Browse the repository at this point in the history
* Update squad_custom.lua

* Update squad_custom.lua

* Update squad_row.lua

* Update other customs
  • Loading branch information
iMarbot authored Sep 11, 2023
1 parent 57743a8 commit c3059e4
Show file tree
Hide file tree
Showing 18 changed files with 19 additions and 1 deletion.
1 change: 1 addition & 0 deletions components/squad/commons/squad_custom.lua
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ function CustomSquad._playerRow(player, squadType)
captain = player.captain,
role = player.role,
team = player.team,
date = player.leavedate or player.inactivedate or player.leavedate,
}
row:name{name = player.name}
row:role{role = player.role}
Expand Down
3 changes: 2 additions & 1 deletion components/squad/commons/squad_row.lua
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ function SquadRow:id(args)

local teamNode = mw.html.create('td')
if args.team and mw.ext.TeamTemplate.teamexists(args.team) then
teamNode:wikitext(mw.ext.TeamTemplate.teamicon(args.team))
local date = String.nilIfEmpty(ReferenceCleaner.clean(args.date))
teamNode:wikitext(mw.ext.TeamTemplate.teamicon(args.team, date))
if args.teamrole then
teamNode:css('text-align', 'center')
teamNode:tag('div'):css('font-size', '85%'):tag('i'):wikitext(args.teamrole)
Expand Down
1 change: 1 addition & 0 deletions components/squad/wikis/apexlegends/squad_custom.lua
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ function CustomSquad.run(frame)
role = player.role,
team = player.team,
teamrole = player.teamrole,
date = player.leavedate or player.inactivedate or player.leavedate,
}
:name{name = player.name}
:role({role = player.role})
Expand Down
1 change: 1 addition & 0 deletions components/squad/wikis/arenaofvalor/squad_custom.lua
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ function CustomSquad._playerRow(player, squadType)
captain = player.captain,
role = player.role,
team = player.team,
date = player.leavedate or player.inactivedate or player.leavedate,
})
row:name{name = player.name}
row:position{role = player.role, position = player.position}
Expand Down
1 change: 1 addition & 0 deletions components/squad/wikis/counterstrike/squad_custom.lua
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ function CustomSquad.run(frame)
role = player.role,
team = player.team,
teamrole = player.teamrole,
date = player.leavedate or player.inactivedate or player.leavedate,
}
:name{name = player.name}
:role{role = player.role}
Expand Down
1 change: 1 addition & 0 deletions components/squad/wikis/dota2/squad_custom.lua
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ function CustomSquad.run(frame)
role = player.role,
team = player.team,
teamrole = player.teamrole,
date = player.leavedate or player.inactivedate or player.leavedate,
}
:name{name = player.name}
:position{position = player.position, role = player.role and LANG:ucfirst(player.role) or nil}
Expand Down
1 change: 1 addition & 0 deletions components/squad/wikis/halo/squad_custom.lua
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ function CustomSquad._playerRow(player, squadType)
captain = player.captain,
role = player.thisTeam.role,
team = player.thisTeam.role == 'Loan' and player.oldTeam.team,
date = player.leavedate or player.inactivedate or player.leavedate,
})
row:name({name = player.name})
row:role({role = player.thisTeam.role})
Expand Down
1 change: 1 addition & 0 deletions components/squad/wikis/leagueoflegends/squad_custom.lua
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ function CustomSquad._playerRow(player, squadType)
captain = player.captain,
role = player.role,
team = player.team,
date = player.leavedate or player.inactivedate or player.leavedate,
})
row:name{name = player.name}
row:position{role = player.role, position = player.position}
Expand Down
1 change: 1 addition & 0 deletions components/squad/wikis/mobilelegends/squad_custom.lua
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ function CustomSquad._playerRow(player, squadType)
captain = player.captain,
role = player.role,
team = player.team,
date = player.leavedate or player.inactivedate or player.leavedate,
})
row:name{name = player.name}
row:position{role = player.role, position = player.position}
Expand Down
1 change: 1 addition & 0 deletions components/squad/wikis/overwatch/squad_custom.lua
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ function CustomSquad._playerRow(player, squadType)
captain = player.captain,
role = player.role,
team = player.team,
date = player.leavedate or player.inactivedate or player.leavedate,
})
if HAS_NUMBER then
row:number{number = player.number}
Expand Down
1 change: 1 addition & 0 deletions components/squad/wikis/rainbowsix/squad_custom.lua
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ function CustomSquad._playerRow(player, squadType)
captain = player.captain,
role = player.thisTeam.role,
team = player.thisTeam.role == 'Loan' and player.oldTeam.team,
date = player.leavedate or player.inactivedate or player.leavedate,
})
row:name({name = player.name})
row:role({role = player.thisTeam.role})
Expand Down
1 change: 1 addition & 0 deletions components/squad/wikis/rocketleague/squad_custom.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ function CustomSquad.run(frame)
captain = player.captain,
role = player.role,
team = player.team,
date = player.leavedate or player.inactivedate or player.leavedate,
})
:name({name = player.name})
:role({role = player.role})
Expand Down
1 change: 1 addition & 0 deletions components/squad/wikis/smash/squad_custom.lua
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ function CustomSquad.run(frame)
link = player.link,
team = player.activeteam,
name = Variables.varDefault('name') or player.name,
date = player.leavedate or player.inactivedate or player.leavedate,
}
row:mains{mains = mw.text.split(mains or '', ','), game = game}
row:date(player.joindate, 'Join Date: ', 'joindate')
Expand Down
1 change: 1 addition & 0 deletions components/squad/wikis/starcraft/squad_custom.lua
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ function CustomSquad.run(frame)
flag = player.flag,
captain = player.captain,
role = player.role,
date = player.leavedate or player.inactivedate or player.leavedate,
}
row:name{name = name .. ' ' .. localizedName}

Expand Down
1 change: 1 addition & 0 deletions components/squad/wikis/starcraft2/squad_custom.lua
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ function CustomSquad.run(frame)
captain = player.captain,
role = player.role,
team = player.team,
date = player.leavedate or player.inactivedate or player.leavedate,
})
:name({name = player.name})
:role({role = player.role})
Expand Down
1 change: 1 addition & 0 deletions components/squad/wikis/valorant/squad_custom.lua
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ function CustomSquad._playerRow(player, squadType)
role = player.role,
team = player.team,
teamrole = player.teamrole,
date = player.leavedate or player.inactivedate or player.leavedate,
}
row:name{name = player.name}
row:role{role = player.role}
Expand Down
1 change: 1 addition & 0 deletions components/squad/wikis/warcraft/squad_custom.lua
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ function CustomSquad.run(frame)
captain = player.captain,
role = player.role,
team = player.team,
date = player.leavedate or player.inactivedate or player.leavedate,
}
row:name{name = player.name}
row:role{role = player.role}
Expand Down
1 change: 1 addition & 0 deletions components/squad/wikis/wildrift/squad_custom.lua
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ function CustomSquad._playerRow(player, squadType)
captain = player.captain,
role = player.role,
team = player.team,
date = player.leavedate or player.inactivedate or player.leavedate,
})
row:name{name = player.name}
row:position{role = player.role, position = player.position}
Expand Down

0 comments on commit c3059e4

Please sign in to comment.