跳至內容

「Module:Unlock」:修訂間差異

移除 50 位元組 、​ 2022年9月18日 (星期日)
oops
(emm)
(oops)
行 44: 行 44:


function p.single(frame)
function p.single(frame)
local id = frame.args.id or slstIdx[mw.title.getCurrentTitle().text]
local id = slstIdx[frame.args[1]]
local stringify = function(songv)
local stringify = function(songv)
local r = {}
local r = {}
行 52: 行 52:
--- unlocks song k/v :
--- unlocks song k/v :
for songk, songv in unlocksIt(unlocks) do
for songk, songv in unlocksIt(unlocks) do
if id == songk then return mw.getCurrentFrame():expandTemplate { title = "解禁方法", args = {
if id == songk then return frame:expandTemplate { title = "解禁方法", args = {
["PST解禁方法"] = stringify(songv[1]),
["PST解禁方法"] = stringify(songv[1]),
["PRS解禁方法"] = stringify(songv[2]),
["PRS解禁方法"] = stringify(songv[2]),
2,544

次編輯