From 664ffaac4c52f21f869fda7fda9ddd440f43da76 Mon Sep 17 00:00:00 2001 From: Barinade Date: Mon, 17 Feb 2020 14:32:15 -0600 Subject: [PATCH] Fix really old PlayerStageStats Grade related function and remove dead metrics --- Themes/_fallback/base._ini | 10 +--------- Themes/_fallback/metrics.ini | 10 +--------- src/Etterna/Models/Misc/PlayerStageStats.cpp | 16 ++++++---------- 3 files changed, 8 insertions(+), 28 deletions(-) diff --git a/Themes/_fallback/base._ini b/Themes/_fallback/base._ini index be2829cdb3..51b87f53c4 100644 --- a/Themes/_fallback/base._ini +++ b/Themes/_fallback/base._ini @@ -3356,15 +3356,7 @@ DeltaSecondsHeldCommand=shadowlength,4;diffusealpha,1;zoom,1.25;linear,0.3;zoomx DeltaSecondsGainLifeCommand= [PlayerStageStats] -NumGradeTiersUsed=8 -GradePercentTier01=1.00 -GradePercentTier02=0.99 -GradePercentTier03=0.97 -GradePercentTier04=0.93 -GradePercentTier05=0.80 -GradePercentTier06=0.65 -GradePercentTier07=0.45 -GradePercentTier08=-99999.000000 +NumGradeTiersUsed=16 GradeTier01IsAllW2s=false GradeTier02IsAllW2s=false GradeTier02IsFullCombo=false diff --git a/Themes/_fallback/metrics.ini b/Themes/_fallback/metrics.ini index fe1f9cfd44..da867a3d57 100644 --- a/Themes/_fallback/metrics.ini +++ b/Themes/_fallback/metrics.ini @@ -688,18 +688,10 @@ Bar16thAlpha=1 AreaHighlightColor=color("1,0,0,0.3") [PlayerStageStats] -# Original CVS Grading -GradePercentTier01=1.000000 -GradePercentTier02=1.000000 -GradePercentTier03=0.930000 -GradePercentTier04=0.800000 -GradePercentTier05=0.650000 -GradePercentTier06=0.450000 -GradePercentTier07=-99999.000000 GradeTier01IsAllW2s=false GradeTier02IsAllW2s=true GradeTier02IsFullCombo=false -NumGradeTiersUsed=7 +NumGradeTiersUsed=16 [Player] ReceptorArrowsYStandard=-144 diff --git a/src/Etterna/Models/Misc/PlayerStageStats.cpp b/src/Etterna/Models/Misc/PlayerStageStats.cpp index 069184113e..0138719469 100644 --- a/src/Etterna/Models/Misc/PlayerStageStats.cpp +++ b/src/Etterna/Models/Misc/PlayerStageStats.cpp @@ -13,10 +13,6 @@ #include "Etterna/Models/StepsAndStyles/Steps.h" #include "Etterna/Singletons/ThemeManager.h" -#define GRADE_PERCENT_TIER(i) \ - THEME->GetMetricF( \ - "PlayerStageStats", \ - ssprintf("GradePercent%s", GradeToString((Grade)(i)).c_str())) // deprecated, but no solution to replace them exists yet: #define GRADE_TIER02_IS_ALL_W2S \ THEME->GetMetricB("PlayerStageStats", "GradeTier02IsAllW2s") @@ -287,24 +283,24 @@ PlayerStageStats::GetGrade() const // TODO: Change these conditions to use Lua instead. -aj if (GRADE_TIER02_IS_ALL_W2S) { if (FullComboOfScore(TNS_W1)) - return Grade_Tier01; + return Grade_Tier04; // quad if (FullComboOfScore(TNS_W2)) - return Grade_Tier02; + return Grade_Tier07; // triple grade = max(grade, Grade_Tier03); } if (GRADE_TIER01_IS_ALL_W2S) { if (FullComboOfScore(TNS_W2)) - return Grade_Tier01; - grade = max(grade, Grade_Tier02); + return Grade_Tier04; // quad + grade = max(grade, Grade_Tier07); // triple } if (GRADE_TIER02_IS_FULL_COMBO) { if (FullComboOfScore(g_MinScoreToMaintainCombo)) - return Grade_Tier02; - grade = max(grade, Grade_Tier03); + return Grade_Tier07; // triple + grade = max(grade, Grade_Tier10); // double } return grade;