Module:MOS degrees: Difference between revisions
No edit summary |
Step ratio limit increased to 5 |
||
| Line 7: | Line 7: | ||
-- Helper function | -- Helper function | ||
-- Parses up to | -- Parses up to 5 step ratios entered as text in a semicolon-delimited string, | ||
-- where each step ratio is separated with a slash | -- where each step ratio is separated with a slash | ||
-- EG, "2/1; 3/1; 3/2" becomes {{2, 1}, {3, 1}, {3, 2}} | -- EG, "2/1; 3/1; 3/2" becomes {{2, 1}, {3, 1}, {3, 2}} | ||
| Line 17: | Line 17: | ||
end | end | ||
-- Parse up to | -- Parse up to 5 step ratios (hardcoded) | ||
local loop_limit = math.min( | local max_ratios = 5 | ||
local loop_limit = math.min(max_ratios, #parsed) | |||
local step_ratios = {} | local step_ratios = {} | ||
for i = 1, loop_limit do | for i = 1, loop_limit do | ||