918
个编辑
Economy666(讨论 | 贡献) 无编辑摘要 |
Economy666(讨论 | 贡献) 无编辑摘要 |
||
第47行: | 第47行: | ||
local multi_song={} | local multi_song={} | ||
local ns_song={} | |||
local multi_id={} | local multi_id={} | ||
local mobile_id={} | local mobile_id={} | ||
第57行: | 第58行: | ||
for _, song in ipairs(mad.listOf('songs', 'ns')) do | for _, song in ipairs(mad.listOf('songs', 'ns')) do | ||
ns_id[song.id] = 1 | ns_id[song.id] = 1 | ||
ns_song[song.id] = song | |||
if not multi_id[song.id] then | if not multi_id[song.id] then | ||
multi_id[song.id] = 1 | multi_id[song.id] = 1 | ||
第102行: | 第104行: | ||
data:insert(artist) | data:insert(artist) | ||
local pack_main = input '所属曲包' or packItem['name'] | |||
local function link(v) return '[['.. v ..']]' end | |||
local onlyMobile = frame:expandTemplate{title = '仅', args = {'移动版', '', '图片角标'}} | |||
local onlyNS = frame:expandTemplate{title = '仅', args = {'NS版', '', '图片角标'}} | |||
if mobile_id and ns_id then | |||
packItem_ns = mad.packQueryWrap(song.set, 'ns') | |||
local pack_ns = packItem_ns['name'] | |||
if pack_ns == pack_main then | |||
pack = link(pack_main) | |||
else | |||
pack = link(pack_main) --.. onlyMobile .. '\n' ..pack_ns .. onlyNS | |||
end | |||
elseif mobile_id then | |||
pack = link(pack_main) .. onlyMobile | |||
else | |||
pack = link(pack_main) .. onlyNS | |||
end | |||
if ns_id then | |||
packItem_ns = mad.packQueryWrap(song.set, 'ns') | |||
local pack_n = packItem_ns['name'] | |||
end | |||
data:insert(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) |
个编辑