Module:Packlist index

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

local p = { single = { idx = -100, name = "Memory Archive" } }
local plst = mw.text.jsonDecode(mw.getCurrentFrame():expandTemplate { title = "packlist.json" }).packs
local packName = mw.text.jsonDecode(mw.getCurrentFrame():expandTemplate { title = "Transition.json" }).packName
for i, v in ipairs(plst) do
	local name = packName[v.id] or v.name_localized.en
	if v.pack_parent and v.id ~= 'epilogue' then
		name = p[v.pack_parent].name .. "|" .. name
	end
	p[v.id] = { idx = i, name = name }
end
p.wacca.name = "WACCA Collaboration"
return p