feature-gated modes and osu!standard versions

This commit is contained in:
MaxOhn
2021-01-21 17:33:02 +01:00
parent dfbaa47223
commit e933655990
24 changed files with 524 additions and 151 deletions
+4 -2
View File
@@ -1,3 +1,5 @@
#![cfg(feature = "mania")]
mod pp;
mod strain;
@@ -151,7 +153,7 @@ mod tests {
#[test]
#[ignore]
fn mania_single() {
let file = match File::open("./maps/1529790.osu") {
let file = match File::open("./maps/1355822.osu") {
Ok(file) => file,
Err(why) => panic!("Could not open file: {}", why),
};
@@ -161,7 +163,7 @@ mod tests {
Err(why) => panic!("Error while parsing map: {}", why),
};
let result = ManiaPP::new(&map).mods(0).calculate();
let result = ManiaPP::new(&map).mods(256).calculate();
println!("Stars: {}", result.stars());
println!("PP: {}", result.pp());
+1
View File
@@ -19,6 +19,7 @@ impl ManiaStarProvider for DifficultyAttributes {
impl ManiaStarProvider for StarResult {
fn attributes(self) -> Option<f32> {
#[allow(irrefutable_let_patterns)]
if let Self::Mania(attributes) = self {
Some(attributes.stars)
} else {