6,834
edits
No edit summary |
No edit summary |
||
Line 275: | Line 275: | ||
local args = p.getArgs(frame) | local args = p.getArgs(frame) | ||
local gamesText = p.getGames(args.games) | local gamesText = p.getGames(args.games) | ||
if gamesText == "All Games" then | if gamesText == "All Games" then | ||
return p.loadTemplate(frame, 'GreenInformationBox', {table.concat({ | return p.loadTemplate(frame, 'GreenInformationBox', {table.concat({ | ||
Line 284: | Line 283: | ||
}, ' '), id=games}) | }, ' '), id=games}) | ||
else | else | ||
local games = { 'iii', 'vc', 'sa', 'iv' } | |||
return p.loadTemplate(frame, 'RedInformationBox', { | local out = {} | ||
for i,game in ipairs(games) do | |||
if gamesText:lower():find(game) then | |||
table.insert(out, p.loadTemplate(frame, 'icon-'..game)) | |||
end | |||
end | |||
return p.loadTemplate(frame, 'RedInformationBox', {table.concat(out, ' '), id=games}) | |||
end | end | ||
end | end |
edits