diff --git a/core/src/commonMain/kotlin/cn/rdlevel/rdkt/core/annotations/RDDeprecated.kt b/core/src/commonMain/kotlin/cn/rdlevel/rdkt/core/annotations/RDDeprecated.kt new file mode 100644 index 0000000..c29131b --- /dev/null +++ b/core/src/commonMain/kotlin/cn/rdlevel/rdkt/core/annotations/RDDeprecated.kt @@ -0,0 +1,19 @@ +package cn.rdlevel.rdkt.core.annotations + +/** + * This annotation marks APIs that are not recommended for use in levels, either because they are broken, or there are better alternatives available. Use with caution. + */ +@MustBeDocumented +@Target( + AnnotationTarget.CLASS, + AnnotationTarget.FUNCTION, + AnnotationTarget.PROPERTY, + AnnotationTarget.TYPEALIAS, + AnnotationTarget.CONSTRUCTOR, +) +@Retention(AnnotationRetention.BINARY) +@RequiresOptIn( + "This API is not recommended for use in levels, either because it is broken, or there are better alternatives available. Use with caution.", + RequiresOptIn.Level.WARNING, +) +public annotation class RDDeprecated \ No newline at end of file diff --git a/core/src/commonMain/kotlin/cn/rdlevel/rdkt/core/settings/CustomClasses.kt b/core/src/commonMain/kotlin/cn/rdlevel/rdkt/core/settings/CustomClasses.kt index abd51db..0f27452 100644 --- a/core/src/commonMain/kotlin/cn/rdlevel/rdkt/core/settings/CustomClasses.kt +++ b/core/src/commonMain/kotlin/cn/rdlevel/rdkt/core/settings/CustomClasses.kt @@ -1,5 +1,6 @@ package cn.rdlevel.rdkt.core.settings +import cn.rdlevel.rdkt.core.annotations.RDDeprecated import cn.rdlevel.rdkt.core.settings.CustomClasses.INJURY @@ -56,6 +57,6 @@ public object CustomClasses { * Replaces hearts with pumpkins. * Currently, this is broken and does not work. */ - @Deprecated("This custom class is currently broken and does not work.") + @RDDeprecated public const val HALLOWEEN: String = "Halloween" } \ No newline at end of file