Skip to content

Commit

Permalink
Adjust generator
Browse files Browse the repository at this point in the history
  • Loading branch information
Hesketh2 authored Dec 10, 2024
1 parent 32dafd3 commit 251c251
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,14 @@ function WikiCopyPaste.getMatchCode(bestof, mode, index, opponents, args)

local lines = Array.extendWith({},
'{{Match',
index == 1 and (INDENT .. '|bestof=' .. (bestof ~= 0 and bestof or '')) or nil,
Logic.readBool(args.needsWinner) and (INDENT .. '|winner=') or nil,
INDENT .. '|date=',
Logic.readBool(args.streams) and (INDENT .. '|twitch=|youtube=|vod=') or nil,
Array.map(Array.range(1, opponents), function(opponentIndex)
return INDENT .. '|opponent' .. opponentIndex .. '=' .. opponent
end),
bestof ~= 0 and Array.map(Array.range(1, bestof), function(mapIndex)
return INDENT .. '|map' .. mapIndex .. '={{Map|map=|mode=|score1=|score2=|winner=}}'
return INDENT .. '|map' .. mapIndex .. '={{Map|map=|score1=|score2=|winner=}}'
end) or nil,
INDENT .. '}}'
)
Expand Down

0 comments on commit 251c251

Please sign in to comment.