Module:Sandbox/ChartConstant:修订间差异
DrLee lihr(讨论 | 贡献) (创建页面,内容为“local p = {} local json = require("Module:LoadJson").ChartConstant() local songlist = require("Module:LoadJson").Songlist() function cv() local list = {} for i,k in pairs(songlist['songs']) do list[k['id']] = k['title_localized']['en'] end return list end function p.main() local list = {} local name local cvList = cv() for i, k in pairs(json) do if k[2] or k[3] or k[4] then name = cvList[i] end if k[2] and tonumb…”) |
DrLee lihr(讨论 | 贡献) 无编辑摘要 |
||
第1行: | 第1行: | ||
<includeonly> | |||
local p = {} | local p = {} | ||
local json = require("Module:LoadJson").ChartConstant() | local json = require("Module:LoadJson").ChartConstant() | ||
第24行: | 第25行: | ||
end | end | ||
if k[2] and tonumber(k[2]['constant'])>=8 and not(k[2]['old']) then | if k[2] and tonumber(k[2]['constant'])>=8 and not(k[2]['old']) then | ||
table.insert(list, { i, name, k[2]['constant'], "PRS" }) | table.insert(list, { i, name, k[2]['constant'], "PRS", name }) | ||
end | end | ||
if k[3] and tonumber(k[3]['constant'])>=8 and not(k[3]['old']) then | if k[3] and tonumber(k[3]['constant'])>=8 and not(k[3]['old']) then | ||
table.insert(list, { i, name, k[3]['constant'], "FTR" }) | table.insert(list, { i, name, k[3]['constant'], "FTR", name }) | ||
end | end | ||
if k[4] and tonumber(k[4]['constant'])>=8 and not(k[4]['old']) then | if k[4] and tonumber(k[4]['constant'])>=8 and not(k[4]['old']) then | ||
local name1 = name | |||
for m,n in pairs(songlist['songs']) | for m,n in pairs(songlist['songs']) | ||
do | do | ||
第37行: | 第39行: | ||
end | end | ||
end | end | ||
table.insert(list, { i, name, k[4]['constant'], "BYD" }) | table.insert(list, { i, name, k[4]['constant'], "BYD", name1 }) | ||
end | end | ||
end | end | ||
第49行: | 第51行: | ||
then | then | ||
if not(result[k[3]]) then result[k[3]]={} end | if not(result[k[3]]) then result[k[3]]={} end | ||
table.insert(result[k[3]],mw.getCurrentFrame():expandTemplate { title = 'User:DrLee_lihr/sandbox/组排单元', args = { k[2], k[1], k[4] | table.insert(result[k[3]],mw.getCurrentFrame():expandTemplate { title = 'User:DrLee_lihr/sandbox/组排单元', args = { k[2], k[1], k[4], link=k[5] } } ) | ||
else | else | ||
if k[3]<12 | if k[3]<12 | ||
第96行: | 第98行: | ||
return p | return p | ||
</includeonly> |