re-export rosu_pp::osu::{version}::* from rosu_pp::osu
This commit is contained in:
+2
-58
@@ -213,37 +213,7 @@ impl BeatmapExt for Beatmap {
|
||||
panic!("`osu` feature is not enabled");
|
||||
|
||||
#[cfg(feature = "osu")]
|
||||
{
|
||||
#[cfg(feature = "no_leniency")]
|
||||
{
|
||||
StarResult::Osu(osu::no_leniency::stars(self, mods, passed_objects))
|
||||
}
|
||||
|
||||
#[cfg(all(not(feature = "no_leniency"), feature = "no_sliders_no_leniency"))]
|
||||
{
|
||||
StarResult::Osu(osu::no_sliders_no_leniency::stars(
|
||||
self,
|
||||
mods,
|
||||
passed_objects,
|
||||
))
|
||||
}
|
||||
|
||||
#[cfg(all(
|
||||
not(feature = "no_leniency"),
|
||||
not(feature = "no_sliders_no_leniency"),
|
||||
feature = "all_included"
|
||||
))]
|
||||
{
|
||||
StarResult::Osu(osu::all_included::stars(self, mods, passed_objects))
|
||||
}
|
||||
|
||||
#[cfg(not(any(
|
||||
feature = "no_leniency",
|
||||
feature = "no_sliders_no_leniency",
|
||||
feature = "all_included"
|
||||
)))]
|
||||
panic!("either of the features `no_leniency`, `no_sliders_no_leniency`, or `all_included` must be enabled");
|
||||
}
|
||||
StarResult::Osu(osu::stars(self, mods, passed_objects))
|
||||
}
|
||||
GameMode::MNA => {
|
||||
#[cfg(not(feature = "mania"))]
|
||||
@@ -314,33 +284,7 @@ impl BeatmapExt for Beatmap {
|
||||
panic!("`osu` feature is not enabled");
|
||||
|
||||
#[cfg(feature = "osu")]
|
||||
{
|
||||
#[cfg(feature = "no_leniency")]
|
||||
{
|
||||
osu::no_leniency::strains(self, mods)
|
||||
}
|
||||
|
||||
#[cfg(all(not(feature = "no_leniency"), feature = "no_sliders_no_leniency"))]
|
||||
{
|
||||
osu::no_sliders_no_leniency::strains(self, mods)
|
||||
}
|
||||
|
||||
#[cfg(all(
|
||||
not(feature = "no_leniency"),
|
||||
not(feature = "no_sliders_no_leniency"),
|
||||
feature = "all_included"
|
||||
))]
|
||||
{
|
||||
osu::all_included::strains(self, mods)
|
||||
}
|
||||
|
||||
#[cfg(not(any(
|
||||
feature = "no_leniency",
|
||||
feature = "no_sliders_no_leniency",
|
||||
feature = "all_included"
|
||||
)))]
|
||||
panic!("either of the features `no_leniency`, `no_sliders_no_leniency`, or `all_included` must be enabled");
|
||||
}
|
||||
osu::strains(self, mods)
|
||||
}
|
||||
GameMode::MNA => {
|
||||
#[cfg(not(feature = "mania"))]
|
||||
|
||||
+1
-10
@@ -1,15 +1,6 @@
|
||||
use super::{DifficultyAttributes, PerformanceAttributes};
|
||||
use crate::{Beatmap, Mods, PpResult, StarResult};
|
||||
|
||||
#[cfg(feature = "no_sliders_no_leniency")]
|
||||
use super::no_sliders_no_leniency::stars;
|
||||
|
||||
#[cfg(feature = "no_leniency")]
|
||||
use super::no_leniency::stars;
|
||||
|
||||
#[cfg(feature = "all_included")]
|
||||
use super::all_included::stars;
|
||||
|
||||
/// Calculator for pp on osu!standard maps.
|
||||
///
|
||||
/// # Example
|
||||
@@ -294,7 +285,7 @@ impl<'m> OsuPP<'m> {
|
||||
let attributes = self
|
||||
.attributes
|
||||
.take()
|
||||
.unwrap_or_else(|| stars(self.map, self.mods, self.passed_objects));
|
||||
.unwrap_or_else(|| super::stars(self.map, self.mods, self.passed_objects));
|
||||
|
||||
self.assert_hitresults(attributes).calculate()
|
||||
}
|
||||
|
||||
+12
-3
@@ -1,14 +1,23 @@
|
||||
#[cfg(feature = "all_included")]
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "all_included")))]
|
||||
pub mod all_included;
|
||||
mod all_included;
|
||||
|
||||
#[cfg(feature = "all_included")]
|
||||
pub use all_included::*;
|
||||
|
||||
#[cfg(feature = "no_leniency")]
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "no_leniency")))]
|
||||
pub mod no_leniency;
|
||||
mod no_leniency;
|
||||
|
||||
#[cfg(feature = "no_leniency")]
|
||||
pub use no_leniency::*;
|
||||
|
||||
#[cfg(feature = "no_sliders_no_leniency")]
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "no_sliders_no_leniency")))]
|
||||
pub mod no_sliders_no_leniency;
|
||||
mod no_sliders_no_leniency;
|
||||
|
||||
#[cfg(feature = "no_sliders_no_leniency")]
|
||||
pub use no_sliders_no_leniency::*;
|
||||
|
||||
#[inline]
|
||||
fn difficulty_range_od(od: f32) -> f32 {
|
||||
|
||||
Reference in New Issue
Block a user