Add change name, enable/disable popn 25 event

Disable NET Taisen
This commit is contained in:
cracrayol 2020-12-19 02:22:17 +01:00
parent 7c776accf4
commit 5a4db13a88
4 changed files with 47 additions and 7 deletions

View File

@ -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.

View File

@ -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);
}

View File

@ -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);

View File

@ -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")