跳到内容

Module:Songtable:修订间差异

删除768字节 、​ 2024年3月12日 (星期二)
重构,移除infoList的下标引用
(ns 版 byd 谱面更新时间处理(目前先假定byd谱面一定与通常难度谱面一同更新))
(重构,移除infoList的下标引用)
第248行: 第248行:
      [3] = 
      [3] = 
      {'mobile', 'FutureNote编写', 'note编写', 'ftrChartDesigner'},
      {'mobile', 'FutureNote编写', 'note编写', 'ftrChartDesigner'},
   [4] = 
     [4] = 
      {'mobile', 'BeyondNote编写', 'note编写', 'bydChartDesigner'}}
      {'mobile', 'BeyondNote编写', 'note编写', 'bydChartDesigner'}}


第282行: 第282行:
    -- 生成Grid表格的信息表;在后文中依据格式进行生成。
    -- 生成Grid表格的信息表;在后文中依据格式进行生成。
    -- 
    -- 
   local pstRating = args['Past等级'] or data('pstRating')
   local prsRating = args['Present等级'] or data('prsRating')
   local ftrRating = args['Future等级'] or data('ftrRating')
   local bydRating = args['Beyond等级'] or data('bydRating')
    local infoList = {
    local infoList = {
     [1] =
      { title(args['曲名'] or data('title') or dataNs('title'), args['第二曲名'], data('id') or dataNs('id') or #args > 1), { id = 'title'}},
      { title(args['曲名'] or data('title') or dataNs('title'), args['第二曲名'], data('id') or dataNs('id') or #args > 1), { id = 'title'}},
     [2] =
      { imageA or choice('[[文件:Songs '..tostring(data('id')) .. '.jpg|点此上传图片]]', data('id'), '[[文件:Songs '..tostring(dataNs('id')) .. '.jpg|点此上传图片]]', dataNs('id')), { id = 'top-image'}},
      { imageA or choice('[[文件:Songs '..tostring(data('id')) .. '.jpg|点此上传图片]]', data('id'), '[[文件:Songs '..tostring(dataNs('id')) .. '.jpg|点此上传图片]]', dataNs('id')), { id = 'top-image'}},
     [3] =
      { imageB or choice('[[文件:Songs '..tostring(data('id')) .. '.jpg|点此上传图片]]', data('id'), '[[文件:Songs '..tostring(dataNs('id')) .. '.jpg|点此上传图片]]', dataNs('id')), { id = 'right-image'}},
      { imageB or choice('[[文件:Songs '..tostring(data('id')) .. '.jpg|点此上传图片]]', data('id'), '[[文件:Songs '..tostring(dataNs('id')) .. '.jpg|点此上传图片]]', dataNs('id')), { id = 'right-image'}},
     [4] =
      { '曲目信息', {class = 'header'} },
      { '曲目信息', {class = 'header'} },
     [5] =
      { '曲师', { class = 'label'}},
      { '曲师', { class = 'label'}},
     [6] =
      { args['编曲'] or choice(link({'曲师', tostring(data('artist'))}) or link({'曲师', tostring(dataNs('artist'))}), data('artist') or dataNs('artist'), '', true), { class = 'data'}},
      { args['编曲'] or choice(link({'曲师', tostring(data('artist'))}) or link({'曲师', tostring(dataNs('artist'))}), data('artist') or dataNs('artist'), '', true), { class = 'data'}},
     [7] =
      { '曲包', { class = 'label'}},
      { '曲包', { class = 'label'}},
     [8] =
      { args['曲包'] or choice('[['..tostring(choice(getData.packName(data('set')), data('set'), getData.packName(dataNs('set')), dataNs('set')))..']]',data('set') or dataNs('set'),'',true), { class = 'data'}},
      { args['曲包'] or choice('[['..tostring(choice(getData.packName(data('set')), data('set'), getData.packName(dataNs('set')), dataNs('set')))..']]',data('set') or dataNs('set'),'',true), { class = 'data'}},
     [9] =
      { '时长', { class = 'label'}},
      { '时长', { class = 'label'}},
     [10] =
      { args['时长'] or '空', { class = 'data'}},
      { args['时长'] or '空', { class = 'data'}},
     [11] =
      { 'BPM', { class = 'label'}},
      { 'BPM', { class = 'label'}},
     [12] =
      { args['BPM'] or data('bpm') or dataNs('bpm'), { class = 'data'}},
      { args['BPM'] or data('bpm') or dataNs('bpm'), { class = 'data'}},
     [13] =
      { '谱面信息', { class = 'header'}},
      { '谱面信息', { class = 'header'}},
     [14] =
      { '难度', { class = 'label'}},
      { '难度', { class = 'label'}},
     [15] =
      { '[Past]', { class = 'pst-label'}},
      { '[Past]', { class = 'pst-label'}},
     [16] =
      { '[Present]', { class = 'prs-label'}},
      { '[Present]', { class = 'prs-label'}},
     [17] =
      { '[Future]', { class = 'ftr-label'}},
      { '[Future]', { class = 'ftr-label'}},
     [18] =
      { bydMark(byd, args['曲名'], inNs, nsByd), { class = 'byd-label'}},
      { bydMark(byd, args['曲名'], inNs, nsByd), { class = 'byd-label'}},
     [19] =
      { '等级', { class = 'label'}},
      { '等级', { class = 'label'}},
     [20] =
      { pstRating, { class = 'pst-data'}},
      { args['Past等级'] or data('pstRating'), { class = 'pst-data'}},
      { prsRating, { class = 'prs-data'}},
     [21] =
      { ftrRating, { class = 'ftr-data'}},
      { args['Present等级'] or data('prsRating'), { class = 'prs-data'}},
      { bydRating, { class = 'byd-data'}},
     [22] =
      { args['Future等级'] or data('ftrRating'), { class = 'ftr-data'}},
     [23] =
      { args['Beyond等级'] or data('bydRating'), { class = 'byd-data'}},
     [24] =
      { 'note数量', { class = 'label'}},
      { 'note数量', { class = 'label'}},
     [25] =
      { args['PastNote'] or '空', { class = 'pst-data'}},
      { args['PastNote'] or '空', { class = 'pst-data'}},
     [26] =
      { args['PresentNote'] or '空', { class = 'prs-data'}},
      { args['PresentNote'] or '空', { class = 'prs-data'}},
     [27] =
      { args['FutureNote'] or '空', {class = 'ftr-data'}},
      { args['FutureNote'] or '空', {class = 'ftr-data'}},
     [28] =
      { args['BeyondNote'] or '空', { class = 'byd-data'}},
      { args['BeyondNote'] or '空', { class = 'byd-data'}},
     [29] =
      { '谱面设计', { class = 'label'}},
      { '谱面设计', { class = 'label'}},
     [30] =
      { chartDesigner[1] or '空', { class = 'pst-data'}, span[1]},
      { chartDesigner[1] or '空', { class = 'pst-data'}, span[1]},
     [31] =
      { chartDesigner[2] or '空', { class = 'prs-data'}, span[2]},
      { chartDesigner[2] or '空', { class = 'prs-data'}, span[2]},
     [32] =
      { chartDesigner[3] or '空', { class = 'ftr-data'}, span[3]},
      { chartDesigner[3] or '空', { class = 'ftr-data'}, span[3]},
     [33] =
      { chartDesigner[4] or '空', { class = 'byd-data'}, span[4]},
      { chartDesigner[4] or '空', { class = 'byd-data'}, span[4]},
     [34] =
      { '谱面信息(Joy-Con)', { class = 'header ns', id = 'ns-play-header'}},
      { '谱面信息(Joy-Con)', { class = 'header ns', id = 'ns-play-header'}},
     [35] =
      { '难度', { class = 'label ns'}},
      { '难度', { class = 'label ns'}},
     [36] =
      { '[Past]', { class = 'pst-label ns'}},
      { '[Past]', { class = 'pst-label ns'}},
     [37] =
      { '[Present]', { class = 'prs-label ns'}},
      { '[Present]', { class = 'prs-label ns'}},
     [38] =
      { '[Future]', { class = 'ftr-label ns'}},
      { '[Future]', { class = 'ftr-label ns'}},
     [39] =
      { bydMark(byd, args['曲名'], inNs, nsByd), { class = 'byd-label ns'}},
      { bydMark(byd, args['曲名'], inNs, nsByd), { class = 'byd-label ns'}},
     [40] =
      { 'note数量', { class = 'label ns'}},
      { 'note数量', { class = 'label ns'}},
     [41] =
      { args['PastNoteNS'] or args['PastNote'], { class = 'pst-data ns'}},
      { args['PastNoteNS'] or args['PastNote'], { class = 'pst-data ns'}},
     [42] =
      { args['PresentNoteNS'] or args['PresentNote'], { class = 'prs-data ns'}},
      { args['PresentNoteNS'] or args['PresentNote'], { class = 'prs-data ns'}},
     [43] =
      { args['FutureNoteNS'] or args['FutureNote'], { class = 'ftr-data ns'}},
      { args['FutureNoteNS'] or args['FutureNote'], { class = 'ftr-data ns'}},
     [44] =
      { args['BeyondNoteNS'] or '空', { class = 'byd-data ns'}},
      { args['BeyondNoteNS'] or '空', { class = 'byd-data ns'}},
     [45] =
      { '背景', { class = 'label'}},
      { '背景', { class = 'label'}},
     [46] =
      { bgCov(args['背景']) or bgCov(data('bg')) or bgCov(dataNs('bg')), { class = 'data' , id = 'bg-normal' }},
      { bgCov(args['背景']) or bgCov(data('bg')) or bgCov(dataNs('bg')), { class = 'data' , id = 'bg-normal' }},
     [47] =
      { bgCov(args['Future背景']) , { class = 'data' , id = 'bg-ftr' }},
      { bgCov(args['Future背景']) , { class = 'data' , id = 'bg-ftr' }},
     [48] =
      { '更新时间', { id = 'update-data-label', class = 'label'}},
      { '更新时间', { id = 'update-data-label', class = 'label'}},
     [49] =
      { dateCov(args['更新版本'], args['更新时间'], labelText('移动版'), 'arg') or dateCov(data('version'), tonumber(data('date')), labelText('移动版'), 'data'), { id = 'mobile-date-normal', class = 'data'}},
      { dateCov(args['更新版本'], args['更新时间'], labelText('移动版'), 'arg') or dateCov(data('version'), tonumber(data('date')), labelText('移动版'), 'data'), { id = 'mobile-date-normal', class = 'data'}},
     [50] =
      { dateCov(args['Beyond更新版本'], args['Beyond更新时间'], labelText('移动版'), 'arg') or '空', { id = 'mobile-date-byd', class = 'data'}},
      { dateCov(args['Beyond更新版本'], args['Beyond更新时间'], labelText('移动版'), 'arg') or '空', { id = 'mobile-date-byd', class = 'data'}},
     [51] =
      { dateCov(args['更新版本NS'], args['更新时间NS'], labelText('NS版'), 'arg') or dateCov(dataNs('version'), tonumber(dataNs('date')), labelText('NS版'), 'data'), { id = 'ns-date-normal', class = 'data ns'}},
      { dateCov(args['更新版本NS'], args['更新时间NS'], labelText('NS版'), 'arg') or dateCov(dataNs('version'), tonumber(dataNs('date')), labelText('NS版'), 'data'), { id = 'ns-date-normal', class = 'data ns'}},
     [52] =
      { '空', { id = 'ns-date-byd', class = 'data ns'}}
      { '空', { id = 'ns-date-byd', class = 'data ns'}}
    }
    }
第450行: 第404行:
      end
      end


if infoList[20] and infoList[20][1] then
if pstRating then
      category = category..'[[分类:PST'..infoList[20][1] .. '级曲目]]'
      category = category..'[[分类:PST'..pstRating .. '级曲目]]'
end
end
    if infoList[21] and infoList[21][1] then
    if prsRating then
      category = category..'[[分类:PRS'..infoList[21][1] .. '级曲目]]'
      category = category..'[[分类:PRS'..prsRating .. '级曲目]]'
    end
    end
    if infoList[22] and infoList[22][1] then
    if ftrRating then
      category = category..'[[分类:FTR'..infoList[22][1] .. '级曲目]]'
      category = category..'[[分类:FTR'..ftrRating .. '级曲目]]'
      end
      end
      if byd then category = category..'[[分类:BYD'..infoList[23][1] .. '级曲目]]' end
      if byd and bydRating then category = category..'[[分类:BYD'..bydRating .. '级曲目]]' end


      category = category..'[[分类:采用'..(args['背景'] or data('bg') or dataNs('bg')) .. '背景的曲目]]'
      category = category..'[[分类:采用'..(args['背景'] or data('bg') or dataNs('bg')) .. '背景的曲目]]'
1,508

个编辑