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 `ExecutionTime` time enum for `LaneRotationEvent`s.

Also fixed incorrect filter default.

AlephCubed 5d43c68c b3442b3c

+25 -4
+24 -3
src/difficulty/gameplay_event.rs
··· 1 - use crate::impl_timed; 1 + use crate::{impl_timed, loose_enum}; 2 2 use serde::{Deserialize, Serialize}; 3 3 4 4 #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] ··· 11 11 #[serde(rename = "b")] 12 12 pub beat: f32, 13 13 #[serde(rename = "e")] 14 - pub execution_time: i32, 14 + pub execution_time: ExecutionTime, 15 15 #[serde(rename = "r")] 16 16 pub degrees: f32, 17 17 } 18 18 19 19 impl_timed!(LaneRotationEvent::beat); 20 20 21 - #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] 21 + loose_enum!( 22 + /// Determines when a [`LaneRotationEvent`] will be applied to objects placed on the same beat as this event. 23 + #[derive(Default, Copy)] 24 + ExecutionTime: i32 { 25 + /// The [`LaneRotationEvent`] will affect objects with a beat greater than or equal to the event's beat. 26 + #[default] 27 + Early = 0, 28 + /// The [`LaneRotationEvent`] will affect objects with a beat greater than the event's beat. 29 + Late = 1, 30 + } 31 + ); 32 + 33 + #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] 22 34 #[cfg_attr( 23 35 feature = "bevy_reflect", 24 36 derive(bevy_reflect::Reflect), ··· 29 41 pub beat: f32, 30 42 #[serde(rename = "m")] 31 43 pub bpm: f32, 44 + } 45 + 46 + impl Default for BpmEvent { 47 + fn default() -> Self { 48 + Self { 49 + beat: 0.0, 50 + bpm: 100.0, 51 + } 52 + } 32 53 } 33 54 34 55 impl_timed!(BpmEvent::beat);
+1 -1
src/difficulty/lightshow/filter.rs
··· 44 44 Self { 45 45 filter_type: FilterType::default(), 46 46 parameter1: 1, 47 - parameter2: 1, 47 + parameter2: 0, 48 48 reverse: LooseBool::False, 49 49 // Todo 50 50 chunks: None,