Module:TheEternalList

require('Module:Card')

local p = {} local cargo = mw.ext.cargo --https://help.gamepedia.com/Extension:Cargo --https://www.mediawiki.org/wiki/Extension:Cargo

function p.listType local args = mw.getCurrentFrame.args[1] local qFields = "Name, Image, Type, SubType, Series, VA" local qArgs = { where = 'Type = ' .. tostring(args) , orderBy = "Series, Name", limit = 2000, --groupBy = "Type" }   local lolis = cargo.query("loliInfo",qFields, qArgs) --mw.logObject(lolis) local root = mw.html.create('div') :cssText('display:flex; flex-flow:row wrap; hyphens:Auto;')

for i,loli in ipairs(lolis) do       --mw.logObject(i) --mw.logObject(loli) root:Card(loli) end

return root end

function p.list local args = mw.getCurrentFrame.args[1] local qFields = "Name, Image, Type, SubType, Series, VA" local qArgs = { where = 'SubType = ' .. tostring(args) , orderBy = "Series, Name", limit = 2000, --groupBy = "Type" }   local lolis = cargo.query("loliInfo",qFields, qArgs) --mw.logObject(lolis) local root = mw.html.create('div') :cssText('display:flex; flex-flow:row wrap; hyphens:Auto;')

for i,loli in ipairs(lolis) do       --mw.logObject(i) --mw.logObject(loli) root:Card(loli) end

return root end

function p.RoleList local args = mw.getCurrentFrame.args[1] local role = mw.getCurrentFrame.args[2] local qFields = "Name, Image, Type, SubType, Series, VA, Role" local qArgs = { where = 'SubType = ' .. tostring(args) ' AND Role = ' .. tostring(role), orderBy = "Series, Name", limit = 2000, }   local lolis = cargo.query("loliInfo",qFields, qArgs) --mw.logObject(lolis) local root = mw.html.create('div') :cssText('display:flex; flex-flow:row wrap; hyphens:Auto;')

for i,loli in ipairs(lolis) do       --mw.logObject(i) --mw.logObject(loli) root:Card(loli) end

return root end

function p.RoleListType local args = mw.getCurrentFrame.args[1] local role = mw.getCurrentFrame.args[2] local qFields = "Name, Image, Type, SubType, Series, VA, Role" local qArgs = { where = 'Type = ' .. tostring(args) ' AND Role = ' .. tostring(role), orderBy = "Series, Name", limit = 2000, }   local lolis = cargo.query("loliInfo",qFields, qArgs) --mw.logObject(lolis) local root = mw.html.create('div') :cssText('display:flex; flex-flow:row wrap; hyphens:Auto;')

for i,loli in ipairs(lolis) do       --mw.logObject(i) --mw.logObject(loli) root:Card(loli) end

return root end

return p