Module:Infobox MOS: Difference between revisions
mNo edit summary |
Adopt getArgs, rename some params: Tuning -> Scale Signature (preferred); debug -> nocat (to fit current use of "debug" seen with other templates) |
||
| Line 9: | Line 9: | ||
local tamnams = require("Module:TAMNAMS") | local tamnams = require("Module:TAMNAMS") | ||
local yesno = require("Module:Yesno") | local yesno = require("Module:Yesno") | ||
local getArgs = require("Module:Arguments").getArgs | |||
-- Helper function | -- Helper function | ||
| Line 451: | Line 452: | ||
-- Wrapper function | -- Wrapper function | ||
function p.infobox_MOS(frame) | function p.infobox_MOS(frame) | ||
local tuning = frame.args["Tuning"] | local args = getArgs(frame) | ||
local tuning = frame.args["Scale Signature"] or frame.args["Tuning"] | |||
local other_names = frame.args["othernames"] or nil | local other_names = frame.args["othernames"] or nil | ||
local debug_mode = yesno(tonumber(frame.args[" | local debug_mode = yesno(tonumber(frame.args["nocat"]), false) | ||
local result = p._infobox_mos(tuning, other_names) | local result = p._infobox_mos(tuning, other_names) | ||