1,554
个编辑
(非FTR难度的ratingPlus处理) |
(按 ratingPlus 查找难度,并增加 etr 难度支持) |
||
第73行: | 第73行: | ||
mw.log( '无法在Songlist中发现目标,索引值为:'..index ) | mw.log( '无法在Songlist中发现目标,索引值为:'..index ) | ||
return nil | return nil | ||
end | |||
local difficulties={} | |||
for _, difficulty in ipairs(info["difficulties"]) do | |||
difficulties[difficulty["ratingClass"]] = difficulty | |||
end | end | ||
第102行: | 第108行: | ||
["pstChartDesigner"] = function() | ["pstChartDesigner"] = function() | ||
if info["difficulties"] then | if info["difficulties"] then | ||
return | return difficulties[0]['chartDesigner'] | ||
end | end | ||
end, | end, | ||
["pstJacketDesigner"] = function() | ["pstJacketDesigner"] = function() | ||
if info["difficulties"] then | if info["difficulties"] then | ||
return | return difficulties[0]['jacketDesigner'] | ||
end | end | ||
end, | end, | ||
["pstRating"] = function() | ["pstRating"] = function() | ||
if | if difficulties[0]['ratingPlus'] then | ||
return | return difficulties[0]['rating'] .. '+' | ||
else | else | ||
return | return difficulties[0]['rating'] | ||
end | end | ||
end, | end, | ||
["prsChartDesigner"] = function() | ["prsChartDesigner"] = function() | ||
if info["difficulties"] then | if info["difficulties"] then | ||
return | return difficulties[1]['chartDesigner'] | ||
end | end | ||
end, | end, | ||
["prsJacketDesigner"] = function() | ["prsJacketDesigner"] = function() | ||
if info["difficulties"] then | if info["difficulties"] then | ||
return | return difficulties[1]['jacketDesigner'] | ||
end | end | ||
end, | end, | ||
["prsRating"] = function() | ["prsRating"] = function() | ||
if | if difficulties[1]['ratingPlus'] then | ||
return | return difficulties[1]['rating'] .. '+' | ||
else | else | ||
return | return difficulties[1]['rating'] | ||
end | end | ||
end, | end, | ||
["ftrChartDesigner"] = function() | ["ftrChartDesigner"] = function() | ||
if info["difficulties"] then | if info["difficulties"] then | ||
return | return difficulties[2]['chartDesigner'] | ||
end | end | ||
end, | end, | ||
["ftrJacketDesigner"] = function() | ["ftrJacketDesigner"] = function() | ||
if info["difficulties"] then | if info["difficulties"] then | ||
return | return difficulties[2]['jacketDesigner'] | ||
end | end | ||
end, | end, | ||
["ftrRating"] = function() | ["ftrRating"] = function() | ||
if info["difficulties"] then | if info["difficulties"] then | ||
if | if difficulties[2]['ratingPlus'] then | ||
return | return difficulties[2]['rating'] .. '+' | ||
else | else | ||
return | return difficulties[2]['rating'] | ||
end | end | ||
end | end | ||
end, | end, | ||
["bydChartDesigner"] = function() | ["bydChartDesigner"] = function() | ||
if info["difficulties"] and | if info["difficulties"] and difficulties[3] then | ||
return | return difficulties[3]['chartDesigner'] | ||
end | end | ||
end, | end, | ||
["bydJacketDesigner"] = function() | ["bydJacketDesigner"] = function() | ||
if info["difficulties"] and | if info["difficulties"] and difficulties[3] then | ||
return | return difficulties[3]['jacketDesigner'] | ||
end | end | ||
end, | end, | ||
["bydRating"] = function() | ["bydRating"] = function() | ||
if info["difficulties"] and info["difficulties"][4] then | if info["difficulties"] and difficulties[3] then | ||
if difficulties[3]['ratingPlus'] then | |||
return difficulties[3]['rating'] .. '+' | |||
else | |||
return difficulties[3]['rating'] | |||
end | |||
end | |||
end, | |||
["etrChartDesigner"] = function() | |||
if info["difficulties"] and difficulties[4] then | |||
return difficulties[4]['chartDesigner'] | |||
end | |||
end, | |||
["etrJacketDesigner"] = function() | |||
if info["difficulties"] and difficulties[4] then | |||
return difficulties[4]['jacketDesigner'] | |||
end | |||
end, | |||
["etrRating"] = function() | |||
if info["difficulties"] and difficulties[4] then | |||
if difficulties[4]['ratingPlus'] then | |||
return difficulties[4]['rating'] .. '+' | |||
else | else | ||
return | return difficulties[4]['rating'] | ||
end | end | ||
end | end | ||
end, | end, | ||
["pstChange"] = function() | ["pstChange"] = function() | ||
if info["difficulties"] and | if info["difficulties"] and difficulties[0] then | ||
return | return difficulties[0]['has_controller_alt_chart'] | ||
end | end | ||
end, | end, | ||
["prsChange"] = function() | ["prsChange"] = function() | ||
if info["difficulties"] and | if info["difficulties"] and difficulties[1] then | ||
return | return difficulties[1]['has_controller_alt_chart'] | ||
end | end | ||
end, | end, | ||
["ftrChange"] = function() | ["ftrChange"] = function() | ||
if info["difficulties"] and info["difficulties"][3] then | if info["difficulties"] and difficulties[2] then | ||
return info["difficulties"][ | return difficulties[2]['has_controller_alt_chart'] | ||
end | |||
end, | |||
["bydChange"] = function() | |||
if info["difficulties"] and difficulties[3] then | |||
return difficulties[2]['has_controller_alt_chart'] | |||
end | |||
end, | |||
["etrChange"] = function() | |||
if info["difficulties"] and difficulties[4] then | |||
return difficulties[2]['has_controller_alt_chart'] | |||
end | end | ||
end, | end, | ||
["bydAudioChange"] = function() | ["bydAudioChange"] = function() | ||
if info["difficulties"] and | if info["difficulties"] and difficulties[3] then | ||
return | return difficulties[3]['audioOverride'] | ||
end | end | ||
end, | end, | ||
["bydBg"] = function() | ["bydBg"] = function() | ||
if info["difficulties"] and | if info["difficulties"] and difficulties[3] then | ||
return | return difficulties[3]['bg'] | ||
end | end | ||
end, | end, | ||
["bydBPM"] = function() | ["bydBPM"] = function() | ||
if info["difficulties"] and | if info["difficulties"] and difficulties[3] then | ||
return | return difficulties[3]['bpm'] | ||
end | end | ||
end, | end, | ||
["bydArtist"] = function() | ["bydArtist"] = function() | ||
if info["difficulties"] and | if info["difficulties"] and difficulties[3] then | ||
return | return difficulties[3]['artist'] | ||
end | end | ||
end | end | ||
第263行: | 第298行: | ||
mw.log( '无法在Songlist中发现目标,索引值为:'..index ) | mw.log( '无法在Songlist中发现目标,索引值为:'..index ) | ||
return nil | return nil | ||
end | |||
local difficulties={} | |||
for _, difficulty in ipairs(info[index]["difficulties"]) do | |||
difficulties[difficulty["ratingClass"]] = difficulty | |||
end | end | ||
第282行: | 第323行: | ||
return 'base_light' | return 'base_light' | ||
else | else | ||
if info[index]['side'] ==1 then | if info[index]['side'] == 1 then | ||
return 'base_conflict' | return 'base_conflict' | ||
else | else | ||
第291行: | 第332行: | ||
end, | end, | ||
["pstChartDesigner"] = function() | ["pstChartDesigner"] = function() | ||
if | if difficulties[0] then | ||
return | return difficulties[0]['chartDesigner'] | ||
else | else | ||
return "PST谱师暂缺" | return "PST谱师暂缺" | ||
第298行: | 第339行: | ||
end, | end, | ||
["pstJacketDesigner"] = function() | ["pstJacketDesigner"] = function() | ||
return | return difficulties[0]['jacketDesigner'] | ||
end, | end, | ||
["pstRating"] = function() | ["pstRating"] = function() | ||
if | if difficulties[0]['ratingPlus'] then | ||
return | return difficulties[0]['rating'] .. '+' | ||
else | else | ||
return | return difficulties[0]['rating'] | ||
end | end | ||
end, | end, | ||
["prsChartDesigner"] = function() | ["prsChartDesigner"] = function() | ||
return | return difficulties[1]['chartDesigner'] | ||
end, | end, | ||
["prsJacketDesigner"] = function() | ["prsJacketDesigner"] = function() | ||
return | return difficulties[1]['jacketDesigner'] | ||
end, | end, | ||
["prsRating"] = function() | ["prsRating"] = function() | ||
if | if difficulties[1]['ratingPlus'] then | ||
return | return difficulties[1]['rating'] .. '+' | ||
else | else | ||
return | return difficulties[1]['rating'] | ||
end | end | ||
end, | end, | ||
["ftrChartDesigner"] = function() | ["ftrChartDesigner"] = function() | ||
return | return difficulties[2]['chartDesigner'] | ||
end, | end, | ||
["ftrJacketDesigner"] = function() | ["ftrJacketDesigner"] = function() | ||
return | return difficulties[2]['jacketDesigner'] | ||
end, | end, | ||
["ftrRating"] = function() | ["ftrRating"] = function() | ||
if | if difficulties[2]['ratingPlus'] then | ||
return | return difficulties[2]['rating'] .. '+' | ||
else | else | ||
return | return difficulties[2]['rating'] | ||
end | end | ||
end, | end, | ||
["bydChartDesigner"] = function() | ["bydChartDesigner"] = function() | ||
if | if difficulties[3] then | ||
return | return difficulties[3]['chartDesigner'] | ||
end | end | ||
end, | end, | ||
["bydJacketDesigner"] = function() | ["bydJacketDesigner"] = function() | ||
if | if difficulties[3] then | ||
return | return difficulties[3]['jacketDesigner'] | ||
end | end | ||
end, | end, | ||
["bydRating"] = function() | ["bydRating"] = function() | ||
if | if difficulties[3]['ratingPlus'] then | ||
return | return difficulties[3]['rating'] .. '+' | ||
else | |||
return difficulties[3]['rating'] | |||
end | |||
end, | |||
["etrChartDesigner"] = function() | |||
if difficulties[4] then | |||
return difficulties[4]['chartDesigner'] | |||
end | |||
end, | |||
["etrJacketDesigner"] = function() | |||
if difficulties[4] then | |||
return difficulties[4]['jacketDesigner'] | |||
end | |||
end, | |||
["etrRating"] = function() | |||
if difficulties[4]['ratingPlus'] then | |||
return difficulties[4]['rating'] .. '+' | |||
else | else | ||
return | return difficulties[4]['rating'] | ||
end | end | ||
end, | end, | ||
["pstChange"] = function() | ["pstChange"] = function() | ||
if | if difficulties[0] then | ||
return | return difficulties[0]['has_controller_alt_chart'] | ||
end | end | ||
end, | end, | ||
["prsChange"] = function() | ["prsChange"] = function() | ||
if | if difficulties[1] then | ||
return | return difficulties[1]['has_controller_alt_chart'] | ||
end | end | ||
end, | end, | ||
["ftrChange"] = function() | ["ftrChange"] = function() | ||
if | if difficulties[2] then | ||
return | return difficulties[2]['has_controller_alt_chart'] | ||
end | |||
end, | |||
["bydChange"] = function() | |||
if difficulties[3] then | |||
return difficulties[3]['has_controller_alt_chart'] | |||
end | |||
end, | |||
["etrChange"] = function() | |||
if difficulties[4] then | |||
return difficulties[4]['has_controller_alt_chart'] | |||
end | end | ||
end, | end, | ||
["bydAudioChange"] = function() | ["bydAudioChange"] = function() | ||
if | if difficulties[3] then | ||
return | return difficulties[3]['audioOverride'] | ||
end | end | ||
end, | end, | ||
["bydBg"] = function() | ["bydBg"] = function() | ||
if | if difficulties[3] then | ||
return | return difficulties[3]['bg'] | ||
end | end | ||
end, | end, | ||
["bydBPM"] = function() | ["bydBPM"] = function() | ||
if | if difficulties[3] then | ||
return | return difficulties[3]['bpm'] | ||
end | end | ||
end, | end, | ||
["bydArtist"] = function() | ["bydArtist"] = function() | ||
if | if difficulties[3] then | ||
return | return difficulties[3]['artist'] | ||
end | end | ||
end | end |
个编辑