Module:Sandbox/Leranjun/achievements
< Module:Sandbox | Leranjun
跳到导航
跳到搜索
-- Module:Sandbox/Leranjun/achievements -- Made with ♥ by User:Leranjun local p = {} local getArgs = require("Module:Arguments").getArgs local generate = require("Module:Sandbox/Leranjun/achievements/single").generate local LIST = mw.loadData("Module:Sandbox/Leranjun/achievements/list") function p.main(frame) local styles = frame:extensionTag("templatestyles", "", {src = "User:Leranjun/achievements/styles.css"}) return styles .. p._main(getArgs(frame)) end function p._main(args) local r = "" local box = mw.html.create("div"):addClass("lr-achieve-box") local set = {} local i = 1 while (args[i]) do set[LIST[args[i]]] = args[i] i = i + 1 end for i = 1, LIST[1] do if (set[i]) then r = r .. generate(set[i], args[set[i] .. "-time"]) end end r = tostring(box:node(r)) return r end return p