Added RDDeprecated.

This commit is contained in:
2026-03-06 23:32:26 +08:00
parent 4d746999b8
commit 1012db046b
2 changed files with 21 additions and 1 deletions
@@ -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
@@ -1,5 +1,6 @@
package cn.rdlevel.rdkt.core.settings package cn.rdlevel.rdkt.core.settings
import cn.rdlevel.rdkt.core.annotations.RDDeprecated
import cn.rdlevel.rdkt.core.settings.CustomClasses.INJURY import cn.rdlevel.rdkt.core.settings.CustomClasses.INJURY
@@ -56,6 +57,6 @@ public object CustomClasses {
* Replaces hearts with pumpkins. * Replaces hearts with pumpkins.
* Currently, this is broken and does not work. * 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" public const val HALLOWEEN: String = "Halloween"
} }