Module:沙盒/Economy666/SongCollectionMulti:修订间差异

无编辑摘要
(i)
无编辑摘要
第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 = cal[string.gsub(song.artist, ' ' , '') ]
--曲师
-- if not artist then
-- artist = formatJapaneseText(song.artist)
-- artist = '[[ 曲师 列表#'..song.artist..'|'..artist..']]'
-- end
-- data:insert(input '音乐家' or artist)
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)))
-- diffs
-- 难度等级
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
--main_diffi[i] = main_diffi[i] or '/'
local difficulty
--ns_diffi[i] = ns_diffi[i] or '/'
if main_diffi[i] and ns_diffi[i] then
if main_diffi[i] and ns_diffi[i] then
if c_chart[i] then
   if main_diffi[i] == ns_diffi[i] then
difficulty = main_diffi[i] ..'ctrl 1<br />'.. ns_diffi[i].. 'ctrl 2'
     difficulty = main_diffi[i] .. (c_chart[i] and (ctrlTouch .. '<br />' .. main_diffi[i] .. ctrlJC) or '')
elseif main_diffi[i] == ns_diffi[i] then
   else
difficulty = main_diffi[i]
     difficulty = main_diffi[i] .. onlyMobile .. '<br />' .. ns_diffi[i] .. (c_chart[i] and (ctrlTouch ..onlyNS .. '<br />' .. ns_diffi[i] .. ctrlJC .. onlyNS) or onlyNS)
else
   end
difficulty = main_diffi[i] ..'<br />'.. ns_diffi[i]
end
elseif main_diffi[i] then
elseif main_diffi[i] then
difficulty = main_diffi[i] .. 'only mobile'
difficulty = main_diffi[i] .. onlyMobile
elseif ns_diffi[i] then
elseif ns_diffi[i] then
difficulty = ns_diffi[i] .. 'only NS'
difficulty = ns_diffi[i] .. onlyNS
else
else
difficulty = main_diffi[i] or '/'
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
918

个编辑