Module:MoneyMakingGuide: Difference between revisions

From Melvor Idle
mNo edit summary
m (Pass explanation to wiki and strip <nowiki> tags. This allows wiki markup to be pasted into the template.)
Line 227: Line 227:
end
end


local function buildMMGTable(args)
function p._buildMMGTable(args)
if args['guideName'] == nil then
error("Money Making Guide must have a valid guideName parameter.")
end
-- Parse arguments.
-- Parse arguments.
local pSkills = parseExp(args)
local pSkills = parseExp(args)
Line 333: Line 337:
:done()
:done()
return tostring(tbl)
return tbl:done()
:newline()
:wikitext(mw.text.unstripNoWiki(explanation))
end
 
function p.buildMMGTable(frame)
local args = frame:getParent().args
return p._buildMMGTable(args)
end
end


Line 353: Line 364:


function p.main(frame)
function p.main(frame)
local args = frame:getParent().args
error("Call a specific function rather than main.")
return p._main(args)
end
end


function p._main(args)
if args['guideName'] == nil then
error("Money Making Guide must have a valid guideName parameter.")
end
return buildMMGTable(args)
end


function p.test()
function p.test()