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.

Rename `Duration` and `Distribution` to `Beat` and `Value` respectively.

This brings `LimitBehaviour` in line with the rest of the project's terminology.

AlephCubed 1ac27cc3 42ef9e41

+13 -8
+11 -6
src/difficulty/lightshow/filter.rs
··· 229 229 ); 230 230 231 231 loose_enum!( 232 + /// Controls whether to extend wave distributions so they match the duration before the limit was applied. 233 + /// 234 + /// To see this in practice, check out [this video](https://youtube.com/watch?v=NJPPBvyHJjg&t=338). 235 + /// 236 + /// Includes the option to only enable for beat distribution and not value distribution, and vice versa. 232 237 #[derive(Default, Copy)] 233 238 LimitBehaviour: i32 { 234 239 #[default] 235 240 None = 0, 236 - Duration = 1, 237 - Distribution = 2, 241 + Beat = 1, 242 + Value = 2, 238 243 Both = 3, 239 244 } 240 245 ); 241 246 242 247 impl LimitBehaviour { 243 - /// Returns true if duration limiting is enabled, that is either `Duration` or `Both`. 248 + /// Returns true if duration limiting is enabled, that is either `Beat` or `Both`. 244 249 pub fn duration(&self) -> bool { 245 - matches!(self, LimitBehaviour::Duration | LimitBehaviour::Both) 250 + matches!(self, LimitBehaviour::Beat | LimitBehaviour::Both) 246 251 } 247 252 248 - /// Returns true if distribution limiting is enabled, that is either `Distribution` or `Both`. 253 + /// Returns true if distribution limiting is enabled, that is either `Value` or `Both`. 249 254 pub fn distribution(&self) -> bool { 250 - matches!(self, LimitBehaviour::Distribution | LimitBehaviour::Both) 255 + matches!(self, LimitBehaviour::Value | LimitBehaviour::Both) 251 256 } 252 257 } 253 258
+2 -2
src/difficulty/lightshow/group/color.rs
··· 415 415 fn beat_wave_with_limit_filter() { 416 416 let group = ColorEventGroup { 417 417 filter: Filter { 418 - limit_behaviour: Some(LimitBehaviour::Duration), 418 + limit_behaviour: Some(LimitBehaviour::Beat), 419 419 limit_percent: Some(0.5), 420 420 ..Default::default() 421 421 }, ··· 431 431 fn brightness_wave_with_limit_filter() { 432 432 let group = ColorEventGroup { 433 433 filter: Filter { 434 - limit_behaviour: Some(LimitBehaviour::Distribution), 434 + limit_behaviour: Some(LimitBehaviour::Value), 435 435 limit_percent: Some(0.5), 436 436 ..Default::default() 437 437 },