Refactor Master Graded (#960)

This commit is contained in:
NOT_A_ROBOT
2023-09-05 17:01:54 +07:00
committed by GitHub
parent c7b8dd24c7
commit e152e147e2
7 changed files with 234 additions and 203 deletions

View File

@@ -1,10 +1,3 @@
local gradeList={
"Grade 9","Grade 8","Grade 7","Grade 6","Grade 5","Grade 4","Grade 3","Grade 2","Grade 1",
"S1","S2","S3","S4","S5","S6","S7","S8","S9",
"m1","m2","m3","m4","m5","m6","m7","m8","m9",
"M","MK","MV","MO","MM-","MM","MM+","GM-","GM","GM+","TM-","TM","TM+"
}
return {
env={
freshLimit=15,
@@ -15,7 +8,7 @@ return {
},
slowMark=true,
score=function(P) return {P.modeData.gradePts,P.stat.time} end,
scoreDisp=function(D) return(gradeList[D[1]] or D[1]).." "..STRING.time(D[2]) end,
scoreDisp=function(D) return(getMasterGradeText(D[1]) or D[1]).." "..STRING.time(D[2]) end,
comp=function(a,b) return a[1]>b[1] or (a[1]==b[1] and a[2]<b[2]) end,
getRank=function(P)
local G=P.modeData.gradePts