模块:Qualityprice:修订间差异
来自星露谷物语扩展百科
更多操作
无编辑摘要 |
无编辑摘要 |
||
| 第1行: | 第1行: | ||
local p = {} | local p = {} | ||
function | local function expandTemplate(args) | ||
local templateArgs = {} | |||
for key, value in pairs(args) do | |||
local | if value ~= "" then | ||
templateArgs[key] = value | |||
end | |||
end | |||
return mw.getCurrentFrame():expandTemplate{ | |||
title = '模板:Qualityprice/Base', | |||
args = { | |||
templateArgs[1], | |||
templateArgs[2], | |||
pm = templateArgs['pm'], | |||
dsv = templateArgs['dsv'], | |||
hide = templateArgs['hide'], | |||
quality = templateArgs['quality'], | |||
} | |||
} | |||
end | end | ||
function p. | function p.render(frame) | ||
local args = frame.args | |||
args[1] = args[1]:gsub(".png", "") | |||
local result = expandTemplate(args) | |||
return result | |||
end | end | ||
return p | return p | ||
2026年1月12日 (一) 21:00的最新版本
local p = {}
local function expandTemplate(args)
local templateArgs = {}
for key, value in pairs(args) do
if value ~= "" then
templateArgs[key] = value
end
end
return mw.getCurrentFrame():expandTemplate{
title = '模板:Qualityprice/Base',
args = {
templateArgs[1],
templateArgs[2],
pm = templateArgs['pm'],
dsv = templateArgs['dsv'],
hide = templateArgs['hide'],
quality = templateArgs['quality'],
}
}
end
function p.render(frame)
local args = frame.args
args[1] = args[1]:gsub(".png", "")
local result = expandTemplate(args)
return result
end
return p