diff --git a/popn@asphyxia/README.md b/popn@asphyxia/README.md index f0e605d..eb34870 100644 --- a/popn@asphyxia/README.md +++ b/popn@asphyxia/README.md @@ -8,6 +8,11 @@ Plugin Version: **v1.1.0** - pop'n music 25 peace ## Changelog +#### 1.2.0 +* You can change your profile name +* You can enable/disable the pop'n 25 event archive event +* Net Taisen disabled on 24/25 (code not implemented) + #### 1.1.0 Update phase data : All versions are on latest phase. diff --git a/popn@asphyxia/handler/common.ts b/popn@asphyxia/handler/common.ts index a2ead0a..61068a5 100644 --- a/popn@asphyxia/handler/common.ts +++ b/popn@asphyxia/handler/common.ts @@ -28,7 +28,7 @@ const PHASE24 : Phase[] = [ { id: 2, p: 2 }, { id: 3, p: 4 }, { id: 4, p: 1 }, - { id: 5, p: 1 }, +// { id: 5, p: 1 }, // Disable Net Taisen { id: 6, p: 1 }, { id: 7, p: 1 }, { id: 8, p: 2 }, @@ -45,7 +45,7 @@ const PHASE25 : Phase[] = [ { id: 2, p: 2 }, { id: 3, p: 4 }, { id: 4, p: 1 }, - { id: 5, p: 1 }, +// { id: 5, p: 1 }, // Disable Net Taisen { id: 6, p: 1 }, { id: 7, p: 1 }, { id: 8, p: 2 }, @@ -61,7 +61,7 @@ const PHASE25 : Phase[] = [ { id: 18, p: 1 }, { id: 19, p: 1 }, { id: 20, p: 13 }, - { id: 21, p: 20 }, +// { id: 21, p: 20 }, // pop'n event archive { id: 22, p: 2 }, { id: 23, p: 1 }, { id: 24, p: 1 }, @@ -74,7 +74,9 @@ export const getInfo = (req: EamuseInfo) => { return getInfo23(); } else if (version == 'v24') { if(req.model == 'M39:J:A:A:2020092800') { - return getInfo24(PHASE25); + let phase = [...PHASE25]; + phase.push({ id: 21, p: U.GetConfig("enable_25_event") ? 20 : 0 }) + return getInfo24(phase); } else { return getInfo24(PHASE24); } diff --git a/popn@asphyxia/index.ts b/popn@asphyxia/index.ts index c5eb5bb..2b405a3 100644 --- a/popn@asphyxia/index.ts +++ b/popn@asphyxia/index.ts @@ -4,8 +4,18 @@ import { importPnmData } from "./handler/webui"; export function register() { R.GameCode('M39'); + + R.Config("enable_25_event", { + name: "PNM25 event", + desc: "Enable the pop'n event archive", + type: "boolean", + default: true, + }); R.WebUIEvent('importPnmData', importPnmData); + R.WebUIEvent('updatePnmPlayerInfo', async (data: any) => { + await DB.Update(data.refid, { collection: 'profile' }, { $set: { name: data.name } }); + }); const PlayerRoute = (method: string, handler: EPR | boolean) => { R.Route(`player24.${method}`, handler); diff --git a/popn@asphyxia/webui/profile_page.pug b/popn@asphyxia/webui/profile_page.pug index 49043ff..4190081 100644 --- a/popn@asphyxia/webui/profile_page.pug +++ b/popn@asphyxia/webui/profile_page.pug @@ -1,7 +1,28 @@ +//DATA// + profile: DB.FindOne(refid, { collection: 'profile' }) + div div.notification.is-success.is-hidden#import-success .field - label.label.is-small Data imported + label.label.is-small Data imported + .card + .card-header + p.card-header-title + span.icon + i.mdi.mdi-account-edit + | User Detail + .card-content + form(method="post" action="/emit/updatePnmPlayerInfo") + input(type="hidden" id="refid" name="refid" value=refid) + .field + label.label Name + .control + input.input(type="text" name="name" maxlength="6", value=profile.name) + .field + button.button.is-primary(type="submit") + span.icon + i.mdi.mdi-check + span Submit .card .card-header p.card-header-title @@ -9,7 +30,6 @@ div i.mdi.mdi-account-edit | Import data .card-content - input(type="hidden" id="refid" name="refid" value=refid) .field label.label Import data from previous Asphyxia (non-core) .field @@ -19,6 +39,9 @@ div .field label.help.is-danger /!\ Please backup your savedata.db before importing data /!\ .field - button.button.is-primary#import-click Import + button.button.is-primary#import-click + span.icon + i.mdi.mdi-file-import-outline + span Import script(src="static/js/profile_page.js") \ No newline at end of file