Module:Sandbox/ChartConstant:修订间差异

添加256字节 、​ 2022年7月10日 (星期日)
fix link
无编辑摘要
(fix link)
第2行: 第2行:
local chartConstantList = require("Module:LoadJson").ChartConstant()
local chartConstantList = require("Module:LoadJson").ChartConstant()
local songlist = require("Module:LoadJson").Songlist()
local songlist = require("Module:LoadJson").Songlist()




第12行: 第13行:
return list
return list
end
end
local specialSongNameConverter = {}
specialSongNameConverter["#1f1e33"]="#1f1e33"
specialSongNameConverter["AI[UE]OON"]="AI[UE]OON"




第22行: 第28行:
    name = cvList[i]
    name = cvList[i]
    end
    end
     local link = name
     if specialSongNameConverter[name] then
       link = specialSongNameConverter[name]
     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", name })
    table.insert(list, { i, name, k[2]['constant'], "PRS", link })
    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", name })
    table.insert(list, { i, name, k[3]['constant'], "FTR", link })
    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 l,v in pairs(songlist["songs"]) do
    for i,v in ipairs(songlist["songs"]) do
    if v["title_localized"]["en"] == name then
    if v["title_localized"]["en"] == name then
    if v["difficulties"][4] then
    if v["difficulties"][4] then
    if v["difficulties"][4]['title_localized'] then
    if v["difficulties"][4]['title_localized'] then
    name = v["difficulties"][4]['title_localized']['en']
    link = v["difficulties"][4]['title_localized']['en']
break
end
end
end
end
           break
    end
    end
    end
    end
    table.insert(list, { i, name, k[4]['constant'], "BYD", name1 })
    table.insert(list, { i, name, k[4]['constant'], "BYD", link })
    end
    end
    end
    end
134

个编辑