372
个编辑
无编辑摘要 |
无编辑摘要 |
||
第15行: | 第15行: | ||
for _,diffInf in ipairs(songInf["difficulties"]) | for _,diffInf in ipairs(songInf["difficulties"]) | ||
do | do | ||
if diffInf["ratingClass"] ~= 0 | if diffInf["ratingClass"] ~= 0 and diffInf["ratingClass"] ~= 1 | ||
then | then | ||
if diffInf["ratingReal"] == 2 then ratingClass = "难度III" else ratingClass = "难度IV" end | if diffInf["ratingReal"] == 2 then ratingClass = "难度III" else ratingClass = "难度IV" end | ||
第71行: | 第71行: | ||
local listReplyB = {} | local listReplyB = {} | ||
local tableC | |||
for s, k in pairs(listReplyA) do | for s, k in pairs(listReplyA) do | ||
tableC = {} | |||
for _, m in pairs(k) do | for _, m in pairs(k) do | ||
table.insert( | table.insert(tableC, mw.getCurrentFrame():expandTemplate { title = '组排单元', args = { m[2], m[1], m[3]} } ) | ||
end | end | ||
table.insert(listReplyB, {s, tableC} ) | |||
end | end | ||
tableC = nil | |||
table.sort(listReplyB, function(a, b) return a[1] > b[1] end) | |||
local finText = "<div class='notaninfobox dstable'>\n" | local finText = "<div class='notaninfobox dstable'>\n" | ||
for | for _,k in pairs(listReplyB) | ||
do | do | ||
finText = finText .. "<div class='ds'>"..string.format("%.1f", | finText = finText .. "<div class='ds'>"..string.format("%.1f", k[1]).."</div>\n" | ||
finText = finText .. "<div class='number'>"..mw.getCurrentFrame():expandTemplate { title = '组排列' } | finText = finText .. "<div class='number'>"..mw.getCurrentFrame():expandTemplate { title = '组排列' } | ||
..table.concat(k)..mw.getCurrentFrame():expandTemplate { title = '组排列-end' }.."</div>\n" | ..table.concat(k[2])..mw.getCurrentFrame():expandTemplate { title = '组排列-end' }.."</div>\n" | ||
end | end | ||