2,869
edits
No edit summary |
No edit summary |
||
Line 144: | Line 144: | ||
function p._getCourseList(args) | function p._getCourseList(args) | ||
-- Parse optional parameters | |||
local includeItems = args['includeitems'] or true | local includeItems = args['includeitems'] or true | ||
local includeSkills = args['includeskills'] or true | local includeSkills = args['includeskills'] or true | ||
local includeObstacles = args['includeObstacles'] or true | local includeObstacles = args['includeObstacles'] or true | ||
local costReduction = { | |||
['GP'] = args['gpCostReduction'] or 0, | |||
['SC'] = args['scCostReduction'] or 0, | |||
['Item'] = args['itemCostReduction'] or 0, | |||
} | |||
local obstacleNames = parseObstacleArgs(args) | |||
local courseRequirements = p.calculateCourse(obstacleNames, true, costReduction) | |||
local html = mw.html.create() | local html = mw.html.create() | ||
Line 277: | Line 284: | ||
end | end | ||
--== | --== Parse optional parameters==-- | ||
local showTotals = args['showtotals'] or true | |||
local obstacleMastery = args['obstacleMastery'] or false | |||
local costReduction = { | |||
['GP'] = args['gpCostReduction'] or 0, | |||
['SC'] = args['scCostReduction'] or 0, | |||
['Item'] = args['itemCostReduction'] or 0, | |||
} | |||
local obstacleNames = parseObstacleArgs(args) | local obstacleNames = parseObstacleArgs(args) | ||
local courseRequirements = p.calculateCourse(obstacleNames, true) | local courseRequirements = p.calculateCourse(obstacleNames, true, costReduction) | ||
--== Start of table formatting ==-- | |||
local tbl = mw.html.create("table") | local tbl = mw.html.create("table") | ||
:addClass("wikitable stickyHeader") | :addClass("wikitable stickyHeader") |
edits