Port osu!std updates since f08134f

This commit is contained in:
MaxOhn
2024-10-10 16:18:18 +02:00
parent f9dfa5e35c
commit 5bdb2babed
16 changed files with 417 additions and 177 deletions
+20
View File
@@ -178,6 +178,26 @@ impl_has_mod! {
tc: - Traceable ["Traceable"],
}
impl GameMods {
pub fn no_slider_head_acc(&self, lazer: bool) -> bool {
match self.inner {
GameModsInner::Lazer(ref mods) => mods
.iter()
.find_map(|m| match m {
GameMod::ClassicOsu(classic) => Some(classic),
_ => None,
})
.map_or(!lazer, |classic| {
classic.no_slider_head_accuracy.unwrap_or(true)
}),
GameModsInner::Intermode(ref mods) => {
mods.contains(GameModIntermode::Classic) || !lazer
}
GameModsInner::Legacy(_) => !lazer,
}
}
}
impl Default for GameMods {
fn default() -> Self {
Self::DEFAULT