From 6b158087b5855e05e0da0e7408c1d20f4ecfa2ec Mon Sep 17 00:00:00 2001 From: cracrayol Date: Sun, 16 May 2021 22:14:21 +0200 Subject: [PATCH] Usaneko/Peace : Add Omnimix support --- popn@asphyxia/README.md | 5 ++++- popn@asphyxia/handler/usaneko.ts | 12 ++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/popn@asphyxia/README.md b/popn@asphyxia/README.md index ba6a4f7..6eb1f2b 100644 --- a/popn@asphyxia/README.md +++ b/popn@asphyxia/README.md @@ -1,6 +1,6 @@ # Pop'n Music -Plugin Version: **v2.2.1** +Plugin Version: **v2.2.2** ## Supported Versions - pop'n music 19 Tune Street @@ -15,6 +15,9 @@ Important : require minimum Asphyxia Core **v1.31** ## Changelog +### 2.2.2 +* Usaneko/Peace : Add Omnimix support (songs with id >= 3000). + ### 2.2.1 * Tune Street : User customization is now saved * Fix 1.x to 2.x conversion code when there are multiple profiles diff --git a/popn@asphyxia/handler/usaneko.ts b/popn@asphyxia/handler/usaneko.ts index 46fd825..314fa94 100644 --- a/popn@asphyxia/handler/usaneko.ts +++ b/popn@asphyxia/handler/usaneko.ts @@ -166,6 +166,7 @@ const readScore = async (req: EamuseInfo, data: any, send: EamuseSend): Promise< const getScores = async (refid: string, version: string, forFriend: boolean = false) => { const scoresData = await utils.readScores(refid, version); const result = []; + const maxMusicId = GAME_MAX_MUSIC_ID[isOmni ? 'omni' : version]; for (const key in scoresData.scores) { const keyData = key.split(':'); @@ -186,7 +187,7 @@ const getScores = async (refid: string, version: string, forFriend: boolean = fa 1100: 11, }[score.clear_type]; - if (music > GAME_MAX_MUSIC_ID[version]) { + if (music > maxMusicId) { continue; } if ([0, 1, 2, 3].indexOf(sheet) == -1) { @@ -667,7 +668,13 @@ const friend = async (req: EamuseInfo, data: any, send: EamuseSend): Promise { + if(req.model.indexOf('J:A:X') >= 0) { + isOmni = true; + } + const date: number = parseInt(req.model.match(/:(\d*)$/)[1]); if (date >= 2018101700) { return 'v25'; @@ -678,7 +685,8 @@ const getVersion = (req: EamuseInfo): string => { const GAME_MAX_MUSIC_ID = { v24: 1704, - v25: 1877 + v25: 1877, + omni: 3155 } const defaultAchievements: AchievementsUsaneko = {