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.

Renamed `LimitBehaviour` helper methods to match cases.

+7 -7
+2 -2
src/difficulty/lightshow.rs
··· 39 39 let filtered_id = filter.get_relative_index(light_id, group_size); 40 40 41 41 let filtered_size = if let Some(limit_behaviour) = filter.limit_behaviour 42 - && limit_behaviour.duration() 42 + && limit_behaviour.beat_enabled() 43 43 { 44 44 filter.count_filtered(group_size) 45 45 } else { ··· 69 69 let filtered_id = filter.get_relative_index(light_id, group_size); 70 70 71 71 let filtered_size = if let Some(limit_behaviour) = filter.limit_behaviour 72 - && limit_behaviour.distribution() 72 + && limit_behaviour.value_enabled() 73 73 { 74 74 filter.count_filtered(group_size) 75 75 } else {
+5 -5
src/difficulty/lightshow/filter.rs
··· 245 245 ); 246 246 247 247 impl LimitBehaviour { 248 - /// Returns true if duration limiting is enabled, that is either `Beat` or `Both`. 249 - pub fn duration(&self) -> bool { 248 + /// Returns true if beat limiting is enabled, that is either `Beat` or `Both`. 249 + pub fn beat_enabled(&self) -> bool { 250 250 matches!(self, LimitBehaviour::Beat | LimitBehaviour::Both) 251 251 } 252 252 253 - /// Returns true if distribution limiting is enabled, that is either `Value` or `Both`. 254 - pub fn distribution(&self) -> bool { 253 + /// Returns true if value limiting is enabled, that is either `Value` or `Both`. 254 + pub fn value_enabled(&self) -> bool { 255 255 matches!(self, LimitBehaviour::Value | LimitBehaviour::Both) 256 256 } 257 257 } ··· 526 526 #[test] 527 527 fn limit_non_factor_all_but_one() { 528 528 let filter = Filter { 529 - limit_percent: Some(0.90), 529 + limit_percent: Some(0.9), 530 530 ..Default::default() 531 531 }; 532 532