refactor!: add n_objects to mania diff attrs
This commit is contained in:
@@ -589,6 +589,12 @@ impl OsuDifficultyAttributes {
|
||||
pub fn max_combo(&self) -> usize {
|
||||
self.max_combo
|
||||
}
|
||||
|
||||
/// Return the amount of hitobjects.
|
||||
#[inline]
|
||||
pub fn n_objects(&self) -> usize {
|
||||
self.n_circles + self.n_sliders + self.n_spinners
|
||||
}
|
||||
}
|
||||
|
||||
/// The result of a performance calculation on an osu!standard map.
|
||||
@@ -628,6 +634,11 @@ impl OsuPerformanceAttributes {
|
||||
pub fn max_combo(&self) -> usize {
|
||||
self.difficulty.max_combo
|
||||
}
|
||||
/// Return the amount of hitobjects.
|
||||
#[inline]
|
||||
pub fn n_objects(&self) -> usize {
|
||||
self.difficulty.n_objects()
|
||||
}
|
||||
}
|
||||
|
||||
impl From<OsuPerformanceAttributes> for OsuDifficultyAttributes {
|
||||
|
||||
Reference in New Issue
Block a user