mirror of
https://github.com/natsukagami/youmubot.git
synced 2025-04-19 16:58:55 +00:00
Use "object count" as the "more" valid denominator for passed percentage.
This commit is contained in:
parent
8d2344435b
commit
99689a21f9
1 changed files with 12 additions and 3 deletions
|
@ -15,6 +15,7 @@ pub struct BeatmapContent {
|
||||||
#[derive(Clone, Copy, Debug)]
|
#[derive(Clone, Copy, Debug)]
|
||||||
pub struct BeatmapInfo {
|
pub struct BeatmapInfo {
|
||||||
pub objects: usize,
|
pub objects: usize,
|
||||||
|
pub max_combo: usize,
|
||||||
pub stars: f64,
|
pub stars: f64,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,7 +75,8 @@ impl BeatmapContent {
|
||||||
pub fn get_info_with(&self, mods: Mods) -> Result<BeatmapInfo> {
|
pub fn get_info_with(&self, mods: Mods) -> Result<BeatmapInfo> {
|
||||||
let stars = self.content.stars(mods.bits() as u32, None);
|
let stars = self.content.stars(mods.bits() as u32, None);
|
||||||
Ok(BeatmapInfo {
|
Ok(BeatmapInfo {
|
||||||
objects: stars.max_combo().unwrap_or(0),
|
max_combo: stars.max_combo().unwrap_or(0),
|
||||||
|
objects: self.content.hit_objects.len(),
|
||||||
stars: stars.stars(),
|
stars: stars.stars(),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -100,9 +102,16 @@ impl BeatmapContent {
|
||||||
.calculate()
|
.calculate()
|
||||||
.pp(),
|
.pp(),
|
||||||
];
|
];
|
||||||
let objects = pp95.difficulty_attributes().max_combo().unwrap_or(0);
|
let max_combo = pp95.difficulty_attributes().max_combo().unwrap_or(0);
|
||||||
let stars = pp95.difficulty_attributes().stars();
|
let stars = pp95.difficulty_attributes().stars();
|
||||||
Ok((BeatmapInfo { objects, stars }, pp))
|
Ok((
|
||||||
|
BeatmapInfo {
|
||||||
|
objects: self.content.hit_objects.len(),
|
||||||
|
max_combo,
|
||||||
|
stars,
|
||||||
|
},
|
||||||
|
pp,
|
||||||
|
))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue