Module:GetCannotUse

local cargo = mw.ext.cargo local List = require 'Module:ListUtil' local escq = require 'Module:EscQ'.main1

local moveList_lua = function (liststr) local l = mw.text.split(liststr or '', '%s*,%s*') return cargo.query('MoveTypes', 'WikiName,Name,_pageName', {		where = ('WikiName NOT IN (%s)'):format(table.concat(List.map(l, function (v) return ("'%s'"):format(escq(v)) end), ',')),		orderBy = 'Sort',	}) end

local weaponList_lua = function (liststr) local l = mw.text.split(liststr or '', '%s*,%s*') return cargo.query('WeaponTypes', 'WikiName,Name,_pageName', {		where = ('WikiName NOT IN (%s)'):format(table.concat(List.map(l, function (v) return ("'%s'"):format(escq(v)) end), ',')),		orderBy = 'ColorSort,Sort',	}) end

local moveList = function (args) local vs = moveList_lua(args[1]) List.map_self(vs, function (v) return v.WikiName end) return table.concat(vs, ',') end

local weaponList = function (args) local vs = weaponList_lua(args[1]) List.map_self(vs, function (v) return v.WikiName end) return table.concat(vs, ',') end

local icons = function (args) local icons = {} for _, v in ipairs(moveList_lua(args.canUseMove)) do		icons[#icons + 1] = (''):format(v.WikiName, v.Name, v.Name) end for _, v in ipairs(weaponList_lua(args.canUseWeapon)) do		icons[#icons + 1] = (''):format(v.WikiName, v.Name, v.Name) end return table.concat(icons, '') end

return require 'Module:MakeMWModule'.makeMWModule { moveList = moveList, weaponList = weaponList, icons = icons, }