From 18b2a3dd90794064087296f4902b202935b2c676 Mon Sep 17 00:00:00 2001 From: NoMathExpectation <85624722+NoMathExpectation@users.noreply.github.com> Date: Wed, 11 Mar 2026 01:46:28 +0800 Subject: [PATCH] Change order of inheritance so docs of beat can be displayed correctly. Added ActionEvent. --- .../cn/rdlevel/rdkt/core/events/EventTabs.kt | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/core/src/commonMain/kotlin/cn/rdlevel/rdkt/core/events/EventTabs.kt b/core/src/commonMain/kotlin/cn/rdlevel/rdkt/core/events/EventTabs.kt index 0982fb9..a0f7cee 100644 --- a/core/src/commonMain/kotlin/cn/rdlevel/rdkt/core/events/EventTabs.kt +++ b/core/src/commonMain/kotlin/cn/rdlevel/rdkt/core/events/EventTabs.kt @@ -37,7 +37,7 @@ public sealed class BeatSpecificSoundEvent : BeatSpecificEvent, SoundEvent() { * An event that belongs to the rows tab. */ @Serializable -public sealed class RowEvent : AbstractEvent(), BeatSpecificEvent, RowSpecificEvent, YSpecificEvent { +public sealed class RowEvent : BeatSpecificEvent, AbstractEvent(), RowSpecificEvent, YSpecificEvent { override var beat: Double = 1.0 set(value) { BeatSpecificEvent.requireBeatInBound(value) @@ -69,7 +69,21 @@ public sealed class RowEvent : AbstractEvent(), BeatSpecificEvent, RowSpecificEv * An event that belongs to the actions tab. */ @Serializable -public sealed class ActionEvent : AbstractEvent() +public sealed class ActionEvent : BeatSpecificEvent, AbstractEvent(), YSpecificEvent { + override var beat: Double = 1.0 + set(value) { + BeatSpecificEvent.requireBeatInBound(value) + field = value + } + + override var y: Int = 0 + + protected fun copyBaseFrom(other: ActionEvent) { + super.copyBaseFrom(other) + this.beat = other.beat + this.y = other.y + } +} /** * An event that belongs to the rooms tab.