1,554
次編輯
(添加单曲包类别信息) |
(packName支持NS版独有曲包) |
||
行 18: | 行 18: | ||
if packlist == nil then | if packlist == nil then | ||
packlist = mw.text.jsonDecode(mw.getCurrentFrame():expandTemplate{ title = 'Packlist.json' }) | packlist = mw.text.jsonDecode(mw.getCurrentFrame():expandTemplate{ title = 'Packlist.json' }) | ||
end | |||
for i, k in ipairs(packlist['packs']) do | |||
if k['id'] == id then return k['name_localized']['en'] end | |||
end | end | ||
for i, k in ipairs( | if packlistNS == nil then | ||
packlistNS = mw.text.jsonDecode(mw.getCurrentFrame():expandTemplate{ title = 'Packlist NS' }) | |||
end | |||
for i, k in ipairs(packlistNS['packs']) do | |||
if k['id'] == id then return k['name_localized']['en'] end | if k['id'] == id then return k['name_localized']['en'] end | ||
end | end |
次編輯