跳至內容

「Module:Packlist index」:修訂間差異

移除 58 位元組 、​ 2023年8月18日 (星期五)
fix
無編輯摘要
(fix)
 
第1行: 第1行:
local p = { single = { idx = -100, name = "Memory Archive" } }
local p = { single = { idx = -100, name = "Memory Archive" } }
local plst = mw.text.jsonDecode(mw.getCurrentFrame():expandTemplate { title = "packlist.json" }).packs
local plst = mw.text.jsonDecode(mw.getCurrentFrame():expandTemplate { title = "packlist.json" }).packs
local special = { base = true, omatsuri = true, observer = true }
local packName = mw.text.jsonDecode(mw.getCurrentFrame():expandTemplate { title = "Transition.json" }).packName
for i, v in ipairs(plst) do
for i, v in ipairs(plst) do
local co = v.custom_banner and not special[v.id]
local name = packName[v.id] or v.name_localized.en
local name = v.name_localized.en
if v.pack_parent and v.id ~= 'epilogue' then
if co then name = name .. " Collaboration" end
name = p[v.pack_parent].name .. "|" .. name
if (p[v.pack_parent or ""] or p.single).name:find " Collaboration" then
name = p[v.pack_parent].name .. "|" .. p[v.pack_parent].name .. " - " .. name
end
end
p[v.id] = { idx = i, name = name }
p[v.id] = { idx = i, name = name }
end
end
p.wacca.name = "WACCA Collaboration"
return p
return p
2,509

次編輯