跳到内容

Module:Arcaea Data:修订间差异

添加1,703字节 、​ 2024年3月12日 (星期二)
按 ratingPlus 查找难度,并增加 etr 难度支持
(非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 info["difficulties"][1]['chartDesigner']
          return difficulties[0]['chartDesigner']
        end
        end
        end,
        end,
        ["pstJacketDesigner"] = function()
        ["pstJacketDesigner"] = function()
        if info["difficulties"] then
        if info["difficulties"] then
          return info["difficulties"][1]['jacketDesigner']
          return difficulties[0]['jacketDesigner']
          end
          end
        end,
        end,
        ["pstRating"] = function()
        ["pstRating"] = function()
          if info["difficulties"][1]['ratingPlus'] then
          if difficulties[0]['ratingPlus'] then
            return info["difficulties"][1]['rating'] .. '+'
            return difficulties[0]['rating'] .. '+'
          else
          else
            return info["difficulties"][1]['rating']
            return difficulties[0]['rating']
          end
          end
        end,
        end,
        ["prsChartDesigner"] = function()
        ["prsChartDesigner"] = function()
        if info["difficulties"] then
        if info["difficulties"] then
          return info["difficulties"][2]['chartDesigner']
          return difficulties[1]['chartDesigner']
          end
          end
        end,
        end,
        ["prsJacketDesigner"] = function()
        ["prsJacketDesigner"] = function()
        if info["difficulties"] then
        if info["difficulties"] then
          return info["difficulties"][2]['jacketDesigner']
          return difficulties[1]['jacketDesigner']
          end
          end
        end,
        end,
        ["prsRating"] = function()
        ["prsRating"] = function()
          if info["difficulties"][2]['ratingPlus'] then
          if difficulties[1]['ratingPlus'] then
            return info["difficulties"][2]['rating'] .. '+'
            return difficulties[1]['rating'] .. '+'
          else
          else
            return info["difficulties"][2]['rating']
            return difficulties[1]['rating']
          end
          end
        end,
        end,
        ["ftrChartDesigner"] = function()
        ["ftrChartDesigner"] = function()
        if info["difficulties"] then
        if info["difficulties"] then
          return info["difficulties"][3]['chartDesigner']
          return difficulties[2]['chartDesigner']
          end
          end
        end,
        end,
        ["ftrJacketDesigner"] = function()
        ["ftrJacketDesigner"] = function()
        if info["difficulties"] then
        if info["difficulties"] then
          return info["difficulties"][3]['jacketDesigner']
          return difficulties[2]['jacketDesigner']
          end
          end
        end,
        end,
        ["ftrRating"] = function()
        ["ftrRating"] = function()
        if info["difficulties"] then
        if info["difficulties"] then
         if info["difficulties"][3]['ratingPlus'] then
         if difficulties[2]['ratingPlus'] then
           return info["difficulties"][3]['rating'] .. '+'
           return difficulties[2]['rating'] .. '+'
         else
         else
           return info["difficulties"][3]['rating']
           return difficulties[2]['rating']
         end
         end
       end
       end
        end,
        end,
        ["bydChartDesigner"] = function()
        ["bydChartDesigner"] = function()
          if info["difficulties"] and info["difficulties"][4] then
          if info["difficulties"] and difficulties[3] then
            return info["difficulties"][4]['chartDesigner']
            return difficulties[3]['chartDesigner']
          end
          end
        end,
        end,
        ["bydJacketDesigner"] = function()
        ["bydJacketDesigner"] = function()
          if info["difficulties"] and info["difficulties"][4] then
          if info["difficulties"] and difficulties[3] then
            return info["difficulties"][4]['jacketDesigner']
            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 info["difficulties"][4]['ratingPlus'] then
         if difficulties[3]['ratingPlus'] then
           return info["difficulties"][4]['rating'] .. '+'
           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 info["difficulties"][4]['rating']
           return difficulties[4]['rating']
         end
         end
          end
          end
        end,
        end,
        ["pstChange"] = function()
        ["pstChange"] = function()
          if info["difficulties"] and info["difficulties"][1] then
          if info["difficulties"] and difficulties[0] then
            return info["difficulties"][1]['has_controller_alt_chart']
            return difficulties[0]['has_controller_alt_chart']
          end
          end
        end,
        end,
        ["prsChange"] = function()
        ["prsChange"] = function()
          if info["difficulties"] and info["difficulties"][2] then
          if info["difficulties"] and difficulties[1] then
            return info["difficulties"][2]['has_controller_alt_chart']
            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"][3]['has_controller_alt_chart']
           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 info["difficulties"][4] then
          if info["difficulties"] and difficulties[3] then
            return info["difficulties"][4]['audioOverride']
            return difficulties[3]['audioOverride']
          end
          end
        end,
        end,
        ["bydBg"] = function()
        ["bydBg"] = function()
          if info["difficulties"] and info["difficulties"][4] then
          if info["difficulties"] and difficulties[3] then
            return info["difficulties"][4]['bg']
            return difficulties[3]['bg']
          end
          end
        end,
        end,
        ["bydBPM"] = function()
        ["bydBPM"] = function()
          if info["difficulties"] and info["difficulties"][4] then
          if info["difficulties"] and difficulties[3] then
            return info["difficulties"][4]['bpm']
            return difficulties[3]['bpm']
          end
          end
        end,
        end,
        ["bydArtist"] = function()
        ["bydArtist"] = function()
          if info["difficulties"] and info["difficulties"][4] then
          if info["difficulties"] and difficulties[3] then
            return info["difficulties"][4]['artist']
            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 info[index]["difficulties"][1] then
        if difficulties[0] then
          return info[index]["difficulties"][1]['chartDesigner']
          return difficulties[0]['chartDesigner']
          else
          else
          return "PST谱师暂缺"
          return "PST谱师暂缺"
第298行: 第339行:
        end,
        end,
        ["pstJacketDesigner"] = function()
        ["pstJacketDesigner"] = function()
          return info[index]["difficulties"][1]['jacketDesigner']
          return difficulties[0]['jacketDesigner']
        end,
        end,
        ["pstRating"] = function()
        ["pstRating"] = function()
          if info[index]["difficulties"][1]['ratingPlus'] then
          if difficulties[0]['ratingPlus'] then
            return info[index]["difficulties"][1]['rating'] .. '+'
            return difficulties[0]['rating'] .. '+'
          else
          else
            return info[index]["difficulties"][1]['rating']
            return difficulties[0]['rating']
          end
          end
        end,
        end,
        ["prsChartDesigner"] = function()
        ["prsChartDesigner"] = function()
          return info[index]["difficulties"][2]['chartDesigner']
          return difficulties[1]['chartDesigner']
        end,
        end,
        ["prsJacketDesigner"] = function()
        ["prsJacketDesigner"] = function()
          return info[index]["difficulties"][2]['jacketDesigner']
          return difficulties[1]['jacketDesigner']
        end,
        end,
        ["prsRating"] = function()
        ["prsRating"] = function()
          if info[index]["difficulties"][2]['ratingPlus'] then
          if difficulties[1]['ratingPlus'] then
            return info[index]["difficulties"][2]['rating'] .. '+'
            return difficulties[1]['rating'] .. '+'
          else
          else
            return info[index]["difficulties"][2]['rating']
            return difficulties[1]['rating']
          end
          end
        end,
        end,
        ["ftrChartDesigner"] = function()
        ["ftrChartDesigner"] = function()
          return info[index]["difficulties"][3]['chartDesigner']
          return difficulties[2]['chartDesigner']
        end,
        end,
        ["ftrJacketDesigner"] = function()
        ["ftrJacketDesigner"] = function()
          return info[index]["difficulties"][3]['jacketDesigner']
          return difficulties[2]['jacketDesigner']
        end,
        end,
        ["ftrRating"] = function()
        ["ftrRating"] = function()
          if info[index]["difficulties"][3]['ratingPlus'] then
          if difficulties[2]['ratingPlus'] then
            return info[index]["difficulties"][3]['rating'] .. '+'
            return difficulties[2]['rating'] .. '+'
          else
          else
            return info[index]["difficulties"][3]['rating']
            return difficulties[2]['rating']
          end
          end
        end,
        end,
        ["bydChartDesigner"] = function()
        ["bydChartDesigner"] = function()
          if info[index]["difficulties"][4] then
          if difficulties[3] then
            return info[index]["difficulties"][4]['chartDesigner']
            return difficulties[3]['chartDesigner']
          end
          end
        end,
        end,
        ["bydJacketDesigner"] = function()
        ["bydJacketDesigner"] = function()
          if info[index]["difficulties"][4] then
          if difficulties[3] then
            return info[index]["difficulties"][4]['jacketDesigner']
            return difficulties[3]['jacketDesigner']
          end
          end
        end,
        end,
        ["bydRating"] = function()
        ["bydRating"] = function()
          if info[index]["difficulties"][4]['ratingPlus'] then
          if difficulties[3]['ratingPlus'] then
            return info[index]["difficulties"][4]['rating'] .. '+'
           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 info[index]["difficulties"][4]['rating']
            return difficulties[4]['rating']
          end
          end
        end,
        end,
        ["pstChange"] = function()
        ["pstChange"] = function()
          if info[index]["difficulties"][1] then
          if difficulties[0] then
            return info[index]["difficulties"][1]['has_controller_alt_chart']
            return difficulties[0]['has_controller_alt_chart']
          end
          end
        end,
        end,
        ["prsChange"] = function()
        ["prsChange"] = function()
          if info[index]["difficulties"][2] then
          if difficulties[1] then
            return info[index]["difficulties"][2]['has_controller_alt_chart']
            return difficulties[1]['has_controller_alt_chart']
          end
          end
        end,
        end,
        ["ftrChange"] = function()
        ["ftrChange"] = function()
          if info[index]["difficulties"][3] then
          if difficulties[2] then
            return info[index]["difficulties"][3]['has_controller_alt_chart']
           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 info[index]["difficulties"][4] then
          if difficulties[3] then
            return info[index]["difficulties"][4]['audioOverride']
            return difficulties[3]['audioOverride']
          end
          end
        end,
        end,
        ["bydBg"] = function()
        ["bydBg"] = function()
          if info[index]["difficulties"][4] then
          if difficulties[3] then
            return info[index]["difficulties"][4]['bg']
            return difficulties[3]['bg']
          end
          end
        end,
        end,
        ["bydBPM"] = function()
        ["bydBPM"] = function()
          if info[index]["difficulties"][4] then
          if difficulties[3] then
            return info[index]["difficulties"][4]['bpm']
            return difficulties[3]['bpm']
          end
          end
        end,
        end,
        ["bydArtist"] = function()
        ["bydArtist"] = function()
          if info[index]["difficulties"][4] then
          if difficulties[3] then
            return info[index]["difficulties"][4]['artist']
            return difficulties[3]['artist']
          end
          end
        end
        end
1,554

个编辑