Module:ScriptItem: Difference between revisions

Jump to navigation Jump to search
no edit summary
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)
--{{z}} {{icon-vc}} {{icon-sa}} {{icon-iv}}
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', {gamesText..' Only',id='games'});
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
6,834

edits

Navigation menu