From 71c1ed05fcd3255f1345af75285f575c0e1734e5 Mon Sep 17 00:00:00 2001 From: NoMathExpectation <85624722+NoMathExpectation@users.noreply.github.com> Date: Mon, 6 Apr 2026 19:08:19 +0800 Subject: [PATCH] Fixed AbstractAudioData not serializing some properties. --- .../kotlin/cn/rdlevel/rdkt/core/data/sound/AudioData.kt | 1 + .../kotlin/cn/rdlevel/rdkt/core/test/SetGameSoundEventTest.kt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/commonMain/kotlin/cn/rdlevel/rdkt/core/data/sound/AudioData.kt b/core/src/commonMain/kotlin/cn/rdlevel/rdkt/core/data/sound/AudioData.kt index 4756970..4cbf501 100644 --- a/core/src/commonMain/kotlin/cn/rdlevel/rdkt/core/data/sound/AudioData.kt +++ b/core/src/commonMain/kotlin/cn/rdlevel/rdkt/core/data/sound/AudioData.kt @@ -10,6 +10,7 @@ import kotlin.jvm.JvmOverloads /** * Represents an abstraction of audio and its configuration. */ +@Serializable public sealed class AbstractAudioData { /** * The file name or built-in name of the audio. diff --git a/core/src/commonTest/kotlin/cn/rdlevel/rdkt/core/test/SetGameSoundEventTest.kt b/core/src/commonTest/kotlin/cn/rdlevel/rdkt/core/test/SetGameSoundEventTest.kt index 6af86c1..206e34d 100644 --- a/core/src/commonTest/kotlin/cn/rdlevel/rdkt/core/test/SetGameSoundEventTest.kt +++ b/core/src/commonTest/kotlin/cn/rdlevel/rdkt/core/test/SetGameSoundEventTest.kt @@ -19,7 +19,7 @@ class SetGameSoundEventTest { } val event: Event = SetGameSoundEvent( - SmallMistakeAudioGroup(subGroupAudioDataOf("bar")) + SmallMistakeAudioGroup(subGroupAudioDataOf("bar", false, 50, 50, 50)) ).apply { bar = 114 y = 514