Moved allowOldLevels setting to RDLevel.kt.

This commit is contained in:
2026-03-31 16:23:26 +08:00
parent e8713c08c7
commit 18bf5dbff4
2 changed files with 12 additions and 9 deletions
@@ -1,7 +1,11 @@
@file:JvmName("RDLevels")
package cn.rdlevel.rdkt.core
import cn.rdlevel.rdkt.core.annotations.RDKTExperimentalAPI
import cn.rdlevel.rdkt.core.settings.LevelSettings
import kotlinx.serialization.Serializable
import kotlin.jvm.JvmName
/**
* A Rhythm Doctor custom level representation.
@@ -10,5 +14,11 @@ import kotlinx.serialization.Serializable
public data class RDLevel(
public val settings: LevelSettings,
) {
}
/**
* Allows using levels with versions other than [LevelSettings.CURRENT_LEVEL_VERSION].
* It is not recommended to use this unless you know what you are doing, as it may cause unexpected behavior and this library may not be compatible with levels with other versions.
*/
@RDKTExperimentalAPI
public var allowOldLevels: Boolean = false
@@ -2,11 +2,11 @@
package cn.rdlevel.rdkt.core.settings
import cn.rdlevel.rdkt.core.allowOldLevels
import cn.rdlevel.rdkt.core.annotations.RDKTExperimentalAPI
import cn.rdlevel.rdkt.core.annotations.RDKTInternalAPI
import cn.rdlevel.rdkt.core.serialization.MutableStringListSerializedInString
import cn.rdlevel.rdkt.core.settings.LevelSettings.Companion.CURRENT_LEVEL_VERSION
import cn.rdlevel.rdkt.core.settings.LevelSettings.Companion.allowOldLevels
import kotlinx.serialization.Serializable
import kotlin.jvm.JvmName
import kotlin.random.Random
@@ -207,13 +207,6 @@ public class LevelSettings {
* The current level version the level editor is using.
*/
public const val CURRENT_LEVEL_VERSION: Int = 67
/**
* Allows using levels with versions other than [CURRENT_LEVEL_VERSION].
* It is not recommended to use this unless you know what you are doing, as it may cause unexpected behavior and this library may not be compatible with levels with other versions.
*/
@RDKTExperimentalAPI
public var allowOldLevels: Boolean = false
}
}