Module:maimai Difficulty: Difference between revisions
no edit summary
imported>Jack980517 No edit summary |
imported>Jack980517 No edit summary |
||
Line 6: | Line 6: | ||
function p.maimai_difficulty_multi(frame) | function p.maimai_difficulty_multi(frame) | ||
args=frame:getParent().args | args=frame:getParent().args | ||
local result = "maimai " | local result = "maimai " | ||
if VerToNum({"maimai", args[1]}) <= 2 then | if VerToNum({"maimai", args[1]}) <= 2 then | ||
Line 13: | Line 12: | ||
result = result .. "difficulty rated " | result = result .. "difficulty rated " | ||
end | end | ||
if VerToNum({"maimai", args[2]}) <= 2 then | if args[2] ~= nil and VerToNum({"maimai", args[2]}) <= 2 then | ||
-- ugly hack; #args can't be used, and since there's (currently) no songs removed in _~_+ and revived later, the only use case is 舞萌 songs. | -- ugly hack; #args can't be used, and since there's (currently) no songs removed in _~_+ and revived later, the only use case is 舞萌 songs. | ||
result = result .. "." | result = result .. "." | ||
Line 32: | Line 31: | ||
} | } | ||
local j = 1 | local j = 1 | ||
for i = 1, | for i = 1, 99, 2 do -- again, ugly hack | ||
if args[i] == nil then break end | |||
local | local startvernum = VerToNum({"maimai", args[i]}) | ||
local endvernum = VerToNum({"maimai", args[i + 1]}) | |||
if endvernum == nil then | |||
endvernum = 99 | |||
local | |||
endvernum = | |||
end | end | ||
for j = 1, #version_range_borders do | for j = 1, #version_range_borders do | ||
Line 76: | Line 70: | ||
end | end | ||
result = result .. "<br>[[Category:Songs]][[Category:maimai Songs]]" | result = result .. "<br>[[Category:Songs]][[Category:maimai Songs]]" | ||
if | if endvernum ~= 99 then | ||
result = result .. "[[Category:maimai Removed Songs]]" | result = result .. "[[Category:maimai Removed Songs]]" | ||
end | end |