added {AnyStars/AnyPP}::is_convert

This commit is contained in:
MaxOhn
2023-02-11 10:25:47 +01:00
parent b5439a0229
commit 7b87041f49
3 changed files with 27 additions and 0 deletions
+3
View File
@@ -1,5 +1,8 @@
## Upcoming
- __Additions:__
- Added the method `{AnyStars/AnyPP}::is_convert` which **needs** to be used if the map was manually converted beforehand
- __Adjustments:__
- Specified clock rates can go below 0.001 again
+12
View File
@@ -140,6 +140,18 @@ impl<'map> AnyPP<'map> {
}
}
/// Specify whether the map is a convert.
///
/// This only needs to be specified if the map was converted manually beforehand.
#[inline]
pub fn is_convert(self, is_convert: bool) -> Self {
match self {
Self::Osu(_) | Self::Catch(_) => self,
Self::Taiko(t) => Self::Taiko(t.is_convert(is_convert)),
Self::Mania(m) => Self::Mania(m.is_convert(is_convert)),
}
}
/// Provide parameters through a [`ScoreState`].
#[inline]
pub fn state(self, state: ScoreState) -> Self {
+12
View File
@@ -99,6 +99,18 @@ impl<'map> AnyStars<'map> {
}
}
/// Specify whether the map is a convert.
///
/// This only needs to be specified if the map was converted manually beforehand.
#[inline]
pub fn is_convert(self, is_convert: bool) -> Self {
match self {
Self::Osu(_) | Self::Catch(_) => self,
Self::Taiko(t) => Self::Taiko(t.is_convert(is_convert)),
Self::Mania(m) => Self::Mania(m.is_convert(is_convert)),
}
}
/// Consume the difficulty calculator and calculate
/// difficulty attributes for the given parameters.
#[inline]