420
edits
HyperNervie (talk | contribs) (Remake p.doclist) |
HyperNervie (talk | contribs) (Reimplement p.main) |
||
| Line 20: | Line 20: | ||
return s == "" and nil or s | return s == "" and nil or s | ||
end | end | ||
function p.main(frame) | function p.main(frame) | ||
local args = frame:getParent().args | local args = frame:getParent().args | ||
local entry = p.new(trim(args[1]), trim(args[2]), trim(args[3])) | local entry = p.new(trim(args[1]), trim(args[2]), tonumber(trim(args[3]))) | ||
local result = entry[trim(frame.args[1])] | local result = entry[trim(frame.args[1])] | ||
if type(result) == "function" then | if type(result) == "function" then | ||
local methodArgNames = { | |||
"variant", | |||
"tempoUpSize", | |||
"iconSize" | |||
} | |||
local methodArgs = {} | |||
for _, argName in ipairs(methodArgNames) do | |||
methodArgs[argName] = trim(args[argName]) | |||
end | |||
return result(entry, methodArgs) | |||
end | end | ||
return result | return result | ||
edits