diff --git a/CHANGELOG.md b/CHANGELOG.md index 046bac06..e7e5a625 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ - __Additions:__ - Added `From` impl for `GameMode` + - Added the method `AnyPP::hitresult_priority` # v0.9.5 (2023-09-06) diff --git a/src/pp.rs b/src/pp.rs index ff2184b8..af44e05f 100644 --- a/src/pp.rs +++ b/src/pp.rs @@ -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 {