forked from Cookies_Github_mirror/AquaDX
[M] Move setting descriptions to i18n
This commit is contained in:
@@ -47,7 +47,7 @@ annotation class Doc(
|
||||
|
||||
@Target(AnnotationTarget.PROPERTY)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class SettingField(val name: Str, val desc: Str)
|
||||
annotation class SettingField
|
||||
|
||||
// Reflection
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
|
||||
@@ -20,11 +20,8 @@ class SettingsApi(
|
||||
val fields = AquaGameOptions::class.vars()
|
||||
.mapNotNull { it.findAnnotation<SettingField>()?.let { an -> it to an } }
|
||||
val fieldMap = fields.associate { (f, _) -> f.name to f }
|
||||
val fieldDesc = fields.map { (f, an) -> mapOf(
|
||||
"key" to f.name,
|
||||
"name" to an.name,
|
||||
"desc" to an.desc,
|
||||
"type" to f.returnType.jvmErasure.simpleName
|
||||
val fieldDesc = fields.map { (f, _) -> mapOf(
|
||||
"key" to f.name, "type" to f.returnType.jvmErasure.simpleName
|
||||
) }
|
||||
|
||||
@API("get")
|
||||
|
||||
@@ -14,21 +14,16 @@ class AquaGameOptions(
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
var id: Long = 0,
|
||||
|
||||
@SettingField("Unlock All Music",
|
||||
"Unlock all music and master difficulty in game")
|
||||
@SettingField
|
||||
var unlockMusic: Boolean = false,
|
||||
|
||||
@SettingField("Unlock All Chara",
|
||||
"Unlock all characters and partners in game")
|
||||
@SettingField
|
||||
var unlockChara: Boolean = false,
|
||||
|
||||
@SettingField("Unlock All Collectables",
|
||||
"Unlock all collectables (nameplate, title, icon, frame) in game. " +
|
||||
"This setting is not relevant in chusan because in-game user box is disabled in chusan.")
|
||||
@SettingField
|
||||
var unlockCollectables: Boolean = false,
|
||||
|
||||
@SettingField("Unlock All Tickets" ,
|
||||
"Unlock all map tickets (the game still limits which tickets can be used)")
|
||||
@SettingField
|
||||
var unlockTickets: Boolean = false,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user