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.

Depreciated experimental methods.

AlephCubed 963e1195 091236a4

+40 -1
+5
src/difficulty/lightshow.rs
··· 30 30 } 31 31 32 32 impl DistributionType { 33 + #[deprecated( 34 + note = "Experimental. Does not consider chunks, random, or limit in filter calculations." 35 + )] 36 + #[allow(deprecated)] 33 37 fn compute_offset( 34 38 &self, 35 39 light_id: i32, ··· 92 96 } 93 97 94 98 // More readable concrete tests are available in the `color` module. 99 + #[allow(deprecated)] 95 100 #[cfg(test)] 96 101 mod tests { 97 102 use super::*;
+8
src/difficulty/lightshow/boxes.rs
··· 35 35 /// Returns the number of beats that the event will be offset for a given light ID. 36 36 /// # Panics 37 37 /// Will panic if the light ID is greater than or equal to the group size. 38 + #[deprecated( 39 + note = "Experimental. Does not consider chunks, random, or limit in filter calculations." 40 + )] 38 41 fn get_beat_offset(&self, light_id: i32, group_size: i32) -> f32; 39 42 40 43 /// Returns the value that the event will be offset for a given light ID (i.e. brightness offset). 41 44 /// # Panics 42 45 /// Will panic if the light ID is greater than or equal to the group size. 46 + #[deprecated( 47 + note = "Experimental. Does not consider chunks, random, or limit in filter calculations." 48 + )] 43 49 fn get_value_offset(&self, light_id: i32, group_size: i32) -> f32; 44 50 } 45 51 ··· 57 63 &self.data 58 64 } 59 65 66 + #[allow(deprecated)] 60 67 fn get_beat_offset(&self, light_id: i32, group_size: i32) -> f32 { 61 68 self.beat_dist_type.compute_offset( 62 69 light_id, ··· 68 75 ) 69 76 } 70 77 78 + #[allow(deprecated)] 71 79 fn get_value_offset(&self, light_id: i32, group_size: i32) -> f32 { 72 80 self.$value_offset(light_id, group_size) 73 81 }
+5
src/difficulty/lightshow/boxes/color.rs
··· 80 80 /// Returns the brightness that the event will be offset for a given light ID. 81 81 /// # Panics 82 82 /// Will panic if the light ID is greater than or equal to the group size. 83 + #[deprecated( 84 + note = "Experimental. Does not consider chunks, random, or limit in filter calculations." 85 + )] 86 + #[allow(deprecated)] 83 87 pub fn get_brightness_offset(&self, light_id: i32, group_size: i32) -> f32 { 84 88 self.bright_dist_type.compute_offset( 85 89 light_id, ··· 146 150 } 147 151 } 148 152 153 + #[allow(deprecated)] 149 154 #[cfg(test)] 150 155 mod tests { 151 156 use super::*;
+4
src/difficulty/lightshow/boxes/rotation.rs
··· 87 87 /// Returns the number of degrees that the event will be offset for a given light ID. 88 88 /// # Panics 89 89 /// Will panic if the light ID is greater than or equal to the group size. 90 + #[deprecated( 91 + note = "Experimental. Does not consider chunks, random, or limit in filter calculations." 92 + )] 93 + #[allow(deprecated)] 90 94 pub fn get_rotation_offset(&self, light_id: i32, group_size: i32) -> f32 { 91 95 self.rotation_dist_type.compute_offset( 92 96 light_id,
+4
src/difficulty/lightshow/boxes/translation.rs
··· 93 93 /// Returns the number of units that the event will be offset for a given light ID. 94 94 /// # Panics 95 95 /// Will panic if the light ID is greater than or equal to the group size. 96 + #[deprecated( 97 + note = "Experimental. Does not consider chunks, random, or limit in filter calculations." 98 + )] 99 + #[allow(deprecated)] 96 100 pub fn get_translation_offset(&self, light_id: i32, group_size: i32) -> f32 { 97 101 self.translation_dist_type.compute_offset( 98 102 light_id,
+10
src/difficulty/lightshow/filter.rs
··· 74 74 /// Will panic if the light ID is greater than or equal to the group size. 75 75 #[must_use] 76 76 #[inline] 77 + #[deprecated( 78 + note = "Experimental. Does not consider chunks, random, or limit in calculations." 79 + )] 77 80 pub fn is_in_filter(&self, mut light_id: i32, group_size: i32) -> bool { 78 81 assert!(light_id < group_size); 79 82 ··· 100 103 /// If the [`FilterType`] is `Unknown` then the result will be the same as `group_size`. 101 104 #[must_use] 102 105 #[inline] 106 + #[deprecated( 107 + note = "Experimental. Does not consider chunks, random, or limit in calculations." 108 + )] 103 109 pub fn count_filtered(&self, group_size: i32) -> i32 { 104 110 match self.filter_type { 105 111 FilterType::Division => { ··· 121 127 /// Will panic if the light ID is greater than or equal to the group size. 122 128 #[must_use] 123 129 #[inline] 130 + #[deprecated( 131 + note = "Experimental. Does not consider chunks, random, or limit in calculations." 132 + )] 124 133 pub fn get_relative_index(&self, mut light_id: i32, group_size: i32) -> i32 { 125 134 assert!(light_id < group_size); 126 135 ··· 184 193 } 185 194 ); 186 195 196 + #[allow(deprecated)] 187 197 #[cfg(test)] 188 198 mod tests { 189 199 use super::*;
+4 -1
src/info/color_scheme/presets.rs
··· 62 62 /// 63 63 /// ChatGPT was used to help translate between formats, so there could be hallucinations. 64 64 /// 65 - /// White light colors are not currently supported, and where therefor ignored. 65 + /// White light colors are not currently supported, and are therefor ignored. 66 66 pub fn get_color_scheme(&self) -> ColorScheme { 67 67 match self { 68 68 Environment::Unknown(_) ··· 404 404 } 405 405 406 406 impl AllDirectionEnvironment { 407 + /// Value taken from [the wiki](https://bsmg.wiki/mapping/lighting-defaults.html#current-colors). 408 + /// 409 + /// ChatGPT was used to help translate between formats, so there could be hallucinations. 407 410 pub fn get_color_scheme(&self) -> ColorScheme { 408 411 match self { 409 412 AllDirectionEnvironment::GlassDesert => color_scheme!(