Module:Songlist index:修订间差异

来自Arcaea中文维基
(Songlist index)
 
无编辑摘要
 
第1行: 第1行:
local idx = {}
local idx = {}
local slst = mw.text.jsonDecode(mw.getCurrentFrame():expandTemplate { title = "songlist" }).songs
local slst = mw.text.jsonDecode(mw.getCurrentFrame():expandTemplate { title = "songlist.json" }).songs
local special = {
local special = {
ifi = "#1f1e33|#1f1e33",
ifi = "#1f1e33|#1f1e33",

2022年10月4日 (二) 18:26的最新版本

可在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 }