918
次編輯
Economy666(留言 | 貢獻) 小 (i) |
Economy666(留言 | 貢獻) 無編輯摘要 |
||
行 56: | 行 56: | ||
local onlyMobile = frame:expandTemplate{title = '仅', args = {'移动版', '', '图片角标'}} | local onlyMobile = frame:expandTemplate{title = '仅', args = {'移动版', '', '图片角标'}} | ||
local onlyNS = frame:expandTemplate{title = '仅', args = {'NS版', '', '图片角标'}} | local onlyNS = frame:expandTemplate{title = '仅', args = {'NS版', '', '图片角标'}} | ||
local ctrlTouch = '[[文件:Icon Touch2.png|16px|top|触摸|link=]]' | |||
local ctrlJC = '[[文件:Icon Joy-Con2.png|16px|top|Joy-Con|link=]]' | |||
local sectionCode = {unknown = 0, free = 1, archive = 2, mainstory = 3, sidestory = 4, collab = 5, single = 6} | local sectionCode = {unknown = 0, free = 1, archive = 2, mainstory = 3, sidestory = 4, collab = 5, single = 6} | ||
行 99: | 行 101: | ||
end | end | ||
-- 平台 | |||
local display_plat = '' | local display_plat = '' | ||
local NSid = id | local NSid = id | ||
行 115: | 行 118: | ||
data:insert(display_plat) | data:insert(display_plat) | ||
-- 图片 | |||
data:insert(id) | data:insert(id) | ||
-- otherTitles | -- otherTitles | ||
data:insert(input '标题' or table.concat({'[[' .. mad.linkTitle(song) .. ']]', unpack(otherTitles(song))}, '<br>')) | data:insert(input '标题' or table.concat({'[[' .. mad.linkTitle(song) .. ']]', unpack(otherTitles(song))}, '<br>')) | ||
-- | --曲师 | ||
local artist = '' | local artist = '' | ||
local artist_list = cal[string.gsub(song.artist, ' ' , '')] | local artist_list = cal[string.gsub(song.artist, ' ' , '')] | ||
行 143: | 行 142: | ||
data:insert(input '音乐家' or artist) | data:insert(input '音乐家' or artist) | ||
--曲包 | |||
local cc = 'Collaboration %- Collaboration' | local cc = 'Collaboration %- Collaboration' | ||
local ccl = 'Collaboration#Collaboration' | local ccl = 'Collaboration#Collaboration' | ||
行 165: | 行 165: | ||
data:insert(input '所属曲包' or pack) | data:insert(input '所属曲包' or pack) | ||
--其他信息 | |||
local bpm = tonumber(input 'BPM') or song.bpm_base | local bpm = tonumber(input 'BPM') or song.bpm_base | ||
data:insert((tonumber(song.bpm) ~= bpm and ('data-sort-value=%s|'):format(bpm) or '') .. song.bpm) | data:insert((tonumber(song.bpm) ~= bpm and ('data-sort-value=%s|'):format(bpm) or '') .. song.bpm) | ||
行 170: | 行 171: | ||
data:insert(song.version .. '.' .. (input '收录版本' or verQuery(song.date))) | data:insert(song.version .. '.' .. (input '收录版本' or verQuery(song.date))) | ||
-- | -- 难度等级 | ||
local main_diffi = {} | local main_diffi = {} | ||
for _,diffi in pairs(song.difficulties) do | for _,diffi in pairs(song.difficulties) do | ||
main_diffi[diffi.ratingClass] = diffi.rating .. (diffi.ratingPlus and '+' or '') | main_diffi[diffi.ratingClass] = diffi.rating .. (diffi.ratingPlus and '+' or '') | ||
行 187: | 行 187: | ||
end | end | ||
for i = 0, 4 do | for i = 0, 4 do | ||
local difficulty | |||
if main_diffi[i] and ns_diffi[i] then | if main_diffi[i] and ns_diffi[i] then | ||
if main_diffi[i] == ns_diffi[i] then | |||
difficulty = main_diffi[i] .. (c_chart[i] and (ctrlTouch .. '<br />' .. main_diffi[i] .. ctrlJC) or '') | |||
else | |||
difficulty = main_diffi[i] .. onlyMobile .. '<br />' .. ns_diffi[i] .. (c_chart[i] and (ctrlTouch ..onlyNS .. '<br />' .. ns_diffi[i] .. ctrlJC .. onlyNS) or onlyNS) | |||
end | |||
elseif main_diffi[i] then | elseif main_diffi[i] then | ||
difficulty = main_diffi[i] .. | difficulty = main_diffi[i] .. onlyMobile | ||
elseif ns_diffi[i] then | elseif ns_diffi[i] then | ||
difficulty = ns_diffi[i] .. | difficulty = ns_diffi[i] .. onlyNS | ||
else | else | ||
difficulty = | difficulty = '/' | ||
end | end | ||
data:insert(input('等级', i) or difficulty) | data:insert(input('等级', i) or difficulty) | ||
行 209: | 行 206: | ||
for i = 0, 4 do | for i = 0, 4 do | ||
difficulty = main_diffi[i] or '/' | difficulty = main_diffi[i] or '/' | ||
data:insert(input('等级', i) or difficulty) | data:insert(input('等级', i) or difficulty or '/') | ||
end | end | ||
end | end |
次編輯