diff --git a/.env.development b/.env.development index ec68b42..85eb71d 100644 --- a/.env.development +++ b/.env.development @@ -1,4 +1,4 @@ -VITE_APP_VERSION="3.0.35" +VITE_APP_VERSION="3.0.36" VITE_API_URL="http://localhost:8000/" VITE_API_KEY="your_api_key_should_be_here" VITE_ASSET_PATH="/assets" diff --git a/.env.production b/.env.production index 7ebca9b..59ae6b4 100644 --- a/.env.production +++ b/.env.production @@ -1,4 +1,4 @@ -VITE_APP_VERSION="3.0.35" +VITE_APP_VERSION="3.0.36" VITE_API_URL="https://restfulsleep.phaseii.network" VITE_API_KEY="your_api_key_should_be_here" VITE_ASSET_PATH="https://cdn.phaseii.network/file/PhaseII/web-assets" diff --git a/public/data-sources/changelog.json b/public/data-sources/changelog.json index 4b1b74d..d43ab46 100644 --- a/public/data-sources/changelog.json +++ b/public/data-sources/changelog.json @@ -34,5 +34,6 @@ "3.0.32": ["- (Major) Change phase \"Attempt\" to \"Score\"", "- (Bugfix) Fix pop'n music version sorting", "- (Bugfix) Fix Gitadora chart data formatting issues", "- (Bugfix) Filter personal records to songs with scores"], "3.0.33": ["- (Major) Condense all score tables to one parser and format", "- (Major) Add more game metadata", "- (Bugfix) Fix difficulties showing as `NaN`", "- (Beta) Add a developmental device plugin for card effect"], "3.0.34": ["- (Major) Add support for Jubeat titles", "- (Major) Add base BTA support"], - "3.0.35": ["- (Bugfix) Fix cursor hover state on news card and profile card", "- (Minor) Update DDR game options", "- (Minor) Update IIDX event settings", "- (Minor) Add IIDX 32 basic QPro settings"] + "3.0.35": ["- (Bugfix) Fix cursor hover state on news card and profile card", "- (Minor) Update DDR game options", "- (Minor) Update IIDX event settings", "- (Minor) Add IIDX 32 basic QPro settings"], + "3.0.36": ["- (Major) Finish more game metadata (DRS, Museca, Nostalgia, pop'n, jubeat)"] } \ No newline at end of file diff --git a/src/constants/index.js b/src/constants/index.js index 77a38b1..f961d61 100644 --- a/src/constants/index.js +++ b/src/constants/index.js @@ -1574,7 +1574,19 @@ export const gameData = [ 500: "A", 600: "S", 700: "SS", - 800: "EXC", + 800: "SSS", + 900: "EXC", + }, + ratingTable: { + 0: 100, + 500000: 200, + 700000: 300, + 800000: 400, + 850000: 500, + 900000: 600, + 950000: 700, + 980000: 800, + 1000000: 900, }, medalTable: { 100: "FAILED", @@ -1703,9 +1715,25 @@ export const gameData = [ 1: "ORANGE", 2: "RED", }, + rankTable: { + 100: "没 (DEATH)", + 200: "拙 (POOR)", + 300: "凡 (MEDIOCRE)", + 400: "佳 (GOOD)", + 500: "良 (GREAT)", + 600: "優 (EXCELLENT)", + 700: "秀 (SUPERB)", + 800: "傑 (MASTERPIECE)", + 900: "傑 (PERFECT)", + }, + medalTable: { + 100: "FAILED", + 200: "CLEARED", + 300: "FULL COMBO", + }, scoreHeaders: [ - { text: "Combos", value: "combo", width: 80 }, - { text: "Halo", value: "halo", width: 80 }, + { text: "Combos", value: "data.combo", width: 80 }, + { text: "Medal", value: "data.clear_type", width: 80 }, ], versions: [ { @@ -1731,8 +1759,8 @@ export const gameData = [ 3: "REAL", }, scoreHeaders: [ - { text: "Combos", value: "combo", width: 80 }, - { text: "Halo", value: "halo", width: 80 }, + { text: "Combos", value: "data.combo", width: 80 }, + // { text: "Medal", value: "data.clear_flag", width: 80 }, ], versions: [ { @@ -1809,10 +1837,44 @@ export const gameData = [ 2: "HYPER", 3: "EX", }, + rankTable: { + 100: "E", + 200: "D", + 300: "C", + 400: "B", + 500: "A", + 600: "AA", + 700: "AAA", + 800: "S", + }, + ratingTable: { + 0: 100, + 50000: 200, + 62000: 300, + 72000: 400, + 82000: 500, + 90000: 600, + 95000: 700, + 98000: 800, + }, + medalTable: { + 100: "🔴 FAILED", + 200: "♦️ FAILED", + 300: "⭐ FAILED", + 400: "EASY CLEAR", + 500: "🟢 CLEAR", + 600: "🔷 CLEAR", + 700: "🌟 CLEAR", + 800: "🟡 FULL COMBO", + 900: "💎 FULL COMBO", + 1000: "🌠 FULL COMBO", + 1100: "PERFECT", + }, scoreHeaders: [ - { text: "Combos", value: "combo", width: 80 }, - { text: "Halo", value: "halo", width: 80 }, + { text: "Combos", value: "data.combo", width: 80 }, + { text: "Medal", value: "data.medal", width: 120 }, ], + scoreMultiplier: 10, versions: [ { id: 0, diff --git a/src/constants/scoreDataFilters.js b/src/constants/scoreDataFilters.js index 9cab3c2..0a28ec9 100644 --- a/src/constants/scoreDataFilters.js +++ b/src/constants/scoreDataFilters.js @@ -7,7 +7,24 @@ export function shouldRenderChart(difficulty, chartTable, chartKey) { export function formatDifficulty(difficulty, difficultyDenom = 1) { if (isNaN(difficulty / difficultyDenom)) { - return difficulty; + return difficulty.difnum ? difficulty.difnum : difficulty; } return difficulty / difficultyDenom; } + +export function rankFromScore(ratingTable, score) { + const thresholds = Object.entries(ratingTable) + .map(([k, v]) => [Number(k), v]) + .sort((a, b) => a[0] - b[0]); + + var result = 100; + for (const [threshold, rank] of thresholds) { + if (score >= threshold) { + result = rank; + } else { + break; + } + } + + return result; +} diff --git a/src/constants/table/scores.js b/src/constants/table/scores.js index 304e745..5243534 100644 --- a/src/constants/table/scores.js +++ b/src/constants/table/scores.js @@ -1,5 +1,5 @@ import { formatSortableDate } from "@/constants/date"; -import { formatDifficulty } from "@/constants/scoreDataFilters"; +import { formatDifficulty, rankFromScore } from "@/constants/scoreDataFilters"; export function scoreHeaders(thisGame) { const headers = [ @@ -55,19 +55,6 @@ export function formatScoreTable(thisGame, scores) { item.timestamp = formatSortableDate(item.timestamp); } - if (item.points != undefined) { - item.points = item.points - .toString() - .replace(/\B(?