diff --git a/bst@asphyxia/README.md b/bst@asphyxia/README.md index c4ffc86..e1e4ebc 100644 --- a/bst@asphyxia/README.md +++ b/bst@asphyxia/README.md @@ -1,6 +1,6 @@ # BeatStream -Plugin Version: **v1.0.0** +Plugin Version: **v1.0.1** Supported Versions: diff --git a/bst@asphyxia/handlers/bst2/common.ts b/bst@asphyxia/handlers/bst2/common.ts index 8039168..89d0206 100644 --- a/bst@asphyxia/handlers/bst2/common.ts +++ b/bst@asphyxia/handlers/bst2/common.ts @@ -111,12 +111,13 @@ export namespace Bst2HandlersCommon { } while ((await DB.Find(null, { collection: "bst.bst2.player.account", userId: userId })).length > 0) oldAccount = fromMap(Bst2AccountMap) oldAccount.userId = userId + } else { + oldAccount.playCount++ + if (!isToday(toBigInt(oldAccount.standardTime))) { + oldAccount.dayCount++ + oldAccount.playCountToday = 1 + } else oldAccount.playCountToday++ } - oldAccount.playCount++ - if (!isToday(toBigInt(oldAccount.standardTime))) { - oldAccount.dayCount++ - oldAccount.playCountToday = 1 - } else oldAccount.playCountToday++ oldAccount.standardTime = BigIntProxy(BigInt(Date.now())) opm.upsert(refid, { collection: "bst.bst2.player.account" }, oldAccount) if (player.pdata.base) opm.upsert(refid, { collection: "bst.bst2.player.base" }, player.pdata.base) @@ -130,7 +131,7 @@ export namespace Bst2HandlersCommon { if (player.pdata.playLog?.crysis?.length > 0) for (let c of player.pdata.playLog.crysis) opm.upsert(refid, { collection: "bst.bst2.player.event.crysis", id: c.id, stageId: c.stageId }, c) await DBM.operate(opm) - send.object({ uid: K.ITEM("s32", 0) }) + send.object({ uid: K.ITEM("s32", oldAccount.userId) }) } export const WriteStageLog: EPR = async (_, data, send) => { diff --git a/bst@asphyxia/webui/profile_detail.pug b/bst@asphyxia/webui/profile_detail.pug index 44b8094..a87f3ff 100644 --- a/bst@asphyxia/webui/profile_detail.pug +++ b/bst@asphyxia/webui/profile_detail.pug @@ -48,9 +48,9 @@ let bst2HighestRank = -1 for (let r of bst2Course) if ((r.courseId > bst2HighestRank) && (r.medal >= 3)) bst2HighestRank = r.courseId function getClearTypeDetails(record) { - if (record.medal == 5) return { title: "Perfect", abbr: "P", color: "#FF3860", badge: "mdi mdi-weather-sunny mdi-48px" } + if (record.medal == 5) return { title: "Perfect", abbr: "P", color: "#FF3860; text-shadow: 0 0 5px #FFFFFF9F;", badge: "mdi mdi-decagram mdi-48px" } else if (record.medal == 4) return { title: "Full Combo", abbr: "FC", color: "gold", badge: "mdi mdi-cog mdi-48px" } - else if (record.medal == 3) return { title: "Clear", abbr: "C", color: "#35F2BE", badge: "mdi mdi-star-circle-outline mdi-48px"} + else if (record.medal == 3) return { title: "Clear", abbr: "C", color: "#33E7AD", badge: "mdi mdi-star-circle-outline mdi-48px"} else if ((record.medal == 2) || (record.medal == 1)) return { title: "Failed", abbr: "F", color: "#837E8D", badge: "mdi mdi-close-circle-outline mdi-48px"} else return null }