From b3e9c1163e03c8c1764d66e5b2d42ca2ef8c510c Mon Sep 17 00:00:00 2001 From: cracrayol Date: Tue, 15 Dec 2020 20:03:50 +0100 Subject: [PATCH 1/2] Set 23/24/25 to latest phase --- popn@asphyxia/README.md | 21 +++++----- popn@asphyxia/handler/common.ts | 72 ++++++++++++++++++++++++++------- 2 files changed, 70 insertions(+), 23 deletions(-) diff --git a/popn@asphyxia/README.md b/popn@asphyxia/README.md index 8abe1d8..0ffdcf5 100644 --- a/popn@asphyxia/README.md +++ b/popn@asphyxia/README.md @@ -1,21 +1,24 @@ # Pop'n Music -Plugin Version: **v1.0.0** +Plugin Version: **v1.1.0** -Supported Versions -------------------- +## Supported Versions - pop'n music 23 Eclale - pop'n music 24 Usagi to Neko to Shōnen no Yume - pop'n music 25 peace -Changelog -========= -1.0.0 ------ +## Changelog +#### 1.1.0 +Update phase data : All versions are on latest phase. + +#### 1.0.0 Initial Release. -How to import data from non-core Asphyxia -========================================= +## TODO +* Allows to select phase +* Add/Fix save of phase datas + +## How to import data from non-core Asphyxia To import data, you have to : * Create your popn profile in Asphyxia-core. You just have to insert your card in the game and follow the process until coming to the select mode select screen. Once here, quit the game. * Create a backup of your savedata.db file (in case something goes wrong). diff --git a/popn@asphyxia/handler/common.ts b/popn@asphyxia/handler/common.ts index 9cd2305..a2ead0a 100644 --- a/popn@asphyxia/handler/common.ts +++ b/popn@asphyxia/handler/common.ts @@ -1,39 +1,83 @@ import { getVersion } from './utils'; -const PHASE23 = [ +interface Phase { + id: number; + p: number; +} + +const PHASE23 : Phase[] = [ { id: 0, p: 16 }, { id: 1, p: 3 }, { id: 2, p: 1 }, { id: 3, p: 2 }, { id: 4, p: 1 }, - { id: 5, p: 1 }, + { id: 5, p: 2 }, { id: 6, p: 1 }, { id: 7, p: 4 }, { id: 8, p: 3 }, { id: 9, p: 4 }, { id: 10, p: 4 }, { id: 11, p: 1 }, + { id: 12, p: 1 }, { id: 13, p: 4 }, ]; -const PHASE24 = [ - { id: 3, p: 1 }, - // { id: 5, p: 1 }, +const PHASE24 : Phase[] = [ + { id: 0, p: 11 }, + { id: 1, p: 2 }, + { id: 2, p: 2 }, + { id: 3, p: 4 }, + { id: 4, p: 1 }, + { id: 5, p: 1 }, { id: 6, p: 1 }, - { id: 16, p: 1 }, - { id: 17, p: 1 }, - { id: 18, p: 1 }, - { id: 19, p: 1 }, - { id: 20, p: 1 }, + { id: 7, p: 1 }, + { id: 8, p: 2 }, + { id: 9, p: 2 }, + { id: 10, p: 15 }, + { id: 11, p: 1 }, + { id: 12, p: 2 }, + { id: 13, p: 1 }, ]; -export const getInfo = (req) => { +const PHASE25 : Phase[] = [ + { id: 0, p: 23 }, + { id: 1, p: 4 }, + { id: 2, p: 2 }, + { id: 3, p: 4 }, + { id: 4, p: 1 }, + { id: 5, p: 1 }, + { id: 6, p: 1 }, + { id: 7, p: 1 }, + { id: 8, p: 2 }, + { id: 9, p: 2 }, + { id: 10, p: 30 }, + { id: 11, p: 1 }, + { id: 12, p: 2 }, + { id: 13, p: 1 }, + { id: 14, p: 39 }, + { id: 15, p: 2 }, + { id: 16, p: 3 }, + { id: 17, p: 8 }, + { id: 18, p: 1 }, + { id: 19, p: 1 }, + { id: 20, p: 13 }, + { id: 21, p: 20 }, + { id: 22, p: 2 }, + { id: 23, p: 1 }, + { id: 24, p: 1 }, +]; + +export const getInfo = (req: EamuseInfo) => { const version = getVersion(req); if (version == 'v23') { return getInfo23(); } else if (version == 'v24') { - return getInfo24(); + if(req.model == 'M39:J:A:A:2020092800') { + return getInfo24(PHASE25); + } else { + return getInfo24(PHASE24); + } } } @@ -71,13 +115,13 @@ const getInfo23 = () => { return result; }; -const getInfo24 = () => { +const getInfo24 = (phaseData : Phase[]) => { const result: any = { phase: [], goods: [], }; - for (const phase of PHASE24) { + for (const phase of phaseData) { result.phase.push({ event_id: K.ITEM('s16', phase.id), phase: K.ITEM('s16', phase.p), From 5a0592af6d092d01cec63ec1e5b242d86e48d2de Mon Sep 17 00:00:00 2001 From: cracrayol Date: Tue, 15 Dec 2020 22:24:55 +0100 Subject: [PATCH 2/2] Update Readme --- popn@asphyxia/README.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/popn@asphyxia/README.md b/popn@asphyxia/README.md index 0ffdcf5..f0e605d 100644 --- a/popn@asphyxia/README.md +++ b/popn@asphyxia/README.md @@ -14,10 +14,6 @@ Update phase data : All versions are on latest phase. #### 1.0.0 Initial Release. -## TODO -* Allows to select phase -* Add/Fix save of phase datas - ## How to import data from non-core Asphyxia To import data, you have to : * Create your popn profile in Asphyxia-core. You just have to insert your card in the game and follow the process until coming to the select mode select screen. Once here, quit the game.