Skip to content

Commit 5bcbbbe

Browse files
minisbettcmyui
authored andcommitted
Fix both acc and judgements specified
1 parent d570e77 commit 5bcbbbe

File tree

3 files changed

+2
-13
lines changed

3 files changed

+2
-13
lines changed

Diff for: app/objects/score.py

-2
Original file line numberDiff line numberDiff line change
@@ -324,8 +324,6 @@ def calculate_performance(self, beatmap_id: int) -> tuple[float, float]:
324324
mode=mode_vn,
325325
mods=int(self.mods),
326326
combo=self.max_combo,
327-
# prefer to use the score's specific params that add up to the acc
328-
acc=self.acc,
329327
ngeki=self.ngeki,
330328
n300=self.n300,
331329
nkatu=self.nkatu,

Diff for: app/usecases/performance.py

+2-10
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,8 @@ def calculate_performances(
6565
results: list[PerformanceResult] = []
6666

6767
for score in scores:
68-
# assert either acc OR 300/100/50/geki/katu/miss is present, but not both
69-
# if (score.acc is None) == (
70-
# score.n300 is None
71-
# and score.n100 is None
72-
# and score.n50 is None
73-
# and score.ngeki is None
74-
# and score.nkatu is None
75-
# and score.nmiss is None
76-
# ):
77-
# raise ValueError("Either acc OR 300/100/50/geki/katu/miss must be present")
68+
if score.acc and (score.ngeki or score.nkatu or score.n50 or score.n100):
69+
raise ValueError("Must not specify both accuracy and geki/katu/50s/100s.")
7870

7971
# rosupp ignores NC and requires DT
8072
if score.mods is not None:

Diff for: tools/recalc.py

-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ async def recalculate_score(
6666
calculator = Calculator(
6767
mode=GameMode(score["mode"]).as_vanilla,
6868
mods=score["mods"],
69-
acc=score["acc"],
7069
combo=score["max_combo"],
7170
n_geki=score["ngeki"], # Mania 320s
7271
n300=score["n300"],

0 commit comments

Comments
 (0)