2,875
edits
No edit summary |
(Make costReduction parsing more robust) |
||
Line 148: | Line 148: | ||
function p._getCourseList(args) | function p._getCourseList(args) | ||
-- Parse optional parameters | -- Parse optional parameters | ||
local costReduction = { | local costReduction = { | ||
['GP'] = args['gpCostReduction'] | ['GP'] = Num.toNumberOrDefault(args['gpCostReduction'], 0), | ||
['SC'] = args['scCostReduction'] | ['SC'] = Num.toNumberOrDefault(args['scCostReduction'], 0), | ||
['Item'] = args['itemCostReduction'] | ['Item'] = Num.toNumberOrDefault(args['itemCostReduction'], 0), | ||
} | } | ||
Line 293: | Line 292: | ||
local costReduction = { | local costReduction = { | ||
['GP'] = args['gpCostReduction'] | ['GP'] = Num.toNumberOrDefault(args['gpCostReduction'], 0), | ||
['SC'] = args['scCostReduction'] | ['SC'] = Num.toNumberOrDefault(args['scCostReduction'], 0), | ||
['Item'] = args['itemCostReduction'] | ['Item'] = Num.toNumberOrDefault(args['itemCostReduction'], 0), | ||
} | } | ||
edits