added more attribute conversions
This commit is contained in:
@@ -87,6 +87,17 @@ impl CatchPerformanceAttributes {
|
||||
pub const fn is_convert(&self) -> bool {
|
||||
self.difficulty.is_convert
|
||||
}
|
||||
|
||||
/// Returns a builder for performance calculation.
|
||||
pub const fn performance<'a>(self) -> CatchPerformance<'a> {
|
||||
CatchPerformance::from_catch_attributes(self.difficulty)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<CatchPerformanceAttributes> for CatchDifficultyAttributes {
|
||||
fn from(attributes: CatchPerformanceAttributes) -> Self {
|
||||
attributes.difficulty
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Default)]
|
||||
|
||||
@@ -79,4 +79,15 @@ impl ManiaPerformanceAttributes {
|
||||
pub const fn is_convert(&self) -> bool {
|
||||
self.difficulty.is_convert
|
||||
}
|
||||
|
||||
/// Returns a builder for performance calculation.
|
||||
pub const fn performance<'a>(self) -> ManiaPerformance<'a> {
|
||||
ManiaPerformance::from_mania_attributes(self.difficulty)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<ManiaPerformanceAttributes> for ManiaDifficultyAttributes {
|
||||
fn from(attributes: ManiaPerformanceAttributes) -> Self {
|
||||
attributes.difficulty
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,4 +86,15 @@ impl OsuPerformanceAttributes {
|
||||
pub const fn n_objects(&self) -> u32 {
|
||||
self.difficulty.n_objects()
|
||||
}
|
||||
|
||||
/// Returns a builder for performance calculation.
|
||||
pub const fn performance<'a>(self) -> OsuPerformance<'a> {
|
||||
OsuPerformance::from_osu_attributes(self.difficulty)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<OsuPerformanceAttributes> for OsuDifficultyAttributes {
|
||||
fn from(attributes: OsuPerformanceAttributes) -> Self {
|
||||
attributes.difficulty
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,6 +79,11 @@ impl TaikoPerformanceAttributes {
|
||||
pub const fn is_convert(&self) -> bool {
|
||||
self.difficulty.is_convert
|
||||
}
|
||||
|
||||
/// Returns a builder for performance calculation.
|
||||
pub const fn performance<'a>(self) -> TaikoPerformance<'a> {
|
||||
TaikoPerformance::from_taiko_attributes(self.difficulty)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<TaikoPerformanceAttributes> for TaikoDifficultyAttributes {
|
||||
|
||||
Reference in New Issue
Block a user