This commit is contained in:
Azalea
2025-01-05 02:13:55 -05:00
parent 96fb815bd8
commit 56e424c29b
13 changed files with 31 additions and 24 deletions

View File

@@ -91,7 +91,7 @@ fun ChusanController.chusanInit() {
data["nextIndex"] = rawIndex % 10000000000L
mapOf("itemKind" to kind) grabs {
// TODO: All unlock
val items = db.userItem.findAllByUser_Card_ExtIdAndItemKind(uid, kind).toMutableList()
val items = db.userItem.findAllByUser_Card_ExtIdAndItemKind(uid, kind).mut
// Check game options
db.userData.findByCard_ExtId(uid)()?.card?.aquaUser?.gameOptions?.let {
@@ -146,7 +146,7 @@ fun ChusanController.chusanInit() {
// Compatibility: Older chusan uses boolean for isSuccess
fun checkAncient(d: List<UserMusicDetail>) =
data["version"]?.double?.let { if (it >= 2.15) d else d.map {
d.toJson().jsonMap().toMutableMap().apply { this["isSuccess"] = this["isSuccess"].truthy }
d.toJson().jsonMap().mut.apply { this["isSuccess"] = this["isSuccess"].truthy }
} } ?: d
db.userMusicDetail.findByUser_Card_ExtId(uid).groupBy { it.musicId }