From 993595ff99be324388b51f9f8e7f844d892df28f Mon Sep 17 00:00:00 2001 From: duel0213 Date: Thu, 17 Oct 2024 19:47:22 +0900 Subject: [PATCH] IIDX: Fixed score import (DP/WebUI typo) --- iidx@asphyxia/README.md | 3 ++- iidx@asphyxia/handlers/webui.ts | 8 ++++---- iidx@asphyxia/webui/profile_-data.pug | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/iidx@asphyxia/README.md b/iidx@asphyxia/README.md index 9a5f55d..9bc131e 100644 --- a/iidx@asphyxia/README.md +++ b/iidx@asphyxia/README.md @@ -153,5 +153,6 @@ Changelogs - Added music\_open on gameSystem.systemInfo response - Fixed where lightning settings doesn't get saved on logout - Fixed where Disable Music Preview, Disable HCN Color, VEFX Lock settings doesn't reflect - - Fixed where MISS COUNT has 0 as default + - Fixed where MISS COUNT has 0 as default (including score import) + - Fixed where unable to import DP scores - WebUI is now display values of corresponding version diff --git a/iidx@asphyxia/handlers/webui.ts b/iidx@asphyxia/handlers/webui.ts index 71e3d71..39f2fe3 100644 --- a/iidx@asphyxia/handlers/webui.ts +++ b/iidx@asphyxia/handlers/webui.ts @@ -307,7 +307,7 @@ export const importScoreData = async (data, send: WebUISend) => { let result = { pgArray: Array(10).fill(0), gArray: Array(10).fill(0), - mArray: Array(10).fill(0), + mArray: Array(10).fill(-1), cArray: Array(10).fill(0), rArray: Array(10).fill(-1), esArray: Array(10).fill(0), @@ -326,9 +326,9 @@ export const importScoreData = async (data, send: WebUISend) => { if (!_.isNil(sd_ver1[a].dpmArray)) { for (let b = 5; b < 10; b++) { - result.cArray[b] = sd_ver1[a].dpmArray[2 + b]; - result.esArray[b] = sd_ver1[a].dpmArray[7 + b]; - if (sd_ver1[a].dpmArray[12 + b] != -1) result.mArray[b] = sd_ver1[a].dpmArray[12 + b]; + result.cArray[b] = sd_ver1[a].dpmArray[2 + (b - 5)]; + result.esArray[b] = sd_ver1[a].dpmArray[7 + (b - 5)]; + if (sd_ver1[a].dpmArray[12 + (b - 5)] != -1) result.mArray[b] = sd_ver1[a].dpmArray[12 + (b - 5)]; } } diff --git a/iidx@asphyxia/webui/profile_-data.pug b/iidx@asphyxia/webui/profile_-data.pug index d7a7ff4..ab0f3cb 100644 --- a/iidx@asphyxia/webui/profile_-data.pug +++ b/iidx@asphyxia/webui/profile_-data.pug @@ -7,7 +7,7 @@ div | Data Management .card-content .field - label.label [!] This will overwrite exsiting scores + label.label [!] This will overwrite existing scores form(method="post" action="/emit/iidxImportScoreData") .field input(type="text" name="refid", value=refid readonly hidden)