Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust sc2 results table custom #2514

Merged
merged 2 commits into from
Feb 7, 2023
Merged
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
18 changes: 4 additions & 14 deletions components/results_table/wikis/starcraft2/results_table_custom.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ local MAXIMUM_NUMBER_OF_PLAYERS_IN_PLACEMENTS = 20
local CustomResultsTable = {}

-- Template entry point
function CustomResultsTable.run(frame)
function CustomResultsTable.results(frame)
local args = Arguments.getArgs(frame)
args.playerLimit = MAXIMUM_NUMBER_OF_PLAYERS_IN_PLACEMENTS

Expand All @@ -60,7 +60,9 @@ function CustomResultsTable.run(frame)
return buildTable
end

function CustomResultsTable.awards(args)
function CustomResultsTable.awards(frame)
local args = Arguments.getArgs(frame)

args.data = Json.parseIfTable(Variables.varDefault('awardAchievements'))

if Logic.readBool(args.achievements) and Table.isEmpty(args.data) then
Expand Down Expand Up @@ -107,18 +109,6 @@ function CustomResultsTable:rowHighlight(placement)
end
end

function CustomResultsTable:processLegacyVsData(placement)
if Table.isEmpty(placement.lastvsdata) then
local opponent = (placement.extradata or {}).vsOpponent or {}
placement.lastvsdata = Table.merge(
Opponent.toLpdbStruct(opponent or {}),
{groupscore = placement.groupscore, score = placement.lastvsscore}
)
end

return placement
end

-- all kill rows are manual inputs of all kill chievements
-- all kill is a special format in team matches where a player plays as long as he does not get defeated ("killed")
-- or until he has defeated all players of the opponent (possibly with revive of opponent players)
Expand Down