6,560
次編輯
小無編輯摘要 |
小 (曲目信息 v1.2) |
||
行 8: | 行 8: | ||
end | end | ||
function | function dateCov(v,d,t,type) | ||
if not(v and d) then return nil end | if not(v and d) then return nil end | ||
local box,a,b,c = mw.html.create( 'div' ),mw.html.create( 'div' ),mw.html.create( 'div' ),mw.html.create( 'div' ) | local box,a,b,c = mw.html.create( 'div' ),mw.html.create( 'div' ),mw.html.create( 'div' ),mw.html.create( 'div' ) | ||
box:addClass( "date-box" ) | box:addClass( "date-box" ) | ||
a:wikitext(t) | a:wikitext(t) | ||
b:wikitext(v..'<br>'..'('..tostring(d)..')') | if type=="arg" | ||
then | |||
b:wikitext(v..'<br>'..'('..tostring(d)..')') | |||
else | |||
b:wikitext('v'..v..'<br>'..tostring(timeCov(d))) | |||
end | |||
box:wikitext(tostring(a)) | box:wikitext(tostring(a)) | ||
:wikitext(tostring(b)) | :wikitext(tostring(b)) | ||
:wikitext(tostring(c)) | :wikitext(tostring(c)) | ||
return tostring(box) | |||
return tostring(box) | |||
end | end | ||
行 39: | 行 32: | ||
return '[[:分类:采用'..bg..'背景的曲目|'..bg..']]' | return '[[:分类:采用'..bg..'背景的曲目|'..bg..']]' | ||
end | end | ||
end | |||
function bydMark(byd) | |||
local diff,mark = mw.html.create( 'div' ),mw.html.create( 'div' ) | |||
diff:wikitext('[Beyond]') | |||
mark:wikitext('only NS') | |||
if byd | |||
then | |||
return tostring(tostring(diff)..tostring(mark)) | |||
else | |||
return tostring(diff) | |||
end | |||
end | |||
function labelText(text,class) | |||
local span = mw.html.create( 'span' ) | |||
span:addClass( 'label-text' ) | |||
span:wikitext(text) | |||
return tostring(span) | |||
end | end | ||
行 74: | 行 86: | ||
container:wikitext(tostring(tab)) | container:wikitext(tostring(tab)) | ||
part1:wikitext('[[文件:'..pst..'|256px|none]]画师 | part1:wikitext('[[文件:'..pst..'|256px|none]]'..labelText(' 画师')..normalJacket) part2:wikitext('[[文件:'..prs..'|256px|none]]'..labelText(' 画师')..normalJacket) part3:wikitext('[[文件:'..ftr..'|256px|none]]'..labelText(' 画师')..normalJacket) | ||
part1:addClass('tab-text-'..type) part2:addClass('tab-text-'..type) part3:addClass('active tab-text-'..type) | part1:addClass('tab-text-'..type) part2:addClass('tab-text-'..type) part3:addClass('active tab-text-'..type) | ||
container:wikitext(tostring(part1)) container:wikitext(tostring(part2)) container:wikitext(tostring(part3)) | container:wikitext(tostring(part1)) container:wikitext(tostring(part2)) container:wikitext(tostring(part3)) | ||
行 90: | 行 102: | ||
container:wikitext(tostring(tab)) | container:wikitext(tostring(tab)) | ||
part1:wikitext('[[文件:'..all..'|256px|none]]画师 | part1:wikitext('[[文件:'..all..'|256px|none]]'..labelText(' 画师')..normalJacket) part2:wikitext('[[文件:'..byd..'|256px|none]]'..labelText(' 画师')..tostring(bydJacket)) | ||
part1:addClass('active tab-text-'..type) part2:addClass('tab-text-'..type) | part1:addClass('active tab-text-'..type) part2:addClass('tab-text-'..type) | ||
container:wikitext(tostring(part1)) container:wikitext(tostring(part2)) | container:wikitext(tostring(part1)) container:wikitext(tostring(part2)) | ||
行 106: | 行 118: | ||
container:wikitext(tostring(tab)) | container:wikitext(tostring(tab)) | ||
part1:wikitext('[[文件:'..all..'|256px|none]]画师 | part1:wikitext('[[文件:'..all..'|256px|none]]'..labelText(' 画师')..normalJacket) part2:wikitext('[[文件:'..second..'|256px|none]]'..labelText(' 画师')..normalJacket) | ||
part1:addClass('active tab-text-'..type) part2:addClass('tab-text-'..type) | part1:addClass('active tab-text-'..type) part2:addClass('tab-text-'..type) | ||
container:wikitext(tostring(part1)) container:wikitext(tostring(part2)) | container:wikitext(tostring(part1)) container:wikitext(tostring(part2)) | ||
行 122: | 行 134: | ||
container:wikitext(tostring(tab)) | container:wikitext(tostring(tab)) | ||
part1:wikitext('[[文件:Songs '..id..'.jpg|256px|none]]画师 | part1:wikitext('[[文件:Songs '..id..'.jpg|256px|none]]'..labelText(' 画师')..normalJacket) part2:wikitext('[[文件:Songs '..id..' byd.jpg|256px|none]]'..labelText(' 画师')..tostring(bydJacket)) | ||
part1:addClass('active tab-text-'..type) part2:addClass('tab-text-'..type) | part1:addClass('active tab-text-'..type) part2:addClass('tab-text-'..type) | ||
container:wikitext(tostring(part1)) container:wikitext(tostring(part2)) | container:wikitext(tostring(part1)) container:wikitext(tostring(part2)) | ||
行 131: | 行 143: | ||
if id | if id | ||
then | then | ||
return '<div>[[文件:Songs '..id..'.jpg|256px|none]]画师 | return '<div>[[文件:Songs '..id..'.jpg|256px|none]]'..labelText(' 画师')..normalJacket..'</div>' | ||
end | end | ||
return '<div>[[文件:'..all..'|256px|none]]画师 | return '<div>[[文件:'..all..'|256px|none]]'..labelText(' 画师')..normalJacket..'</div>' | ||
end | end | ||
行 274: | 行 286: | ||
}, | }, | ||
[13]={ | [13]={ | ||
'谱面信息 | '谱面信息','',{ ['class']='header' } | ||
}, | }, | ||
[14]={ | [14]={ | ||
' | ' 难度','',{ ['class']='label' } | ||
}, | }, | ||
[15]={ | [15]={ | ||
' | '[Past]','',{ ['class']='pst-label' } | ||
}, | }, | ||
[16]={ | [16]={ | ||
'[ | '[Present]','',{ ['class']='prs-label' } | ||
}, | }, | ||
[17]={ | [17]={ | ||
'[ | '[Future]','',{ ['class']='ftr-label' } | ||
}, | }, | ||
[18]={ | [18]={ | ||
bydMark(byd),'',{ ['class']='byd-label' } | |||
}, | }, | ||
[19]={ | [19]={ | ||
' | ' 等级','',{ ['class']='label' } | ||
}, | }, | ||
[20]={ | [20]={ | ||
'等级','',{ ['class']=' | args['Past 等级'],data('pstRating'),{ ['class']='pst-data' } | ||
}, | }, | ||
[21]={ | [21]={ | ||
args[' | args['Present 等级'],data('prsRating'),{ ['class']='prs-data' } | ||
}, | }, | ||
[22]={ | [22]={ | ||
args[' | args['Future 等级'],data('ftrRating'),{ ['class']='ftr-data' } | ||
}, | }, | ||
[23]={ | [23]={ | ||
args[' | args['Beyond 等级'],data('bydRating'),{ ['class']='byd-data' } | ||
}, | }, | ||
[24]={ | [24]={ | ||
'note数量','',{ ['class']='label' } | |||
}, | }, | ||
[25]={ | [25]={ | ||
' | args['PastNote'],' 空',{ ['class']='pst-data' } | ||
}, | }, | ||
[26]={ | [26]={ | ||
args[' | args['PresentNote'],'空',{ ['class']='prs-data' } | ||
}, | }, | ||
[27]={ | [27]={ | ||
args[' | args['FutureNote'],'空',{ ['class']='ftr-data' } | ||
}, | }, | ||
[28]={ | [28]={ | ||
args[' | args['BeyondNote'],'空',{ ['class']='byd-data' } | ||
}, | }, | ||
[29]={ | [29]={ | ||
' 谱面设计','',{ ['class']='label' } | |||
}, | }, | ||
[30]={ | [30]={ | ||
chartDesigner[1],' 无',{ ['class']='pst-data' },span[1] | |||
}, | }, | ||
[31]={ | [31]={ | ||
chartDesigner[ | chartDesigner[2],'无',{ ['class']='prs-data' },span[2] | ||
}, | }, | ||
[32]={ | [32]={ | ||
chartDesigner[ | chartDesigner[3],'无',{ ['class']='ftr-data' },span[3] | ||
}, | }, | ||
[33]={ | [33]={ | ||
chartDesigner[ | chartDesigner[4],'无',{ ['class']='byd-data' },span[4] | ||
}, | }, | ||
[34]={ | [34]={ | ||
'谱面信息(Joy-Con)','',{ ['class']='header ns',['id']='ns-play-header' } | |||
}, | }, | ||
[35]={ | [35]={ | ||
' | ' 难度','',{ ['class']='label ns' } | ||
}, | }, | ||
[36]={ | [36]={ | ||
' | '[Past]','',{ ['class']='pst-label ns' } | ||
}, | }, | ||
[37]={ | [37]={ | ||
'[ | '[Present]','',{ ['class']='prs-label ns' } | ||
}, | }, | ||
[38]={ | [38]={ | ||
'[ | '[Future]','',{ ['class']='ftr-label ns' } | ||
}, | }, | ||
[39]={ | [39]={ | ||
bydMark(byd),'',{ ['class']='byd-label ns' } | |||
}, | }, | ||
--[[ 暂时无用部分,如有用则启用 | |||
[41]={ | [41]={ | ||
'等级','',{ ['class']='label ns' } | '等级','',{ ['class']='label ns' } | ||
行 371: | 行 381: | ||
[45]={ | [45]={ | ||
args['Beyond等级NS'],'无',{ ['class']='byd-data ns' } | args['Beyond等级NS'],'无',{ ['class']='byd-data ns' } | ||
}, | }, ]]-- | ||
[ | [40]={ | ||
'note数量','',{ ['class']='label ns' } | 'note数量','',{ ['class']='label ns' } | ||
}, | }, | ||
[ | [41]={ | ||
args['PastNoteNS'],args['PastNote'],{ ['class']='pst-data ns' } | args['PastNoteNS'],args['PastNote'],{ ['class']='pst-data ns' } | ||
}, | }, | ||
[ | [42]={ | ||
args['PresentNoteNS'],args['PresentNote'],{ ['class']='prs-data ns' } | args['PresentNoteNS'],args['PresentNote'],{ ['class']='prs-data ns' } | ||
}, | }, | ||
[ | [43]={ | ||
args['FutureNoteNS'],args['FutureNote'],{ ['class']='ftr-data ns' } | args['FutureNoteNS'],args['FutureNote'],{ ['class']='ftr-data ns' } | ||
}, | }, | ||
[ | [44]={ | ||
args['BeyondNoteNS'],'无',{ ['class']='byd-data ns' } | args['BeyondNoteNS'],'无',{ ['class']='byd-data ns' } | ||
}, | }, | ||
--[[ 暂时无用部分,如有用则启用 | |||
[51]={ | [51]={ | ||
'谱面设计','',{ ['class']='label ns' } | '谱面设计','',{ ['class']='label ns' } | ||
行 401: | 行 412: | ||
[55]={ | [55]={ | ||
args['BeyondNote编写NS'],'无',{ ['class']='byd-data ns' },spanNs[4] | args['BeyondNote编写NS'],'无',{ ['class']='byd-data ns' },spanNs[4] | ||
}, | }, ]]-- | ||
[ | [45]={ | ||
'背景','',{ ['class']='label' } | '背景','',{ ['class']='label' } | ||
}, | }, | ||
[ | [46]={ | ||
bgCov(args['背景']),bgCov(data('bg')),{ ['class']='data' } | bgCov(args['背景']),bgCov(data('bg')),{ ['class']='data' } | ||
}, | }, | ||
[ | [47]={ | ||
'更新时间','',{ ['id']='update-data-label',['class']='label' } | '更新时间','',{ ['id']='update-data-label',['class']='label' } | ||
}, | }, | ||
[ | [48]={ | ||
dateCov(args['更新版本'] , args['更新时间'] , labelText('移动版') , 'arg' ) , dateCov( data('version') , tonumber(data('date')) , labelText('移动版') , 'data' ) ,{ ['id']='mobile-date-normal',['class']='data'} | |||
}, | }, | ||
[ | [49]={ | ||
dateCov(args['Beyond更新版本'] , args['Beyond更新时间'] ,'' , 'arg' ) ,'空',{ ['id']='mobile-date-byd',['class']='data'} | |||
}, | }, | ||
[ | [50]={ | ||
dateCov(args['更新版本NS'] , args['更新时间NS'] , labelText('NS版') , 'arg' ),dateCov('v1.0.0c' ,'2021/05/18' , labelText('NS版') , 'arg' ),{ ['id']='ns-date-normal',['class']='data ns'} | |||
}, | }, | ||
[ | [51]={ | ||
'无','',{ ['id']='ns-date-byd',['class']='data ns'} | '无','',{ ['id']='ns-date-byd',['class']='data ns'} | ||
} | } | ||
行 426: | 行 437: | ||
local box = mw.html.create( 'div' ) | local box = mw.html.create( 'div' ) | ||
--样式控制 | |||
box:addClass( "songbox" ) | box:addClass( "songbox" ) | ||
if byd then box:addClass( "byd" ) end | if byd then box:addClass( "byd" ) end | ||
if dataNs('side')==1 or args['侧']=='1' then box:addClass( "conflict" ) else box:addClass( "light" ) end | if dataNs('side')==1 or args['侧']=='1' then box:addClass( "conflict" ) else box:addClass( "light" ) end | ||
if args['更新版本NS'] or dataNs('id') | if args['更新版本NS'] or dataNs('id') | ||
then | then | ||
box:addClass( "ns-box" ) | box:addClass( "ns-box" ) | ||
if not( dataNs('pstChange') or dataNs('prsChange') or dataNs('ftrChange') or byd ) | if not( dataNs('pstChange') or dataNs('prsChange') or dataNs('ftrChange') ) --(or byd) -- bdy单独分栏禁用 | ||
then | then | ||
box:addClass( "ns-same" ) | box:addClass( "ns-same" ) | ||
end | end | ||
end | |||
if args['Beyond更新版本'] and args['Beyond更新时间'] then box:addClass( 'mobile-byd-date' ) end | |||
if args['曲名']=='Tempestissimo' then box:addClass( 'ns-byd-date' ) box:addClass( 'ns-date-span' ) end | |||
--分类添加 | |||
if args['更新版本NS'] or dataNs('id') | |||
then | |||
category=category..'[[分类:双模式曲目]]' | category=category..'[[分类:双模式曲目]]' | ||
else | else | ||
category=category..'[[分类:仅触摸模式曲目]]' | category=category..'[[分类:仅触摸模式曲目]]' | ||
end | end | ||
if dataNs('pstChange') or dataNs('prsChange') or dataNs('ftrChange') then category=category..'[[分类:多模式谱面有差异的曲目]]' end | if dataNs('pstChange') or dataNs('prsChange') or dataNs('ftrChange') then category=category..'[[分类:多模式谱面有差异的曲目]]' end | ||
if args['nocat'] then category='' end | if args['nocat'] then category='' end | ||
--表格生成 | |||
local boxList={} | local boxList={} | ||