Module:CHUNITHM Difficulty: Difference between revisions

Jump to navigation Jump to search
no edit summary
imported>Jack980517
No edit summary
imported>Jack980517
No edit summary
Line 6: Line 6:
function p.chunithm_difficulty_multi(frame)
function p.chunithm_difficulty_multi(frame)
     args=frame:getParent().args
     args=frame:getParent().args
    local version_range_borders = {4}
     local result = "CHUNITHM "
     local result = "CHUNITHM "
     if VerToNum({"chunithm", args[1]}) <= 3 then
     if VerToNum({"chunithm", args[1]}) < version_range_borders[1] then
         result = result .. "to AIR difficulty rated from 1 to 13+, "
         result = result .. "to AIR difficulty rated from 1 to 13+, "
     else
     else
Line 13: Line 14:
     end
     end
     -- since #args can't be used, and there's no removals in air+ and older anyway, i'm removing the period, and moving the comma to the above branch
     -- since #args can't be used, and there's no removals in air+ and older anyway, i'm removing the period, and moving the comma to the above branch
    local version_range_borders = {4} -- first range already dealt with above
     -- although there's only two ranges, the loops below shall remain to be future-proof
     -- although there's only two ranges, the loops below shall remain to be future-proof
     local i = 0
     local i = 0
Line 48: Line 48:
         end
         end
     end
     end
     if #included_ranges == 1 and VerToNum({"chunithm", args[1]}) <= 3 then -- first range special case
     if #included_ranges == 1 and VerToNum({"chunithm", args[1]}) < version_range_borders[1] then -- first range special case
         result = result .. "and " .. ranges_text[included_ranges[1]] .. "."
         result = result .. "and " .. ranges_text[included_ranges[1]] .. "."
         -- print(result)
         -- print(result)
Anonymous user

Navigation menu