diff --git a/AquaNet/src/components/GameSettingFields.svelte b/AquaNet/src/components/GameSettingFields.svelte index 61f1a092..4364e181 100644 --- a/AquaNet/src/components/GameSettingFields.svelte +++ b/AquaNet/src/components/GameSettingFields.svelte @@ -73,8 +73,4 @@ .desc opacity: 0.6 - - input[type="text"] - flex: 1 - width: 100% diff --git a/AquaNet/src/components/RatingCompSong.svelte b/AquaNet/src/components/RatingCompSong.svelte index fed7071b..edfa7811 100644 --- a/AquaNet/src/components/RatingCompSong.svelte +++ b/AquaNet/src/components/RatingCompSong.svelte @@ -2,24 +2,14 @@ @@ -29,7 +19,7 @@
-
{meta?.name ?? t("UserHome.UnknownSong")}
+
{p.name ?? t("UserHome.UnknownSong")}
{ p.difficulty ?? '-' } @@ -42,7 +32,7 @@ {#if p.ratingChange !== undefined} - { p.ratingChange.toFixed(1) } + { p.ratingChange } {/if}
diff --git a/AquaNet/src/components/RatingComposition.svelte b/AquaNet/src/components/RatingComposition.svelte index 0bfa7a88..45cf13dd 100644 --- a/AquaNet/src/components/RatingComposition.svelte +++ b/AquaNet/src/components/RatingComposition.svelte @@ -2,22 +2,26 @@ -{#if comp} +{#if split}

{title}

- {#each comp.split(",").filter(it => it.split(":")[0] !== '0') as map} + {#each split as p}
- +
{/each}
diff --git a/AquaNet/src/libs/scoring.ts b/AquaNet/src/libs/scoring.ts index acee0e85..5126a054 100644 --- a/AquaNet/src/libs/scoring.ts +++ b/AquaNet/src/libs/scoring.ts @@ -102,7 +102,8 @@ export function chusanRating(lv: number, score: number) { return 0; // C } -interface ParsedComposition { +export interface ParsedComposition { + name?: string musicId: number diffId: number // ID of the difficulty score: number @@ -111,7 +112,7 @@ interface ParsedComposition { rank: string // e.g. 'SSS+' difficulty?: number // Actual difficulty of the map img: string - ratingChange?: number // Rating change after playing this map + ratingChange?: string // Rating change after playing this map } @@ -127,17 +128,18 @@ export function parseComposition(item: string, meta: MusicMeta, game: GameName): const [ cutoff, mult ] = [ +tup[0], +tup[1] ] const rank = tup[2] as string - let diff = meta?.notes?.[mapData[1] === 10 ? 0 : mapData[1]]?.lv + let diff = meta?.notes?.[diffId === 10 ? 0 : diffId]?.lv function calcDxChange() { if (!diff) return if (game === 'mai2') - return Math.floor(diff * +mult * (Math.min(100.5, mapData[3] / 10000) / 100)) + return Math.floor(diff * mult * (Math.min(100.5, score / 10000) / 100)).toFixed(0) if (game === 'chu3') - return chusanRating(diff, score) / 100 + return (chusanRating(diff, score) / 100).toFixed(1) } return { + name: meta?.name, musicId, diffId, score,