Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
110 changes: 95 additions & 15 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ metrics = { version = "0.24.1" }
metrics-exporter-prometheus = { version = "0.16.2", default-features = false }
metrics-util = { version = "0.19.0" }
rkyv = { version = "0.8" }
rosu-mods = { version = "0.3.0", features = ["rkyv"] }
rosu-pp = { git = "https://github.com/MaxOhn/rosu-pp", branch = "next" }
rosu-mods = { version = "0.4.0", features = ["rkyv"] }
rosu-pp = { git = "https://github.com/MaxOhn/rosu-pp", branch = "pp-update" }
# rosu-pp = { path = "../rosu-pp" }
rosu-v2 = { git = "https://github.com/MaxOhn/rosu-v2", branch = "lazer", default-features = false, features = ["deny_unknown_fields", "macros", "metrics"] }
# rosu-v2 = { path = "../rosu-v2", default-features = false, features = ["deny_unknown_fields", "macros", "metrics"] }
Expand Down
24 changes: 12 additions & 12 deletions bathbot-cards/src/skills/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ mod title;
use std::hash::BuildHasher;

use rosu_pp::{
catch::{CatchPerformance, CatchPerformanceAttributes, CatchScoreState},
catch::{CatchHitResults, CatchPerformance, CatchPerformanceAttributes},
mania::{ManiaPerformance, ManiaScoreState},
osu::{OsuPerformance, OsuScoreState},
taiko::{TaikoPerformance, TaikoScoreState},
osu::{OsuHitResults, OsuPerformance},
taiko::{TaikoHitResults, TaikoPerformance},
};
use rosu_v2::model::{GameMode, score::Score};

Expand Down Expand Up @@ -53,8 +53,7 @@ impl Skills {
continue;
};

let state = OsuScoreState {
max_combo: score.max_combo,
let hitresults = OsuHitResults {
n300: score.statistics.great,
n100: score.statistics.ok,
n50: score.statistics.meh,
Expand All @@ -67,7 +66,8 @@ impl Skills {
let attrs = OsuPerformance::try_new(attrs.difficulty)
.unwrap()
.mods(score.mods.clone())
.state(state)
.combo(score.max_combo)
.hitresults(hitresults)
.lazer(score.set_on_lazer)
.calculate()
.unwrap();
Expand Down Expand Up @@ -102,8 +102,7 @@ impl Skills {
continue;
};

let state = TaikoScoreState {
max_combo: score.max_combo,
let hitresults = TaikoHitResults {
n300: score.statistics.great,
n100: score.statistics.ok,
misses: score.statistics.miss,
Expand All @@ -112,7 +111,8 @@ impl Skills {
let attrs = TaikoPerformance::try_new(attrs.difficulty)
.unwrap()
.mods(score.mods.clone())
.state(state)
.combo(score.max_combo)
.hitresults(hitresults)
.calculate()
.unwrap();

Expand Down Expand Up @@ -143,8 +143,7 @@ impl Skills {
continue;
};

let state = CatchScoreState {
max_combo: score.max_combo,
let hitresults = CatchHitResults {
fruits: score.statistics.great,
droplets: score.statistics.large_tick_hit,
tiny_droplets: score.statistics.small_tick_hit,
Expand All @@ -157,7 +156,8 @@ impl Skills {
let attrs = CatchPerformance::try_new(attrs.difficulty)
.unwrap()
.mods(score.mods.clone())
.state(state)
.combo(score.max_combo)
.hitresults(hitresults)
.calculate()
.unwrap();

Expand Down
9 changes: 6 additions & 3 deletions bathbot/src/active/impls/bookmarks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ use bathbot_util::{
numbers::round,
};
use eyre::{Report, Result};
use rosu_pp::{Beatmap, Difficulty, Performance, any::HitResultPriority};
use rosu_pp::{
Beatmap, Difficulty, Performance,
any::hitresult_generator::{Closest, Composable, Fast},
};
use rosu_v2::prelude::{GameMode, Username};
use twilight_model::{
channel::message::{
Expand Down Expand Up @@ -271,7 +274,7 @@ impl BookmarksPagination {

pp_97 = Performance::new(attrs.difficulty_attributes())
.accuracy(97.0)
.hitresult_priority(HitResultPriority::Fastest)
.hitresult_generator::<Composable<Fast, Closest, Closest, Fast>>()
.lazer(true)
.calculate()
.pp() as f32;
Expand Down Expand Up @@ -351,7 +354,7 @@ impl BookmarksPagination {
for &acc in ACCS.iter() {
let pp_result = Performance::from(attrs.clone())
.accuracy(acc as f64)
.hitresult_priority(HitResultPriority::Fastest)
.hitresult_generator::<Composable<Fast, Closest, Closest, Fast>>()
.calculate();

let pp = pp_result.pp();
Expand Down
7 changes: 5 additions & 2 deletions bathbot/src/active/impls/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ use bathbot_util::{
numbers::{WithComma, round},
};
use eyre::{ContextCompat, Result, WrapErr};
use rosu_pp::{Difficulty, any::HitResultPriority};
use rosu_pp::{
Difficulty,
any::hitresult_generator::{Closest, Composable, Fast},
};
use rosu_v2::prelude::{
BeatmapExtended, BeatmapsetExtended, GameMode, GameModsIntermode, Username,
};
Expand Down Expand Up @@ -144,7 +147,7 @@ impl IActiveMessage for MapPagination {
.mods(&self.mods)
.accuracy(acc as f64)
.clock_rate(clock_rate)
.hitresult_priority(HitResultPriority::Fastest)
.hitresult_generator::<Composable<Closest, Closest, Closest, Fast>>()
.calculate();

let pp = pp_result.pp();
Expand Down
Loading
Loading