···1111 reflect(Debug, Clone, PartialEq)
1212)]
1313pub struct LaneRotationEvent {
1414+ /// The time the event takes place.
1415 #[serde(rename = "b")]
1516 pub beat: f32,
1617 #[serde(rename = "e")]
1718 pub execution_time: ExecutionTime,
1919+ /// The number of degrees to rotate objects around the player.
1820 #[serde(rename = "r")]
1921 pub degrees: f32,
2022}
···3335 }
3436);
35373838+/// Changes the BPM of the map at a specific beat.
3639#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3740#[cfg_attr(
3841 feature = "bevy_reflect",
···4043 reflect(Debug, Clone, PartialEq)
4144)]
4245pub struct BpmEvent {
4646+ /// The time the event takes place.
4347 #[serde(rename = "b")]
4448 pub beat: f32,
4949+ /// The BPM to change the map too.
4550 #[serde(rename = "m")]
4651 pub bpm: f32,
4752}
+2-2
src/difficulty/lightshow.rs
···11//! Events that have no effect on gameplay.
2233pub mod basic;
44-pub mod boxes;
54pub mod easing;
65pub mod filter;
66+pub mod group;
7788pub use basic::*;
99-pub use boxes::*;
109pub use easing::*;
1110pub use filter::*;
1111+pub use group::*;
12121313use crate::loose_enum;
1414
+2
src/difficulty/lightshow/basic.rs
···11+//! The non-group events that were inherited from difficulty file V2.
22+13use crate::difficulty::playfield::CutDirection;
24use crate::impl_timed;
35use serde::{Deserialize, Serialize};
···11+//! The advanced group lighting system events.
22+13pub mod color;
24pub mod rotation;
35pub mod translation;
···2123#[doc(hidden)]
2224macro_rules! impl_event_box {
2325 ($ident:ident, $group:ident, $data:ident) => {
2424- impl crate::difficulty::lightshow::boxes::EventBox for $ident {
2626+ impl crate::difficulty::lightshow::group::EventBox for $ident {
2527 type Group = $group;
2628 type Data = $data;
2729···6062#[doc(hidden)]
6163macro_rules! impl_event_group {
6264 ($ident:ident::$value_offset:ident, $data:ident) => {
6363- impl crate::difficulty::lightshow::boxes::EventGroup for $ident {
6565+ impl crate::difficulty::lightshow::group::EventGroup for $ident {
6466 type Data = $data;
65676668 fn get_filter(&self) -> &Filter {
···93959496/// The lowest-level group event type, which determines the base value of the event.
9597pub trait EventData {
9898+ /// Returns the number of beats the event will be offset from the [`EventBox`]'s beat.
9699 fn get_beat_offset(&self) -> f32;
97100}
98101···100103#[doc(hidden)]
101104macro_rules! impl_event_data {
102105 ($ident:ident) => {
103103- impl crate::difficulty::lightshow::boxes::EventData for $ident {
106106+ impl crate::difficulty::lightshow::group::EventData for $ident {
104107 fn get_beat_offset(&self) -> f32 {
105108 self.beat_offset
106109 }
···11+//! Events that control the color of lights.
22+13use crate::difficulty::lightshow::DistributionType;
24use crate::difficulty::lightshow::easing::Easing;
35use crate::difficulty::lightshow::filter::Filter;
···1315 reflect(Debug, Clone, PartialEq)
1416)]
1517pub struct ColorEventBox {
1818+ /// The time the event takes place.
1619 #[serde(rename = "b")]
1720 pub beat: f32,
2121+ /// The ID of the collection of objects that this event effects.
1822 #[serde(rename = "g")]
1923 pub group_id: i32,
2024 #[serde(rename = "e")]
···4650 pub filter: Filter,
4751 #[serde(rename = "d")]
4852 pub beat_dist_type: DistributionType,
5353+ /// The strength of the beat distribution. Dependent on the [distribution type](Self::beat_dist_type).
5454+ ///
5555+ /// A value of zero will have no effect.
4956 #[serde(rename = "w")]
5057 pub beat_dist_value: f32,
5858+ /// The strength of the brightness distribution. Dependent on the [distribution type](Self::bright_dist_type).
5959+ ///
6060+ /// A value of zero will have no effect.
5161 #[serde(rename = "t")]
5262 pub bright_dist_type: DistributionType,
5363 #[serde(rename = "r")]
5464 pub bright_dist_value: f32,
6565+ /// Whether the first [`ColorEventData`] of the group will be effected by brightness distribution.
5566 #[serde(rename = "b")]
5667 pub bright_dist_effect_first: LooseBool,
5768 /// > Only present in difficulty file V3.2 or higher.
···106117 reflect(Debug, Clone, PartialEq)
107118)]
108119pub struct ColorEventData {
120120+ /// The number of beats the event will be offset from the [`ColorEventBox`]'s beat.
109121 #[serde(rename = "b")]
110122 pub beat_offset: f32,
111123 #[serde(rename = "i")]
···165177#[cfg(test)]
166178mod tests {
167179 use super::*;
168168- use crate::difficulty::lightshow::boxes::EventGroup;
169180 use crate::difficulty::lightshow::filter::FilterType;
181181+ use crate::difficulty::lightshow::group::EventGroup;
170182171183 #[test]
172184 fn beat_wave() {
···11-use crate::difficulty::lightshow::boxes::EventData;
11+//! Events that control the rotation of objects.
22+23use crate::difficulty::lightshow::easing::Easing;
34use crate::difficulty::lightshow::filter::Filter;
55+use crate::difficulty::lightshow::group::EventData;
46use crate::difficulty::lightshow::{DistributionType, EventAxis, TransitionType};
57use crate::utils::LooseBool;
68use crate::{impl_event_box, impl_event_group, impl_timed, loose_enum};
···1416 reflect(Debug, Clone, PartialEq)
1517)]
1618pub struct RotationEventBox {
1919+ /// The time the event takes place.
1720 #[serde(rename = "b")]
1821 pub beat: f32,
2222+ /// The ID of the collection of objects that this event effects.
1923 #[serde(rename = "g")]
2024 pub group_id: i32,
2125 #[serde(rename = "e")]
···4751 pub filter: Filter,
4852 #[serde(rename = "d")]
4953 pub beat_dist_type: DistributionType,
5454+ /// The strength of the beat distribution. Dependent on the [distribution type](Self::beat_dist_type).
5555+ ///
5656+ /// A value of zero will have no effect.
5057 #[serde(rename = "w")]
5158 pub beat_dist_value: f32,
5259 #[serde(rename = "t")]
5360 pub rotation_dist_type: DistributionType,
6161+ /// The strength of the rotation distribution. Dependent on the [distribution type](Self::rotation_dist_type).
6262+ ///
6363+ /// A value of zero will have no effect.
5464 #[serde(rename = "s")]
5565 pub rotation_dist_value: f32,
6666+ /// Whether the first [`RotationEventData`] of the group will be effected by rotation distribution.
5667 #[serde(rename = "b")]
5768 pub rotation_dist_effect_first: LooseBool,
5869 /// > Only present in difficulty file V3.2 or higher.
···114125 reflect(Debug, Clone, PartialEq)
115126)]
116127pub struct RotationEventData {
128128+ /// The number of beats the event will be offset from the [`RotationEventBox`]'s beat.
117129 #[serde(rename = "b")]
118130 pub beat_offset: f32,
119131 #[serde(rename = "p")]
120132 pub transition_type: TransitionType,
121133 #[serde(rename = "e")]
122134 pub easing: Easing,
135135+ /// The base number of degrees the event will rotate objects by.
123136 #[serde(rename = "r")]
124137 pub degrees: f32,
125138 #[serde(rename = "o")]
···11-use crate::difficulty::lightshow::boxes::EventData;
11+//! Events that control the translation/position of objects.
22+23use crate::difficulty::lightshow::easing::Easing;
34use crate::difficulty::lightshow::filter::Filter;
55+use crate::difficulty::lightshow::group::EventData;
46use crate::difficulty::lightshow::{DistributionType, EventAxis, TransitionType};
57use crate::utils::LooseBool;
68use crate::{impl_event_box, impl_event_group, impl_timed};
···1416 reflect(Debug, Clone, PartialEq)
1517)]
1618pub struct TranslationEventBox {
1919+ /// The time the event takes place.
1720 #[serde(rename = "b")]
1821 pub beat: f32,
2222+ /// The ID of the collection of objects that this event effects.
1923 #[serde(rename = "g")]
2024 pub group_id: i32,
2125 #[serde(rename = "e")]
···5155 pub filter: Filter,
5256 #[serde(rename = "d")]
5357 pub beat_dist_type: DistributionType,
5858+ /// The strength of the beat distribution. Dependent on the [beat distribution type](Self::beat_dist_type).
5959+ ///
6060+ /// A value of zero will have no effect.
5461 #[serde(rename = "w")]
5562 pub beat_dist_value: f32,
5663 #[serde(rename = "t")]
5764 pub translation_dist_type: DistributionType,
6565+ /// The strength of the translation distribution. Dependent on the [distribution type](Self::translation_dist_type).
6666+ ///
6767+ /// A value of zero will have no effect.
5868 #[serde(rename = "s")]
5969 pub translation_dist_value: f32,
7070+ /// Whether the first [`TranslationEventData`] of the group will be effected by translation distribution.
6071 #[serde(rename = "b")]
6172 pub translation_dist_effect_first: LooseBool,
6273 #[serde(rename = "i")]
···120131 reflect(Debug, Clone, PartialEq)
121132)]
122133pub struct TranslationEventData {
134134+ /// The number of beats the event will be offset from the [`TranslationEventBox`]'s beat.
123135 #[serde(rename = "b")]
124136 pub beat_offset: f32,
125137 #[serde(rename = "p")]
126138 pub transition_type: TransitionType,
127139 #[serde(rename = "e")]
128140 pub easing: Easing,
141141+ /// The base number of units the event will offset objects by.
129142 #[serde(rename = "t")]
130143 pub value: f32,
131144}
+2
src/difficulty/lightshow/easing.rs
···11+//! The easing that a [transition](crate::lightshow::TransitionType::Transition) event will use.
22+13use crate::loose_enum;
24use simple_easing::*;
35
+3-1
src/difficulty/lightshow/filter.rs
···11+//! Controls which light IDs are affected by an event.
22+13use crate::loose_enum;
24use crate::utils::LooseBool;
35use serde::{Deserialize, Serialize};
4655-/// Controls which light IDs are affected by an event box.
77+/// Controls which light IDs are affected by an event.
68#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
79#[cfg_attr(
810 feature = "bevy_reflect",