Module:Sandbox/AnataBakka2

-- local p   = {}

local skinData = mw.loadData('Module:SkinData/data') local lib      = require('Module:Feature') local json     = require('Module:JSON') local cmd      = require('Module:Maintenance data') local userError = require('Dev:User error') local IL       = require('Module:ImageLink')

function p.get(frame) local args; if frame.args == nil then args = lib.arguments(frame) else args = lib.arguments(frame.args) end local set=args[1] or nil local s="" local championtable = {} for championname in pairs(skinData) do       championtable[championname]={} for skinname in pairs(skinData[championname]["skins"]) do           if skinData[championname]["skins"]["set"]==set then table.insert(championtable[championname], skinname) end end end for championname,skinname in pairs(championtable) do       s=s..skinname.." " end return s end

function csl(champion,skin, frame) return frame:expandTemplate{ title = "csl", args = {champion,skin} } end

function comp(a,b) if a[1]==b[1] then return a[2]<b[2] else return a[1]<b[1] end end return p --