Skip to content

Commit f72cbad

Browse files
committed
fix 分数列表
1 parent 68abf5a commit f72cbad

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

apps/web/src/routes/levelProgress/components/LevelProgress.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ export default component$(({ userMusic, level, region, requiredSongIdList, logo,
1515
const charts = song.sheets.filter(chart => chart.level === level);
1616
for (const chart of charts) {
1717
// 不包括删除曲
18-
if (!chart.regions[region]) continue;
19-
// 不含 BUDDiES PLUS 的歌
20-
if (chart.version === VersionEnum.BUDDiESPLUS) continue;
18+
// if (!chart.regions[region]) continue;
2119
const score = userMusic.find(it => it.musicId === chart.internalId && it.level === LEVEL_EN.indexOf(chart.difficulty));
2220
progress[LEVEL_EN.indexOf(chart.difficulty)].all++;
2321
// TODO: 检查成绩,比如说 12 鸟加完成图

packages/types/src/Song.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,9 @@ export default class Song implements DataSong {
172172

173173
song = dxdata.songs.find(song => song.title === dataFromAllMusic.name) ||
174174
dxdata.songs.find(song => song.title.toLowerCase() === dataFromAllMusic.name.toLowerCase());
175-
if (song && dx && !song.sheets.some(it => it.type === TypeEnum.DX)) {
175+
if (song && dx && !song.sheets.some(it => it.type === TypeEnum.DX) && allMusic[id + 1e4]) {
176176
song = null;
177-
} else if (song && !dx && !song.sheets.some(it => it.type === TypeEnum.STD)) {
177+
} else if (song && !dx && !song.sheets.some(it => it.type === TypeEnum.STD) && allMusic[id]) {
178178
song = null;
179179
}
180180
if (song) return new this(song, dx, false, ver);
@@ -245,7 +245,7 @@ export default class Song implements DataSong {
245245
}
246246

247247
public static allIds = _.uniq(Object.keys(ALL_MUSIC).map(Number).map(it => it % 1e4));
248-
public static getAllSongs = (ver: MaiVersion = 155) => Song.allIds.map(id => Song.fromId(id, ver)).filter(it => it);
248+
public static getAllSongs = (ver: MaiVersion = 155) => Song.allIds.filter(it => it < 2000).map(id => Song.fromId(id, ver)).filter(it => it);
249249

250250
public getChart(difficulty: DifficultyEnum | number | typeof LEVEL[number], dx = this.dx) {
251251
if (LEVEL.includes(difficulty as any)) {

0 commit comments

Comments
 (0)