6,571
个编辑
(创建页面,内容为“local getArgs = require('Module:Arguments').getArgs local p = {} local function makeInvokeFunc(funcName) return function (frame) local args = getArgs(frame) r…”) |
小无编辑摘要 |
||
第10行: | 第10行: | ||
end | end | ||
p. | p.pack = makeInvokeFunc('_pack') | ||
function p. | function p._pack(args) | ||
local json=require("Module:LoadJson").Packlist() | |||
for i,k in ipairs(json) do | |||
if k['id']==args[1] then | |||
return k['name_localized']['en'] | |||
end | |||
end | |||
end | |||
p.unlock = makeInvokeFunc('_unlock') | |||
function p._unlock(args) | |||
local json=require("Module:LoadJson").unlocks() | |||
local result={} | |||
for i,k in ipairs(json) do | |||
if k['songId']==args[1] then | |||
result[tonumber(k['ratingClass']+1)]=k['conditions'] | |||
end | |||
end | |||
return result | |||
end | |||
p.song = makeInvokeFunc('_song') | |||
function p._song(args) | |||
local json=require("Module:LoadJson").Songlist() | local json=require("Module:LoadJson").Songlist() | ||
local s,list="",{} | local s,list="",{} | ||
第71行: | 第95行: | ||
end, | end, | ||
["bydChartDesigner"] = function() | ["bydChartDesigner"] = function() | ||
if list[args[2]]["difficulties"][4] then | |||
return list[args[2]]["difficulties"][4]['chartDesigner'] | |||
end | |||
end, | end, | ||
["bydJacketDesigner"] = function() | ["bydJacketDesigner"] = function() | ||
if list[args[2]]["difficulties"][4] then | |||
return list[args[2]]["difficulties"][4]['jacketDesigner'] | |||
end | |||
end, | end, | ||
["bydRating"] = function() | ["bydRating"] = function() | ||
if list[args[2]]["difficulties"][4] then | |||
end | return list[args[2]]["difficulties"][4]['rating'] | ||
end | |||
end | |||
} | } | ||