Module:Songlist index

来自Arcaea中文维基

可在Module:Songlist index/doc创建此模块的帮助文档

local idx = {}
local slst = mw.text.jsonDecode(mw.getCurrentFrame():expandTemplate { title = "songlist.json" }).songs
local special = {
	ifi = "#1f1e33|#1f1e33",
	aiueoon = "AI[UE]OON|AI[UE]OON",
	quon = "Quon (Feryquitous)|Quon",
	quonwacca = "Quon (DJ Noriken)|Quon"
}
for i, v in ipairs(slst) do
	local name = special[v.id] or v.title_localized.en
	local val = { idx = i, title = name, id = v.id }
	idx[v.id], idx[name] = val, val
end
return { slstIdx = idx, slst = slst }