feat: added method AnyPP::hitresult_priority

This commit is contained in:
MaxOhn
2023-10-28 13:39:58 +02:00
parent 457934f484
commit 5fd29c2ab4
2 changed files with 14 additions and 0 deletions
+1
View File
@@ -2,6 +2,7 @@
- __Additions:__
- Added `From<u8>` impl for `GameMode`
- Added the method `AnyPP::hitresult_priority`
# v0.9.5 (2023-09-06)
+13
View File
@@ -198,6 +198,19 @@ impl<'map> AnyPP<'map> {
}
}
/// Specify how hitresults should be generated.
///
/// Defauls to [`HitResultPriority::BestCase`].
#[inline]
pub fn hitresult_priority(self, priority: HitResultPriority) -> Self {
match self {
Self::Osu(o) => Self::Osu(o.hitresult_priority(priority)),
Self::Taiko(t) => Self::Taiko(t.hitresult_priority(priority)),
Self::Catch(_) => self, // FIXME: update when ctb hitresult generation is updated
Self::Mania(m) => Self::Mania(m.hitresult_priority(priority)),
}
}
/// Specify the amount of 300s of a play.
#[inline]
pub fn n300(self, n300: usize) -> Self {