Beatsaber Rust Utilities: A Beatsaber V3 parsing library.
beatsaber beatmap
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Added V3.1 filter types.

AlephCubed 47d8db38 5d43c68c

+27 -7
+27 -7
src/difficulty/lightshow/filter.rs
··· 27 27 pub chunks: Option<i32>, 28 28 /// Only present in difficulty file V3.1 or higher. 29 29 #[serde(rename = "n")] 30 - pub random_behaviour: Option<i32>, 30 + pub random_behaviour: Option<RandomBehaviour>, 31 31 /// Only present in difficulty file V3.1 or higher. 32 32 #[serde(rename = "s")] 33 33 pub random_seed: Option<i32>, 34 34 /// Only present in difficulty file V3.1 or higher. 35 35 #[serde(rename = "d")] 36 - pub limit_behaviour: Option<i32>, 36 + pub limit_behaviour: Option<LimitBehaviour>, 37 37 /// Only present in difficulty file V3.1 or higher. 38 38 #[serde(rename = "l")] 39 39 pub limit_percent: Option<f32>, ··· 47 47 parameter2: 0, 48 48 reverse: LooseBool::False, 49 49 // Todo 50 - chunks: None, 51 - random_behaviour: None, 52 - random_seed: None, 53 - limit_behaviour: None, 54 - limit_percent: None, 50 + chunks: Some(1), 51 + random_behaviour: Some(RandomBehaviour::None), 52 + random_seed: Some(0), 53 + limit_behaviour: Some(LimitBehaviour::None), 54 + limit_percent: Some(1.0), 55 55 } 56 56 } 57 57 } ··· 153 153 StepAndOffset = 2, 154 154 } 155 155 } 156 + 157 + loose_enum!( 158 + #[derive(Default, Copy)] 159 + RandomBehaviour: i32 { 160 + #[default] 161 + None = 0, 162 + KeepOrder = 1, 163 + RandomElements = 2, 164 + } 165 + ); 166 + 167 + loose_enum!( 168 + #[derive(Default, Copy)] 169 + LimitBehaviour: i32 { 170 + #[default] 171 + None = 0, 172 + Duration = 1, 173 + Distribution = 2, 174 + } 175 + ); 156 176 157 177 #[cfg(test)] 158 178 mod tests {