mirror of
https://github.com/asphyxia-core/plugins.git
synced 2026-03-22 09:54:43 -05:00
Compare commits
No commits in common. "stable" and "0.5" have entirely different histories.
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,6 +1,5 @@
|
|||
# Editor configs
|
||||
.vscode
|
||||
.idea
|
||||
|
||||
# External modules
|
||||
node_modules
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ I don't actually follow any coding rules for this jank so neither should you. Th
|
|||
I'll do my best to merge PR, but please make sure you are submitting code targeted for "public" releases. (Unless it is some ancient rare stuff and you feel generous enough to provide support for it)
|
||||
|
||||
- For new plugins: please use `@asphyxia` identifier for your plugin since you are submitting code as the community.
|
||||
- This way we prevent third-party plugins (e.g. `popn` or `popn@someoneelse`) from conflicting with our database.
|
||||
- For existing plugins: please inlude a changelog in your PR so it is easier for me to tell what it is for.
|
||||
|
||||
## How do I make plugins?
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# BeatStream
|
||||
|
||||
Plugin Version: **v1.0.2**
|
||||
Plugin Version: **v1.0.1**
|
||||
|
||||
Supported Versions:
|
||||
|
||||
|
|
|
|||
|
|
@ -20,10 +20,8 @@ export namespace Bst2HandlersWebUI {
|
|||
sfxStreamNoteTail: number
|
||||
}) => {
|
||||
try {
|
||||
let base = await DB.FindOne<IBst2Base>(data.refid, { collection: "bst.bst2.player.base" })
|
||||
let customization = await DB.FindOne<IBst2Customization>(data.refid, { collection: "bst.bst2.player.customization" })
|
||||
if (!customization || !base) throw new Error("No profile for refid=" + data.refid)
|
||||
base.name = data.name
|
||||
if (customization == null) throw new Error("No profile for refid=" + data.refid)
|
||||
customization.custom[0] = data.rippleNote
|
||||
customization.custom[2] = data.sfxNormalNote
|
||||
customization.custom[3] = data.sfxRippleNote
|
||||
|
|
@ -32,7 +30,6 @@ export namespace Bst2HandlersWebUI {
|
|||
customization.custom[6] = data.backgroundBrightness
|
||||
customization.custom[7] = (data.judgeText << 0) | (data.rippleNoteGuide << 1) | (data.streamNoteGuide << 2) | (data.sfxStreamNoteTail << 3) | (data.sfxFine << 4)
|
||||
customization.custom[9] = data.judgeText
|
||||
DBM.update<IBst2Base>(data.refid, { collection: "bst.bst2.player.base" }, base)
|
||||
DBM.update<IBst2Customization>(data.refid, { collection: "bst.bst2.player.customization" }, customization)
|
||||
UtilityHandlersWebUI.pushMessage("Save BeatStream Animtribe settings succeeded!", 2, WebUIMessageType.success, data.refid)
|
||||
} catch (e) {
|
||||
|
|
|
|||
|
|
@ -1,18 +0,0 @@
|
|||
# Dance Dance Revolution
|
||||
|
||||

|
||||
|
||||
---
|
||||
|
||||
Supported version
|
||||
|
||||
- Dance Dance Revolution A20
|
||||
- Dance Dance Revolution A
|
||||
|
||||
---
|
||||
|
||||
Changelogs
|
||||
|
||||
**v1.0.0**
|
||||
|
||||
- Initial release
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
export const eventLog: EPR = (info, data, send) => {
|
||||
return send.object({
|
||||
gamesession: K.ITEM("s64", BigInt(1)),
|
||||
logsendflg: K.ITEM("s32", 0),
|
||||
logerrlevel: K.ITEM("s32", 0),
|
||||
evtidnosendflg: K.ITEM("s32", 0)
|
||||
});
|
||||
};
|
||||
|
||||
export const convcardnumber: EPR = (info, data, send) => {
|
||||
return send.object({
|
||||
result: K.ITEM("s32", 0),
|
||||
|
||||
data: {
|
||||
card_number: K.ITEM("str", $(data).str("data.card_id").split("|")[0])
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
@ -1,275 +0,0 @@
|
|||
import { CommonOffset, LastOffset, OptionOffset, Profile } from "../models/profile";
|
||||
import { formatCode } from "../utils";
|
||||
import { Score } from "../models/score";
|
||||
import { Ghost } from "../models/ghost";
|
||||
|
||||
enum GameStyle {
|
||||
SINGLE,
|
||||
DOUBLE,
|
||||
VERSUS
|
||||
}
|
||||
|
||||
export const usergamedata: EPR = async (info, data, send) => {
|
||||
const mode = $(data).str("data.mode");
|
||||
const refId = $(data).str("data.refid");
|
||||
|
||||
switch (mode) {
|
||||
case "userload":
|
||||
return send.object(await userload(refId));
|
||||
case "usernew":
|
||||
return send.object(await usernew(refId, data));
|
||||
case "usersave":
|
||||
return send.object(await usersave(refId, data));
|
||||
case "rivalload":
|
||||
return send.object(await rivalload(refId, data));
|
||||
case "ghostload":
|
||||
return send.object(await ghostload(refId, data));
|
||||
case "inheritance":
|
||||
return send.object(inheritance(refId));
|
||||
default:
|
||||
return send.deny();
|
||||
}
|
||||
};
|
||||
|
||||
const userload = async (refId: string) => {
|
||||
let resObj = {
|
||||
result: K.ITEM("s32", 0),
|
||||
is_new: K.ITEM("bool", false),
|
||||
music: [],
|
||||
eventdata: []
|
||||
};
|
||||
|
||||
if (!refId.startsWith("X000")) {
|
||||
const profile = await DB.FindOne<Profile>(refId, { collection: "profile" });
|
||||
|
||||
if (!profile) resObj.is_new = K.ITEM("bool", true);
|
||||
|
||||
const scores = await DB.Find<Score>(refId, { collection: "score" });
|
||||
|
||||
for (const score of scores) {
|
||||
const note = [];
|
||||
|
||||
for (let i = 0; i < 9; i++) {
|
||||
if (score.difficulty !== i) {
|
||||
note.push({
|
||||
count: K.ITEM("u16", 0),
|
||||
rank: K.ITEM("u8", 0),
|
||||
clearkind: K.ITEM("u8", 0),
|
||||
score: K.ITEM("s32", 0),
|
||||
ghostid: K.ITEM("s32", 0)
|
||||
});
|
||||
} else {
|
||||
note.push({
|
||||
count: K.ITEM("u16", 1),
|
||||
rank: K.ITEM("u8", score.rank),
|
||||
clearkind: K.ITEM("u8", score.clearKind),
|
||||
score: K.ITEM("s32", score.score),
|
||||
ghostid: K.ITEM("s32", score.songId)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
resObj.music.push({
|
||||
mcode: K.ITEM("u32", score.songId),
|
||||
note
|
||||
});
|
||||
}
|
||||
|
||||
resObj["grade"] = {
|
||||
single_grade: K.ITEM("u32", profile.singleGrade || 0),
|
||||
dougle_grade: K.ITEM("u32", profile.doubleGrade || 0)
|
||||
};
|
||||
}
|
||||
|
||||
return resObj;
|
||||
};
|
||||
|
||||
const usernew = async (refId: string, data: any) => {
|
||||
const shopArea = $(data).str("data.shoparea", "");
|
||||
|
||||
let profile = await DB.FindOne<Profile>(refId, { collection: "profile" });
|
||||
|
||||
if (!profile) {
|
||||
profile = (await DB.Upsert<Profile>(refId, { collection: "profile" }, {
|
||||
collection: "profile",
|
||||
ddrCode: _.random(1, 99999999),
|
||||
shopArea
|
||||
})).docs[0];
|
||||
}
|
||||
|
||||
return {
|
||||
result: K.ITEM("s32", 0),
|
||||
seq: K.ITEM("str", formatCode(profile.ddrCode)),
|
||||
code: K.ITEM("s32", profile.ddrCode),
|
||||
shoparea: K.ITEM("str", profile.shopArea),
|
||||
};
|
||||
};
|
||||
|
||||
const usersave = async (refId: string, serverData: any) => {
|
||||
const profile = await DB.FindOne<Profile>(refId, { collection: "profile" });
|
||||
|
||||
if (profile) {
|
||||
const data = $(serverData).element("data");
|
||||
const notes = data.elements("note");
|
||||
const events = data.elements("event");
|
||||
|
||||
const common = profile.usergamedata.COMMON.strdata.split(",");
|
||||
const option = profile.usergamedata.OPTION.strdata.split(",");
|
||||
const last = profile.usergamedata.LAST.strdata.split(",");
|
||||
|
||||
if (data.bool("isgameover")) {
|
||||
const style = data.number("playstyle");
|
||||
|
||||
if (style === GameStyle.DOUBLE) {
|
||||
common[CommonOffset.DOUBLE_PLAYS] = (parseInt(common[CommonOffset.DOUBLE_PLAYS]) + 1) + "";
|
||||
} else {
|
||||
common[CommonOffset.SINGLE_PLAYS] = (parseInt(common[CommonOffset.SINGLE_PLAYS]) + 1) + "";
|
||||
}
|
||||
|
||||
common[CommonOffset.TOTAL_PLAYS] = (+common[CommonOffset.DOUBLE_PLAYS]) + (+common[CommonOffset.SINGLE_PLAYS]) + "";
|
||||
|
||||
const workoutEnabled = !!+common[CommonOffset.WEIGHT_DISPLAY];
|
||||
const workoutWeight = +common[CommonOffset.WEIGHT];
|
||||
|
||||
if (workoutEnabled && workoutWeight > 0) {
|
||||
let total = 0;
|
||||
|
||||
for (const note of notes) {
|
||||
total = total + note.number("calorie", 0);
|
||||
}
|
||||
|
||||
last[LastOffset.CALORIES] = total + "";
|
||||
}
|
||||
|
||||
for (const event of events) {
|
||||
const eventId = event.number("eventid", 0);
|
||||
const eventType = event.number("eventtype", 0);
|
||||
if (eventId === 0 || eventType === 0) continue;
|
||||
|
||||
const eventCompleted = event.number("comptime") !== 0;
|
||||
const eventProgress = event.number("savedata");
|
||||
|
||||
if (!profile.events) profile.events = {};
|
||||
profile.events[eventId] = {
|
||||
completed: eventCompleted,
|
||||
progress: eventProgress
|
||||
};
|
||||
}
|
||||
|
||||
const gradeNode = data.element("grade");
|
||||
|
||||
if (gradeNode) {
|
||||
const single = gradeNode.number("single_grade", 0);
|
||||
const double = gradeNode.number("double_grade", 0);
|
||||
|
||||
profile.singleGrade = single;
|
||||
profile.doubleGrade = double;
|
||||
}
|
||||
}
|
||||
|
||||
let scoreData: KDataReader | null;
|
||||
let stageNum = 0;
|
||||
|
||||
for (const note of notes) {
|
||||
if (note.number("stagenum") > stageNum) {
|
||||
scoreData = note;
|
||||
stageNum = note.number("stagenum");
|
||||
}
|
||||
}
|
||||
|
||||
if (scoreData) {
|
||||
const songId = scoreData.number("mcode");
|
||||
const difficulty = scoreData.number("notetype");
|
||||
const rank = scoreData.number("rank");
|
||||
const clearKind = scoreData.number("clearkind");
|
||||
const score = scoreData.number("score");
|
||||
const maxCombo = scoreData.number("maxcombo");
|
||||
const ghostSize = scoreData.number("ghostsize");
|
||||
const ghost = scoreData.str("ghost");
|
||||
|
||||
option[OptionOffset.SPEED] = scoreData.number("opt_speed").toString(16);
|
||||
option[OptionOffset.BOOST] = scoreData.number("opt_boost").toString(16);
|
||||
option[OptionOffset.APPEARANCE] = scoreData.number("opt_appearance").toString(16);
|
||||
option[OptionOffset.TURN] = scoreData.number("opt_turn").toString(16);
|
||||
option[OptionOffset.STEP_ZONE] = scoreData.number("opt_dark").toString(16);
|
||||
option[OptionOffset.SCROLL] = scoreData.number("opt_scroll").toString(16);
|
||||
option[OptionOffset.ARROW_COLOR] = scoreData.number("opt_arrowcolor").toString(16);
|
||||
option[OptionOffset.CUT] = scoreData.number("opt_cut").toString(16);
|
||||
option[OptionOffset.FREEZE] = scoreData.number("opt_freeze").toString(16);
|
||||
option[OptionOffset.JUMP] = scoreData.number("opt_jump").toString(16);
|
||||
option[OptionOffset.ARROW_SKIN] = scoreData.number("opt_arrowshape").toString(16);
|
||||
option[OptionOffset.FILTER] = scoreData.number("opt_filter").toString(16);
|
||||
option[OptionOffset.GUIDELINE] = scoreData.number("opt_guideline").toString(16);
|
||||
option[OptionOffset.GAUGE] = scoreData.number("opt_gauge").toString(16);
|
||||
option[OptionOffset.COMBO_POSITION] = scoreData.number("opt_judgepriority").toString(16);
|
||||
option[OptionOffset.FAST_SLOW] = scoreData.number("opt_timing").toString(16);
|
||||
|
||||
await DB.Upsert<Score>(refId, {
|
||||
collection: "score",
|
||||
songId,
|
||||
difficulty
|
||||
}, {
|
||||
$set: {
|
||||
rank,
|
||||
clearKind,
|
||||
score,
|
||||
maxCombo
|
||||
}
|
||||
});
|
||||
|
||||
await DB.Upsert<Ghost>(refId, {
|
||||
collection: "ghost",
|
||||
songId,
|
||||
difficulty
|
||||
}, {
|
||||
$set: {
|
||||
ghostSize,
|
||||
ghost
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
await DB.Update<Profile>(refId, { collection: "profile" }, {
|
||||
$set: {
|
||||
"usergamedata.COMMON.strdata": common.join(","),
|
||||
"usergamedata.OPTION.strdata": option.join(","),
|
||||
"usergamedata.LAST.strdata": last.join(","),
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
result: K.ITEM("s32", 0)
|
||||
};
|
||||
};
|
||||
|
||||
const rivalload = (refId: string, data: any) => {
|
||||
const loadFlag = $(data).number("data.loadflag");
|
||||
|
||||
const record = [];
|
||||
|
||||
return {
|
||||
result: K.ITEM("s32", 0),
|
||||
|
||||
data: {
|
||||
recordtype: K.ITEM("s32", loadFlag),
|
||||
record
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
const ghostload = (refId: string, data: any) => {
|
||||
const ghostdata = {};
|
||||
|
||||
return {
|
||||
result: K.ITEM("s32", 0),
|
||||
ghostdata
|
||||
};
|
||||
};
|
||||
|
||||
const inheritance = (refId: string) => {
|
||||
return {
|
||||
result: K.ITEM("s32", 0),
|
||||
InheritanceStatus: K.ITEM("s32", 1)
|
||||
};
|
||||
};
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
import { Profile } from "../models/profile";
|
||||
|
||||
export const usergamedata_recv: EPR = async (info, data, send) => {
|
||||
const refId = $(data).str("data.refid");
|
||||
const profile = await DB.FindOne<Profile>(refId, { collection: "profile" });
|
||||
|
||||
let recordNum = 0;
|
||||
const record = [];
|
||||
|
||||
const d = [];
|
||||
const types = $(data).str("data.recv_csv").split(",").filter((_, i) => (i % 2 === 0));
|
||||
|
||||
for (const type of types) {
|
||||
let strdata = "<NODATA>";
|
||||
let bindata = "<NODATA>";
|
||||
|
||||
if (profile) {
|
||||
strdata = profile.usergamedata[type]["strdata"];
|
||||
bindata = profile.usergamedata[type]["bindata"];
|
||||
|
||||
if (type === "OPTION") {
|
||||
const split = strdata.split(",");
|
||||
|
||||
split[0] = U.GetConfig("save_option") ? "1" : "0";
|
||||
|
||||
strdata = split.join(",");
|
||||
}
|
||||
}
|
||||
|
||||
d.push({
|
||||
...K.ITEM("str", !profile ? strdata : Buffer.from(strdata).toString("base64")),
|
||||
...profile && { bin1: K.ITEM("str", Buffer.from(bindata).toString("base64")) }
|
||||
});
|
||||
recordNum++;
|
||||
}
|
||||
record.push({ d });
|
||||
|
||||
return send.object({
|
||||
result: K.ITEM("s32", 0),
|
||||
player: {
|
||||
record,
|
||||
record_num: K.ITEM("u32", recordNum)
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
import { Profile } from "../models/profile";
|
||||
|
||||
export const usergamedata_send: EPR = async (info, data, send) => {
|
||||
const refId = $(data).str("data.refid");
|
||||
|
||||
const profile = await DB.FindOne<Profile>(refId, { collection: "profile" });
|
||||
if (!profile) return send.deny();
|
||||
|
||||
for (const record of $(data).elements("data.record.d")) {
|
||||
const decodeStr = Buffer.from(record.str("", ""), "base64").toString("ascii");
|
||||
const decodeBin = Buffer.from(record.str("bin1", ""), "base64").toString("ascii");
|
||||
|
||||
const strdata = decodeStr.split(",");
|
||||
const type = Buffer.from(strdata[1]).toString("utf-8");
|
||||
|
||||
if (!profile.usergamedata) profile.usergamedata = {};
|
||||
if (!profile.usergamedata[type]) profile.usergamedata[type] = {};
|
||||
profile.usergamedata[type] = {
|
||||
strdata: strdata.slice(2, -1).join(","),
|
||||
bindata: decodeBin
|
||||
};
|
||||
}
|
||||
|
||||
try {
|
||||
await DB.Update<Profile>(refId, { collection: "profile" }, profile);
|
||||
|
||||
return send.object({ result: K.ITEM("s32", 0) });
|
||||
} catch {
|
||||
return send.deny();
|
||||
}
|
||||
};
|
||||
|
|
@ -1,135 +0,0 @@
|
|||
import { convcardnumber, eventLog } from "./handlers/common";
|
||||
import { usergamedata } from "./handlers/usergamedata";
|
||||
import { usergamedata_recv } from "./handlers/usergamedata_recv";
|
||||
import { usergamedata_send } from "./handlers/usergamedata_send";
|
||||
import { CommonOffset, OptionOffset, Profile } from "./models/profile";
|
||||
|
||||
export function register() {
|
||||
R.GameCode("MDX");
|
||||
|
||||
R.Config("save_option", {
|
||||
name: "Save option",
|
||||
desc: "Gets the previously set options as they are.",
|
||||
default: true,
|
||||
type: "boolean"
|
||||
});
|
||||
|
||||
R.Route("playerdata.usergamedata_advanced", usergamedata);
|
||||
R.Route("playerdata.usergamedata_recv", usergamedata_recv);
|
||||
R.Route("playerdata.usergamedata_send", usergamedata_send);
|
||||
|
||||
R.Route("system.convcardnumber", convcardnumber);
|
||||
R.Route("eventlog.write", eventLog);
|
||||
|
||||
R.WebUIEvent("updateName", async ({ refid, name }) => {
|
||||
let strdata: Profile | string[] = await DB.FindOne<Profile>(refid, { collection: "profile" });
|
||||
|
||||
if (strdata) {
|
||||
strdata = strdata.usergamedata.COMMON.strdata.split(",");
|
||||
strdata[CommonOffset.NAME] = name;
|
||||
await DB.Update<Profile>(refid, { collection: "profile" }, {
|
||||
$set: {
|
||||
"usergamedata.COMMON.strdata": strdata.join(",")
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
R.WebUIEvent("updateWeight", async ({ refid, weight }) => {
|
||||
let strdata: Profile | string[] = await DB.FindOne<Profile>(refid, { collection: "profile" });
|
||||
|
||||
if (strdata) {
|
||||
strdata = strdata.usergamedata.COMMON.strdata.split(",");
|
||||
strdata[CommonOffset.WEIGHT] = weight;
|
||||
await DB.Update<Profile>(refid, { collection: "profile" }, {
|
||||
$set: {
|
||||
"usergamedata.COMMON.strdata": strdata.join(",")
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
R.WebUIEvent("updateDisplayCalories", async ({ refid, selected }) => {
|
||||
let strdata: Profile | string[] = await DB.FindOne<Profile>(refid, { collection: "profile" });
|
||||
|
||||
if (strdata) {
|
||||
strdata = strdata.usergamedata.COMMON.strdata.split(",");
|
||||
strdata[CommonOffset.WEIGHT_DISPLAY] = selected;
|
||||
await DB.Update<Profile>(refid, { collection: "profile" }, {
|
||||
$set: {
|
||||
"usergamedata.COMMON.strdata": strdata.join(",")
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
R.WebUIEvent("updateArrowSkin", async ({ refid, selected }) => {
|
||||
let strdata: Profile | string[] = await DB.FindOne<Profile>(refid, { collection: "profile" });
|
||||
|
||||
if (strdata) {
|
||||
strdata = strdata.usergamedata.OPTION.strdata.split(",");
|
||||
strdata[OptionOffset.ARROW_SKIN] = selected;
|
||||
await DB.Update<Profile>(refid, { collection: "profile" }, {
|
||||
$set: {
|
||||
"usergamedata.OPTION.strdata": strdata.join(",")
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
R.WebUIEvent("updateGuideline", async ({ refid, selected }) => {
|
||||
let strdata: Profile | string[] = await DB.FindOne<Profile>(refid, { collection: "profile" });
|
||||
|
||||
if (strdata) {
|
||||
strdata = strdata.usergamedata.OPTION.strdata.split(",");
|
||||
strdata[OptionOffset.GUIDELINE] = selected;
|
||||
await DB.Update<Profile>(refid, { collection: "profile" }, {
|
||||
$set: {
|
||||
"usergamedata.OPTION.strdata": strdata.join(",")
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
R.WebUIEvent("updateFilter", async ({ refid, selected }) => {
|
||||
let strdata: Profile | string[] = await DB.FindOne<Profile>(refid, { collection: "profile" });
|
||||
|
||||
if (strdata) {
|
||||
strdata = strdata.usergamedata.OPTION.strdata.split(",");
|
||||
strdata[OptionOffset.FILTER] = selected;
|
||||
await DB.Update<Profile>(refid, { collection: "profile" }, {
|
||||
$set: {
|
||||
"usergamedata.OPTION.strdata": strdata.join(",")
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
R.WebUIEvent("updateJudgmentPriority", async ({ refid, selected }) => {
|
||||
let strdata: Profile | string[] = await DB.FindOne<Profile>(refid, { collection: "profile" });
|
||||
|
||||
if (strdata) {
|
||||
strdata = strdata.usergamedata.OPTION.strdata.split(",");
|
||||
strdata[OptionOffset.COMBO_POSITION] = selected;
|
||||
await DB.Update<Profile>(refid, { collection: "profile" }, {
|
||||
$set: {
|
||||
"usergamedata.OPTION.strdata": strdata.join(",")
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
R.WebUIEvent("updateDisplayTiming", async ({ refid, selected }) => {
|
||||
let strdata: Profile | string[] = await DB.FindOne<Profile>(refid, { collection: "profile" });
|
||||
|
||||
if (strdata) {
|
||||
strdata = strdata.usergamedata.OPTION.strdata.split(",");
|
||||
strdata[OptionOffset.FAST_SLOW] = selected;
|
||||
await DB.Update<Profile>(refid, { collection: "profile" }, {
|
||||
$set: {
|
||||
"usergamedata.OPTION.strdata": strdata.join(",")
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
export interface Ghost {
|
||||
collection: "ghost";
|
||||
|
||||
songId: number;
|
||||
difficulty: number;
|
||||
ghostSize: number;
|
||||
ghost: string;
|
||||
}
|
||||
|
|
@ -1,77 +0,0 @@
|
|||
export enum CommonOffset {
|
||||
AREA = 1,
|
||||
SEQ_HEX = 1,
|
||||
WEIGHT_DISPLAY = 3,
|
||||
CHARACTER,
|
||||
EXTRA_CHARGE,
|
||||
TOTAL_PLAYS = 9,
|
||||
SINGLE_PLAYS = 11,
|
||||
DOUBLE_PLAYS,
|
||||
WEIGHT = 17,
|
||||
NAME = 25,
|
||||
SEQ
|
||||
}
|
||||
|
||||
export enum OptionOffset {
|
||||
SPEED = 1,
|
||||
BOOST,
|
||||
APPEARANCE,
|
||||
TURN,
|
||||
STEP_ZONE,
|
||||
SCROLL,
|
||||
ARROW_COLOR,
|
||||
CUT,
|
||||
FREEZE,
|
||||
JUMP,
|
||||
ARROW_SKIN,
|
||||
FILTER,
|
||||
GUIDELINE,
|
||||
GAUGE,
|
||||
COMBO_POSITION,
|
||||
FAST_SLOW
|
||||
}
|
||||
|
||||
export enum LastOffset {
|
||||
SONG = 3,
|
||||
CALORIES = 10
|
||||
}
|
||||
|
||||
export enum RivalOffset {
|
||||
RIVAL_1_ACTIVE = 1,
|
||||
RIVAL_2_ACTIVE,
|
||||
RIVAL_3_ACTIVE,
|
||||
RIVAL_1_DDRCODE = 9,
|
||||
RIVAL_2_DDRCODE,
|
||||
RIVAL_3_DDRCODE,
|
||||
}
|
||||
|
||||
export interface Profile {
|
||||
collection: "profile";
|
||||
|
||||
ddrCode: number;
|
||||
shopArea: string;
|
||||
|
||||
singleGrade?: number;
|
||||
doubleGrade?: number;
|
||||
|
||||
events?: {};
|
||||
|
||||
usergamedata?: {
|
||||
COMMON?: {
|
||||
strdata?: string;
|
||||
bindata?: string;
|
||||
};
|
||||
OPTION?: {
|
||||
strdata?: string;
|
||||
bindata?: string;
|
||||
};
|
||||
LAST?: {
|
||||
strdata?: string;
|
||||
bindata?: string;
|
||||
};
|
||||
RIVAL?: {
|
||||
strdata?: string;
|
||||
bindata?: string;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
export enum Difficulty {
|
||||
SINGLE_BEGINNER,
|
||||
SINGLE_BASIC,
|
||||
SINGLE_DIFFICULT,
|
||||
SINGLE_EXPERT,
|
||||
SINGLE_CHALLENGE,
|
||||
DOUBLE_BASIC,
|
||||
DOUBLE_DIFFICULT,
|
||||
DOUBLE_EXPERT,
|
||||
DOUBLE_CHALLENGE
|
||||
}
|
||||
|
||||
export enum Rank {
|
||||
AAA,
|
||||
AA_PLUS,
|
||||
AA,
|
||||
AA_MINUS,
|
||||
A_PLUS,
|
||||
A,
|
||||
A_MINUS,
|
||||
B_PLUS,
|
||||
B,
|
||||
B_MINUS,
|
||||
C_PLUS,
|
||||
C,
|
||||
C_MINUS,
|
||||
D_PLUS,
|
||||
D,
|
||||
E
|
||||
}
|
||||
|
||||
export enum ClearKind {
|
||||
NONE = 6,
|
||||
GOOD_COMBO,
|
||||
GREAT_COMBO,
|
||||
PERPECT_COMBO,
|
||||
MARVELOUS_COMBO
|
||||
}
|
||||
|
||||
export interface Score {
|
||||
collection: "score";
|
||||
|
||||
songId: number;
|
||||
difficulty: Difficulty;
|
||||
rank: Rank;
|
||||
clearKind: ClearKind;
|
||||
score: number;
|
||||
maxCombo: number;
|
||||
}
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
export function getVersion(info: EamuseInfo) {
|
||||
const dateCode = parseInt(info.model.split(":")[4]);
|
||||
|
||||
if (dateCode >= 2019022600 && dateCode <= 2020020300) return 10;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
export function formatCode(ddrCode: number) {
|
||||
const pad = (ddrCode + "").padStart(8, "0");
|
||||
|
||||
return pad.replace(/^([0-9]{4})([0-9]{4})$/, "$1-$2");
|
||||
}
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
$('#change-name').on('click', () => {
|
||||
const name = $('#dancer_name').val().toUpperCase();
|
||||
|
||||
emit('updateName', { refid, name }).then(() => location.reload());
|
||||
});
|
||||
|
||||
$('#change-weight').on('click', () => {
|
||||
const weight1 = $('#weight_1').val();
|
||||
const weight2 = $('#weight_2').val();
|
||||
const weight = weight1 + '.' + weight2;
|
||||
|
||||
emit('updateWeight', { refid, weight }).then(() => location.reload());
|
||||
});
|
||||
|
||||
$('#change-display-calories').on('click', () => {
|
||||
const selected = $('#display_calories option:selected').val();
|
||||
|
||||
emit('updateDisplayCalories', { refid, selected }).then(() => location.reload());
|
||||
});
|
||||
|
||||
$('#change-arrow-skin').on('click', () => {
|
||||
const selected = $('#arrow_skin option:selected').val();
|
||||
|
||||
emit('updateArrowSkin', { refid, selected }).then(() => location.reload());
|
||||
});
|
||||
|
||||
$('#change-guideline').on('click', () => {
|
||||
const selected = $('#guideline option:selected').val();
|
||||
|
||||
emit('updateGuideline', { refid, selected }).then(() => location.reload());
|
||||
});
|
||||
|
||||
$('#change-filter').on('click', () => {
|
||||
const selected = $('#filter option:selected').val();
|
||||
|
||||
emit('updateFilter', { refid, selected }).then(() => location.reload());
|
||||
});
|
||||
|
||||
$('#change-judgment-priority').on('click', () => {
|
||||
const selected = $('#judgment_priority option:selected').val();
|
||||
|
||||
emit('updateJudgmentPriority', { refid, selected }).then(() => location.reload());
|
||||
});
|
||||
|
||||
$('#change-display-timing').on('click', () => {
|
||||
const selected = $('#display_timing option:selected').val();
|
||||
|
||||
emit('updateDisplayTiming', { refid, selected }).then(() => location.reload());
|
||||
});
|
||||
|
|
@ -1,147 +0,0 @@
|
|||
//DATA//
|
||||
profile: DB.FindOne(refid, { collection: "profile" })
|
||||
|
||||
-
|
||||
const onOff = [ "Off", "On" ];
|
||||
const characters = [ "All Character Random", "Man Random", "Female Random", "Yuni", "Rage", "Afro", "Jenny", "Emi", "Baby-Lon", "Gus", "Ruby", "Alice", "Julio", "Bonnie", "Zero", "Rinon" ];
|
||||
const arrowSkins = [ "Normal", "X", "Classic", "Cyber", "Medium", "Small", "Dot" ];
|
||||
const guidelines = [ "Off", "Border", "Center" ];
|
||||
const filters = [ "Off", "Dark", "Darker", "Darkest" ];
|
||||
const judgmentPrioritys = [ "Judgment priority", "Arrow priority" ];
|
||||
|
||||
if (profile.usergamedata)
|
||||
-
|
||||
const common = profile.usergamedata.COMMON.strdata.split(",");
|
||||
const option = profile.usergamedata.OPTION.strdata.split(",");
|
||||
|
||||
const name = common[25];
|
||||
const weight = common[17];
|
||||
const displayCalories = parseInt(common[3]);
|
||||
const character = parseInt(common[4]);
|
||||
const arrowSkin = parseInt(option[11]);
|
||||
const guideline = parseInt(option[13]);
|
||||
const filter = parseInt(option[12]);
|
||||
const judgmentPriority = parseInt(option[15]);
|
||||
const displayTiming = parseInt(option[16]);
|
||||
|
||||
div
|
||||
.card
|
||||
.card-header
|
||||
p.card-header-title
|
||||
span.icon
|
||||
i.mdi.mdi-cog
|
||||
| Profile Settings
|
||||
|
||||
.card-content
|
||||
.field.is-horizontal.has-addons
|
||||
.field-label.is-normal
|
||||
label.label Dancer Name
|
||||
.field-body
|
||||
p.control
|
||||
input.input(type="text", id="dancer_name", pattern="[A-Z]{8}", maxlength=8, value=name)
|
||||
p.control
|
||||
a.button.is-primary#change-name Change
|
||||
|
||||
.field.is-horizontal.has-addons
|
||||
.field-label.is-normal
|
||||
label.label Workout Weight
|
||||
.field-body
|
||||
p.control
|
||||
input.input(type="number", id="weight_1", value=weight.split(".")[0])
|
||||
p.control
|
||||
input.input(type="number", id="weight_2", value=weight.split(".")[1])
|
||||
p.control
|
||||
a.button.is-primary#change-weight Change
|
||||
|
||||
.field.is-horizontal.has-addons
|
||||
.field-label.is-normal
|
||||
label.label Workout Display Calories
|
||||
.field-body
|
||||
p.control
|
||||
.select
|
||||
select#display_calories
|
||||
if (displayCalories === 1)
|
||||
option(value=0) Off
|
||||
option(value=1, selected) On
|
||||
else
|
||||
option(value=0, selected) Off
|
||||
option(value=1) On
|
||||
p.control
|
||||
a.button.is-primary#change-display-calories Submit
|
||||
|
||||
.field.is-horizontal.has-addons
|
||||
.field-label.is-normal
|
||||
label.label Arrow Skin
|
||||
.field-body
|
||||
p.control
|
||||
.select
|
||||
select#arrow_skin
|
||||
each v, i in arrowSkins
|
||||
if (arrowSkin === i)
|
||||
option(value=i, selected) #{v}
|
||||
else
|
||||
option(value=i) #{v}
|
||||
p.control
|
||||
a.button.is-primary#change-arrow-skin Submit
|
||||
|
||||
.field.is-horizontal.has-addons
|
||||
.field-label.is-normal
|
||||
label.label Guideline
|
||||
.field-body
|
||||
p.control
|
||||
.select
|
||||
select#guideline
|
||||
each v, i in guidelines
|
||||
if (guideline === i)
|
||||
option(value=i, selected) #{v}
|
||||
else
|
||||
option(value=i) #{v}
|
||||
p.control
|
||||
a.button.is-primary#change-guideline Submit
|
||||
|
||||
.field.is-horizontal.has-addons
|
||||
.field-label.is-normal
|
||||
label.label Filter concentration
|
||||
.field-body
|
||||
p.control
|
||||
.select
|
||||
select#filter
|
||||
each v, i in filters
|
||||
if (filter === i)
|
||||
option(value=i, selected) #{v}
|
||||
else
|
||||
option(value=i) #{v}
|
||||
p.control
|
||||
a.button.is-primary#change-filter Submit
|
||||
|
||||
.field.is-horizontal.has-addons
|
||||
.field-label.is-normal
|
||||
label.label Judgment display priority
|
||||
.field-body
|
||||
p.control
|
||||
.select
|
||||
select#judgment_priority
|
||||
each v, i in judgmentPrioritys
|
||||
if (judgmentPriority === i)
|
||||
option(value=i, selected) #{v}
|
||||
else
|
||||
option(value=i) #{v}
|
||||
p.control
|
||||
a.button.is-primary#change-judgment-priority Submit
|
||||
|
||||
.field.is-horizontal.has-addons
|
||||
.field-label.is-normal
|
||||
label.label Display Timing judgment
|
||||
.field-body
|
||||
p.control
|
||||
.select
|
||||
select#display_timing
|
||||
each v, i in ["Off", "On"]
|
||||
if (displayTiming === i)
|
||||
option(value=i, selected) #{v}
|
||||
else
|
||||
option(value=i) #{v}
|
||||
p.control
|
||||
a.button.is-primary#change-display-timing Submit
|
||||
|
||||
script(src="static/js/profile_settings.js")
|
||||
1
gitadora@asphyxia/.gitignore
vendored
1
gitadora@asphyxia/.gitignore
vendored
|
|
@ -1 +0,0 @@
|
|||
apisamples/
|
||||
|
|
@ -1,122 +1,15 @@
|
|||
GITADORA Plugin for Asphyxia-Core
|
||||
=================================
|
||||

|
||||
|
||||
This plugin is based on converted from public-exported Asphyxia's Routes.
|
||||
This plugin is converted from public-exported Asphyxia's Routes.
|
||||
|
||||
Supported Versions
|
||||
==================
|
||||
- Tri-Boost Re:EVOLVE
|
||||
- Matixx
|
||||
- EXCHAIN
|
||||
- NEX+AGE
|
||||
- HIGH-VOLTAGE
|
||||
- FUZZ-UP
|
||||
- GALAXY WAVE
|
||||
- Exchain
|
||||
|
||||
When Plugin Doesn't work correctly / Startup Error on Plugin
|
||||
------------------------------------------------------------
|
||||
The folder structure between v1.0 and v1.1 is quite different. Do not overwrite plugin folder.
|
||||
<br>If you encounter errors, Please try these steps:
|
||||
|
||||
1. Remove `gitadora@asphyxia` folder.
|
||||
2. Ctrl-C and Ctrl-V the newest version of `gitadora@asphyxia`
|
||||
3. (Custom MDB Users) Reupload MDB or move `data/custom_mdb.xml` to `data/mdb/custom.xml`
|
||||
|
||||
Known Issues
|
||||
============
|
||||
* ~Information dialog keep showing as plugin doesn't store item data currently.~ (Fixed as of version 1.2.1)
|
||||
* Special Premium Encore on Nextage is unimplemented. However, a workaround is available. Try it.
|
||||
* Friends and Rivals are unimplemented.
|
||||
|
||||
Shared Data Options
|
||||
===================
|
||||
Two experimental options allow operators to share data across versions:
|
||||
|
||||
* **Shared Favorite Songs** (`shared_favorite_songs`, default: `false`): When enabled, favorite lists are unified across Guitar Freaks, DrumMania, and supported versions.
|
||||
* **Shared Song Scores** (`shared_song_scores`, default: `false`): When enabled, the server merges the best results for each chart across every stored version and saves them under a shared version identifier. The merged record uses the following shape (fields marked with `//` describe their meaning):
|
||||
|
||||
```
|
||||
scores: {
|
||||
"<musicid>": {
|
||||
update: [<seq>, <new_skill>], // Highest new_skill value seen and its associated seq
|
||||
diffs: {
|
||||
"<seq>": {
|
||||
perc: <number>, // Highest achievement percentage
|
||||
rank: <number>, // Highest rank reached for the chart
|
||||
clear: <boolean>, // Whether the chart has been cleared
|
||||
fc: <boolean>, // Whether a full combo was achieved
|
||||
ex: <boolean>, // Whether an excellent was achieved
|
||||
meter: "<string>",// Best meter value as a stringified bigint
|
||||
prog: <number>, // Highest progression value
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Scores are stored under `version: "shared"` but are automatically applied to the active module when loading a profile, ensuring players benefit from their best combined results regardless of the client version.
|
||||
|
||||
Release Notes
|
||||
=============
|
||||
|
||||
v1.4.0
|
||||
v1.0.0 (Current)
|
||||
----------------
|
||||
* Added support for Tri-Boost Re:EVOLVE, HIGH-VOLTAGE, FUZZ-UP, GALAXY WAVE
|
||||
* Bugfix for launch core with "--dev/--console"
|
||||
|
||||
v1.3.0
|
||||
----------------
|
||||
* Added experimental 'Shared Favorite Songs' option. If disabled, players will be able to keep separate lists of favorite songs for each version of Gitadora, as well as between Guitar Freaks and Drummania. Enable this option to have a single unified list of favorite songs for both games, and across all versions. Default is false, to match original arcade behaviour.
|
||||
* Added a leaderboards page to the WebUI. This page displays the rank of all players per game and version, ordered by Skill rating.
|
||||
* More code cleanups to Profiles.ts
|
||||
|
||||
v1.2.4
|
||||
----------------
|
||||
* Fixed note scroll speed defaulting to 0.5x for newly registered profiles.
|
||||
* Misc code cleanup. No changes expected to plugin behaviour.
|
||||
|
||||
v1.2.3
|
||||
----------------
|
||||
* Fixed bug preventing MDB files in XML format from loading (Thanks to DualEdge for reporting this ).
|
||||
|
||||
v1.2.2
|
||||
----------------
|
||||
* Major improvements to the MDB (song data) loader. MDB files can now be in .json, .xml or .b64 format. This applies to both the per-version defaults and custom MDBs. To use a custom MDB, enable it in the web UI, and place a 'custom.xml', 'custom.json' or 'custom.b64' file in the data/mdb subfolder.
|
||||
* Added several player profile stats to the web UI.
|
||||
* MDB loader now logs the number of loaded songs available to GF and DM when in dev mode.
|
||||
* MDB: Fixed "is_secret" field being ignored (always set to false)
|
||||
|
||||
v1.2.1
|
||||
----------------
|
||||
* Secret Music (unlocked songs) are now saved and loaded correctly. Partially fixes Github issue #34. Note that all songs are already marked as unlocked by the server - there is no need to unlock them manually. If you would like to lock them, consider using a custom MDB.
|
||||
* Rewards field is now saved and loaded correctly. Fixes Github issue #34
|
||||
|
||||
NOTE: Rewards and secret music data is saved at the end of each session, so you will see the unlock notifications one last time after updating the plugin to this version.
|
||||
|
||||
v1.2.0
|
||||
----------------
|
||||
* Fixed server error when saving profiles for two Guitar Freaks players at the end of a session. Fixes Github issue #39.
|
||||
* Fixed another server error when two players are present, but only one player is using a profile.
|
||||
* Added support for the "ranking" field. Gitadora will now correctly display your server ranking (based on Skill) on the post-game screen.
|
||||
* "Recommended to friends" songs are now saved and loaded correctly. Since you don't have any friends, this won't be terribly useful, but it does at least provide an extra five slots for saving your favourite songs.
|
||||
* Fixed "Recommended to friends" song list being incorrectly initialized to "I think about you".
|
||||
* misc: Added logging for profile loading/saving when Asphyxia is running in dev mode.
|
||||
* misc: Added more logging to mdb (song database) loading.
|
||||
* misc: Removed some unneeded duplicate code.
|
||||
* misc: Latest getPlayer() and savePlayers() API requests and responses are now saved to file when Asphyxia is in dev mode. Useful for debugging.
|
||||
|
||||
v1.1.1
|
||||
----------------
|
||||
* fix: Error when create new profile on exchain.
|
||||
* fix: last song doesn't work correctly.
|
||||
* misc: Add logger for tracking problem.
|
||||
|
||||
v1.1.0
|
||||
------
|
||||
* NEX+AGE Support (Not full support.)
|
||||
* Restructure bit for maintaining.
|
||||
|
||||
v1.0.0
|
||||
------
|
||||
* Initial release for public
|
||||
5
gitadora@asphyxia/data/.gitignore
vendored
Normal file
5
gitadora@asphyxia/data/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
mdb_ex.xml
|
||||
mdb_mt.xml
|
||||
mdb_ex.b64
|
||||
mdb_mt.b64
|
||||
custom_mdb.xml
|
||||
58
gitadora@asphyxia/data/Exchain.ts
Normal file
58
gitadora@asphyxia/data/Exchain.ts
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
import { CommonMusicData, readJSONOrXML, readXML } from './helper';
|
||||
|
||||
export async function processData() {
|
||||
const { music } = await readJSONOrXML('data/mdb_ex.json', 'data/mdb_ex.xml', processRawData)
|
||||
return {
|
||||
music,
|
||||
};
|
||||
}
|
||||
|
||||
export async function processRawData(path: string): Promise<CommonMusicData> {
|
||||
const data = await readXML(path)
|
||||
const mdb = $(data).elements("mdb.mdb_data");
|
||||
const music: any[] = [];
|
||||
for (const m of mdb) {
|
||||
const d = m.numbers("xg_diff_list");
|
||||
const contain = m.numbers("contain_stat");
|
||||
const gf = contain[0];
|
||||
const dm = contain[1];
|
||||
|
||||
if (gf == 0 && dm == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
let type = gf;
|
||||
if (gf == 0) {
|
||||
type = dm;
|
||||
}
|
||||
|
||||
music.push({
|
||||
id: K.ITEM('s32', m.number("music_id")),
|
||||
cont_gf: K.ITEM('bool', gf == 0 ? 0 : 1),
|
||||
cont_dm: K.ITEM('bool', dm == 0 ? 0 : 1),
|
||||
is_secret: K.ITEM('bool', 0),
|
||||
is_hot: K.ITEM('bool', type == 2 ? 0 : 1),
|
||||
data_ver: K.ITEM('s32', m.number("data_ver")),
|
||||
diff: K.ARRAY('u16', [
|
||||
d[0],
|
||||
d[1],
|
||||
d[2],
|
||||
d[3],
|
||||
d[4],
|
||||
d[10],
|
||||
d[11],
|
||||
d[12],
|
||||
d[13],
|
||||
d[14],
|
||||
d[5],
|
||||
d[6],
|
||||
d[7],
|
||||
d[8],
|
||||
d[9],
|
||||
]),
|
||||
});
|
||||
}
|
||||
return {
|
||||
music,
|
||||
};
|
||||
}
|
||||
58
gitadora@asphyxia/data/Matixx.ts
Normal file
58
gitadora@asphyxia/data/Matixx.ts
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
import { CommonMusicData, readJSONOrXML, readXML } from './helper';
|
||||
|
||||
export async function processData() {
|
||||
const { music } = await readJSONOrXML('data/mdb_mt.json', 'data/mdb_mt.xml', processRawData)
|
||||
return {
|
||||
music,
|
||||
};
|
||||
}
|
||||
|
||||
export async function processRawData(path: string): Promise<CommonMusicData> {
|
||||
const data = await readXML(path)
|
||||
const mdb = $(data).elements("mdb.mdb_data");
|
||||
const music: any[] = [];
|
||||
for (const m of mdb) {
|
||||
const d = m.numbers("xg_diff_list");
|
||||
const contain = m.numbers("contain_stat");
|
||||
const gf = contain[0];
|
||||
const dm = contain[1];
|
||||
|
||||
if (gf == 0 && dm == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
let type = gf;
|
||||
if (gf == 0) {
|
||||
type = dm;
|
||||
}
|
||||
|
||||
music.push({
|
||||
id: K.ITEM('s32', m.number("music_id")),
|
||||
cont_gf: K.ITEM('bool', gf == 0 ? 0 : 1),
|
||||
cont_dm: K.ITEM('bool', dm == 0 ? 0 : 1),
|
||||
is_secret: K.ITEM('bool', 0),
|
||||
is_hot: K.ITEM('bool', type == 2 ? 0 : 1),
|
||||
data_ver: K.ITEM('s32', m.number("data_ver")),
|
||||
diff: K.ARRAY('u16', [
|
||||
d[0],
|
||||
d[1],
|
||||
d[2],
|
||||
d[3],
|
||||
d[4],
|
||||
d[10],
|
||||
d[11],
|
||||
d[12],
|
||||
d[13],
|
||||
d[14],
|
||||
d[5],
|
||||
d[6],
|
||||
d[7],
|
||||
d[8],
|
||||
d[9],
|
||||
]),
|
||||
});
|
||||
}
|
||||
return {
|
||||
music,
|
||||
};
|
||||
}
|
||||
|
|
@ -1,132 +0,0 @@
|
|||
import { getVersion } from "../utils";
|
||||
|
||||
interface EncoreStageData {
|
||||
level: number
|
||||
musics: number[]
|
||||
unlock_challenge?: number[]
|
||||
}
|
||||
|
||||
export function getEncoreStageData(info: EamuseInfo): EncoreStageData {
|
||||
const fallback = { level: 10, musics: [0] }
|
||||
const level: number = U.GetConfig("encore_version")
|
||||
const ntDummyEncore = U.GetConfig("nextage_dummy_encore")
|
||||
switch (getVersion(info)) {
|
||||
case 'galaxywave':
|
||||
return {
|
||||
level,
|
||||
musics: [
|
||||
2866, // Calm days
|
||||
2893, // 愛はToxic! feat.Lilymone
|
||||
2885, // Astrum
|
||||
2897, // DESPERATE ERROR
|
||||
2884, // Multiverse
|
||||
2919, // DOGMA
|
||||
2922, // Stay By My Side
|
||||
2937, // Prog for your Soul
|
||||
2963, // Zero Visibility
|
||||
2939, // Hopeful Daybreak!!!
|
||||
2956, // Over Time Groove
|
||||
]
|
||||
}
|
||||
case 'fuzzup':
|
||||
return {
|
||||
level,
|
||||
musics: [
|
||||
2812, // THE LAST OF FIREFACE
|
||||
2814, // ENCOUNT
|
||||
2783, // Q転直下
|
||||
2848, // Bloody Iron Maiden
|
||||
2860, // Serious Joke
|
||||
2844, // HyperNebula
|
||||
2877, // AVEL
|
||||
2892, // Elliptic Orbits
|
||||
]
|
||||
}
|
||||
case 'highvoltage':
|
||||
return {
|
||||
level,
|
||||
musics: [
|
||||
2686, // CYCLONICxSTORM
|
||||
2687, // Heptagram
|
||||
2700, // Saiph
|
||||
2706, // LUCID NIGHTMARE
|
||||
2740, // Mobius
|
||||
2748, // Under The Shades Of The Divine Ray
|
||||
2772, // REBELLION
|
||||
2812, // THE LAST OF FIREFACE
|
||||
]
|
||||
}
|
||||
case 'nextage':
|
||||
return {
|
||||
level,
|
||||
musics: !ntDummyEncore ? [
|
||||
2587, // 悪魔のハニープリン
|
||||
2531, // The ULTIMATES -reminiscence-
|
||||
2612, // ECLIPSE 2
|
||||
2622, // Slip Into My Royal Blood
|
||||
2686, // CYCLONICxSTORM
|
||||
// FIXME: Fix special encore.
|
||||
305, 602, 703, 802, 902, 1003, 1201, 1400, 1712, 1916, 2289, 2631, // DD13 and encores.
|
||||
1704, 1811, 2121, 2201, 2624, // Soranaki and encores.
|
||||
1907, 2020, 2282, 2341, 2666 // Stargazer and encores.
|
||||
] : [
|
||||
2622, 305, 1704, 1907, 2686 // Dummy.
|
||||
]
|
||||
}
|
||||
case 'exchain':
|
||||
return {
|
||||
level,
|
||||
musics: [
|
||||
2246, // 箱庭の世界
|
||||
2498, // Cinnamon
|
||||
2500, // キヤロラ衛星の軌跡
|
||||
2529, // グリーンリーフ症候群
|
||||
2548, // Let's Dance
|
||||
2587, // 悪魔のハニープリン
|
||||
5020, // Timepiece phase II (CLASSIC)
|
||||
5033, // MODEL FT2 Miracle Version (CLASSIC)
|
||||
2586, // 美麗的夏日風
|
||||
5060, // EXCELSIOR DIVE (CLASSIC)
|
||||
2530, // The ULTIMATES -CHRONICLE-
|
||||
2581, // 幸せの代償
|
||||
5046, // Rock to Infinity (CLASSIC)
|
||||
]
|
||||
}
|
||||
case 'matixx':
|
||||
return {
|
||||
level,
|
||||
musics: [
|
||||
2432, // Durian
|
||||
2445, // ヤオヨロズランズ
|
||||
2456, // Fate of the Furious
|
||||
2441, // PIRATES BANQUET
|
||||
2444, // Aion
|
||||
2381, // Duella Lyrica
|
||||
2471, // triangulum
|
||||
2476, // MODEL FT4
|
||||
2486, // 煉獄事変
|
||||
2496, // CAPTURING XANADU
|
||||
2497, // Physical Decay
|
||||
2499, // Cinnamon
|
||||
2498, // けもののおうじゃ★めうめう
|
||||
]
|
||||
}
|
||||
case 're':
|
||||
return {
|
||||
level,
|
||||
musics: [
|
||||
2341, // Anathema
|
||||
2384, // White Forest
|
||||
2393, // REFLEXES MANIPULATION
|
||||
2392, // 主亡き機械人形のまなざし
|
||||
2406, // Exclamation
|
||||
2414, // MEDUSA
|
||||
2422, // BLACK ROSES
|
||||
2411, // ギタドラシカ
|
||||
2432, // Durian
|
||||
]
|
||||
}
|
||||
default:
|
||||
return fallback
|
||||
}
|
||||
}
|
||||
36
gitadora@asphyxia/data/helper.ts
Normal file
36
gitadora@asphyxia/data/helper.ts
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
export interface CommonMusicDataField {
|
||||
id: KITEM<"s32">;
|
||||
cont_gf: KITEM<"bool">;
|
||||
cont_dm: KITEM<"bool">;
|
||||
is_secret: KITEM<"bool">;
|
||||
is_hot: KITEM<"bool">;
|
||||
data_ver: KITEM<"s32">;
|
||||
diff: KARRAY<"u16">;
|
||||
}
|
||||
|
||||
export interface CommonMusicData {
|
||||
music: CommonMusicDataField[]
|
||||
}
|
||||
|
||||
export async function readXML(path: string) {
|
||||
const xml = await IO.ReadFile(path, 'utf-8');
|
||||
const json = U.parseXML(xml, false)
|
||||
return json
|
||||
}
|
||||
|
||||
export async function readJSON(path: string) {
|
||||
const str = await IO.ReadFile(path, 'utf-8');
|
||||
const json = JSON.parse(str)
|
||||
return json
|
||||
}
|
||||
|
||||
export async function readJSONOrXML(jsonPath: string, xmlPath: string, processHandler: (path: string) => Promise<CommonMusicData>): Promise<CommonMusicData> {
|
||||
if (!IO.Exists(jsonPath)) {
|
||||
const data = await processHandler(xmlPath)
|
||||
await IO.WriteFile(jsonPath, JSON.stringify(data))
|
||||
return data
|
||||
} else {
|
||||
const json = JSON.parse(await IO.ReadFile(jsonPath, 'utf-8'))
|
||||
return json
|
||||
}
|
||||
}
|
||||
11
gitadora@asphyxia/data/mdb/.gitignore
vendored
11
gitadora@asphyxia/data/mdb/.gitignore
vendored
|
|
@ -1,11 +0,0 @@
|
|||
ex.xml
|
||||
mt.xml
|
||||
nt.xml
|
||||
hv.xml
|
||||
ex.json
|
||||
mt.json
|
||||
nt.json
|
||||
hv.json
|
||||
custom.xml
|
||||
custom.json
|
||||
blacklist.txt
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
|
@ -1,198 +0,0 @@
|
|||
import Logger from "../../utils/logger";
|
||||
import { CommonMusicData } from "../../models/commonmusicdata";
|
||||
|
||||
export enum DATAVersion {
|
||||
GALAXYWAVE = "gw",
|
||||
FUZZUP = "fz",
|
||||
HIGHVOLTAGE = "hv",
|
||||
NEXTAGE = "nt",
|
||||
EXCHAIN = "ex",
|
||||
MATTIX = "mt",
|
||||
TBRE = "re"
|
||||
}
|
||||
|
||||
const allowedFormats = ['.json', '.xml', '.b64']
|
||||
const mdbFolder = "data/mdb/"
|
||||
|
||||
type processRawDataHandler = (path: string) => Promise<CommonMusicData>
|
||||
|
||||
const logger = new Logger("mdb")
|
||||
|
||||
export async function readXML(path: string) {
|
||||
const xml = await IO.ReadFile(path, 'utf-8');
|
||||
const json = U.parseXML(xml, false)
|
||||
return json
|
||||
}
|
||||
|
||||
export async function readMDBFile(path: string, processHandler?: processRawDataHandler): Promise<CommonMusicData> {
|
||||
|
||||
if (!IO.Exists(path)) {
|
||||
throw "Unable to find MDB file at " + path
|
||||
}
|
||||
|
||||
logger.debugInfo(`Loading MDB data from ${path}.`)
|
||||
|
||||
let result : CommonMusicData;
|
||||
const fileType = path.substring(path.lastIndexOf('.')).toLowerCase()
|
||||
|
||||
switch (fileType) {
|
||||
case '.json':
|
||||
const str = await IO.ReadFile(path, 'utf-8');
|
||||
result = JSON.parse(str)
|
||||
break;
|
||||
case '.xml':
|
||||
processHandler = processHandler ?? defaultProcessRawXmlData
|
||||
result = await processHandler(path)
|
||||
// Uncomment to save the loaded XML file as JSON.
|
||||
// await IO.WriteFile(path.replace(".xml", ".json"), JSON.stringify(result))
|
||||
break;
|
||||
case '.b64':
|
||||
const buff = await IO.ReadFile(path, 'utf-8');
|
||||
const bufferCtor = (globalThis as {
|
||||
Buffer?: {
|
||||
from(input: string, encoding: string): { toString(encoding: string): string }
|
||||
}
|
||||
}).Buffer
|
||||
if (!bufferCtor) {
|
||||
throw new Error('Buffer is not available in the current environment.')
|
||||
}
|
||||
const json = bufferCtor.from(buff, 'base64').toString('utf-8')
|
||||
// Uncomment to save the decoded base64 file as JSON.
|
||||
// await IO.WriteFile(path.replace(".b64",".json"), json)
|
||||
result = JSON.parse(json)
|
||||
break;
|
||||
default:
|
||||
throw `Invalid MDB file type: ${fileType}. Only .json, .xml, .b64 are supported.`
|
||||
}
|
||||
|
||||
// Some MDB sources may not provide seq_release_state. Ensure it is present for every song entry.
|
||||
result.music.forEach((entry) => {
|
||||
if (entry.seq_release_state == null) {
|
||||
entry.seq_release_state = K.ITEM('s32', 1)
|
||||
}
|
||||
})
|
||||
|
||||
let gfCount = result.music.filter((e) => e.cont_gf["@content"][0]).length
|
||||
let dmCount = result.music.filter((e) => e.cont_dm["@content"][0]).length
|
||||
logger.debugInfo(`Loaded ${result.music.length} songs from MDB file. ${gfCount} songs for GF, ${dmCount} songs for DM.`)
|
||||
return result
|
||||
}
|
||||
|
||||
export function gameVerToDataVer(ver: string): DATAVersion {
|
||||
switch(ver) {
|
||||
case 'galaxywave':
|
||||
return DATAVersion.GALAXYWAVE
|
||||
case 'fuzzup':
|
||||
return DATAVersion.FUZZUP
|
||||
case 'highvoltage':
|
||||
return DATAVersion.HIGHVOLTAGE
|
||||
case 'nextage':
|
||||
return DATAVersion.NEXTAGE
|
||||
case 'exchain':
|
||||
return DATAVersion.EXCHAIN
|
||||
case 'matixx':
|
||||
return DATAVersion.MATTIX
|
||||
default:
|
||||
return DATAVersion.TBRE
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempts to find a .json, .xml, or .b64 file (in that order) matching the given name in the specified folder.
|
||||
* @param fileNameWithoutExtension - The name of the file to find (without the extension).
|
||||
* @param path - The path to the folder to search. If left null, the default MDB folder ('data/mdb' in the plugin folder) will be used.
|
||||
* @returns - The path of the first matching file found, or null if no file was found.
|
||||
*/
|
||||
export function findMDBFile(fileNameWithoutExtension: string, path: string = null): string {
|
||||
|
||||
path = path ?? mdbFolder
|
||||
if (!IO.Exists(path)) {
|
||||
throw `Path does not exist: ${path}`
|
||||
}
|
||||
|
||||
if (!path.endsWith("/")) {
|
||||
path += "/"
|
||||
}
|
||||
|
||||
for (const ext of allowedFormats) {
|
||||
const candidateFileNames = ext === ".xml"
|
||||
? [
|
||||
`mdb_${fileNameWithoutExtension}${ext}`,
|
||||
`${fileNameWithoutExtension}${ext}`,
|
||||
]
|
||||
: [`${fileNameWithoutExtension}${ext}`]
|
||||
|
||||
for (const fileName of candidateFileNames) {
|
||||
const filePath = path + fileName
|
||||
if (IO.Exists(filePath)) {
|
||||
return filePath
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
export async function loadSongsForGameVersion(gameVer: string, processHandler?: processRawDataHandler) {
|
||||
const ver = gameVerToDataVer(gameVer)
|
||||
|
||||
let mdbFile = findMDBFile(ver, mdbFolder)
|
||||
|
||||
if (mdbFile == null) {
|
||||
throw `No valid MDB files were found in the data/mdb subfolder. Ensure that this folder contains at least one of the following: ${ver}.json, mdb_${ver}.xml (${ver}.xml as fallback) or ${ver}.b64`
|
||||
}
|
||||
|
||||
const music = await readMDBFile(mdbFile, processHandler ?? defaultProcessRawXmlData)
|
||||
return music
|
||||
}
|
||||
|
||||
export async function defaultProcessRawXmlData(path: string): Promise<CommonMusicData> {
|
||||
const data = await readXML(path)
|
||||
const mdb = $(data).elements("mdb.mdb_data");
|
||||
const music: any[] = [];
|
||||
for (const m of mdb) {
|
||||
const d = m.numbers("xg_diff_list");
|
||||
const contain = m.numbers("contain_stat");
|
||||
const gf = contain[0];
|
||||
const dm = contain[1];
|
||||
|
||||
if (gf == 0 && dm == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
let type = gf;
|
||||
if (gf == 0) {
|
||||
type = dm;
|
||||
}
|
||||
|
||||
music.push({
|
||||
id: K.ITEM('s32', m.number("music_id")),
|
||||
cont_gf: K.ITEM('bool', gf == 0 ? 0 : 1),
|
||||
cont_dm: K.ITEM('bool', dm == 0 ? 0 : 1),
|
||||
is_secret: K.ITEM('bool', m.number("is_secret", 0)),
|
||||
is_hot: K.ITEM('bool', type == 2 ? 0 : 1),
|
||||
data_ver: K.ITEM('s32', m.number("data_ver", 255)),
|
||||
seq_release_state: K.ITEM('s32', 1),
|
||||
diff: K.ARRAY('u16', [
|
||||
d[0],
|
||||
d[1],
|
||||
d[2],
|
||||
d[3],
|
||||
d[4],
|
||||
d[10],
|
||||
d[11],
|
||||
d[12],
|
||||
d[13],
|
||||
d[14],
|
||||
d[5],
|
||||
d[6],
|
||||
d[7],
|
||||
d[8],
|
||||
d[9],
|
||||
]),
|
||||
});
|
||||
}
|
||||
return {
|
||||
music,
|
||||
};
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
1
gitadora@asphyxia/data/mdb_ex.json
Normal file
1
gitadora@asphyxia/data/mdb_ex.json
Normal file
File diff suppressed because one or more lines are too long
1
gitadora@asphyxia/data/mdb_mt.json
Normal file
1
gitadora@asphyxia/data/mdb_mt.json
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -1,99 +0,0 @@
|
|||
import { Extra } from "../models/extra";
|
||||
import { FavoriteMusic } from "../models/favoritemusic";
|
||||
import { isSharedFavoriteMusicEnabled } from "../utils/index";
|
||||
import Logger from "../utils/logger";
|
||||
|
||||
const logger = new Logger("FavoriteMusic");
|
||||
|
||||
/**
|
||||
* Extracts favorite music data from the given extra data container, and saves it to the database as shared favorite music data for the player with the given refid.
|
||||
* This function has no effect if the 'Shared favorite music' option is not enabled.
|
||||
* Note that shared favorite music is shared across both Guitar Freaks and Drummania, as well as all supported versions of the game.
|
||||
* @param refid The refid of the player.
|
||||
* @param extra The extra data container of the player, containing the favorite music lists to be saved.
|
||||
* @returns {boolean} - whether the favorite music data was successfully saved.
|
||||
*/
|
||||
export async function saveSharedFavoriteMusicFromExtra(refid: string, extra: Extra) : Promise<boolean>
|
||||
{
|
||||
if (!isSharedFavoriteMusicEnabled()) {
|
||||
return false
|
||||
}
|
||||
|
||||
let result : FavoriteMusic = {
|
||||
collection: 'favoritemusic',
|
||||
pluginVer: 1,
|
||||
list_1: extra.list_1,
|
||||
list_2: extra.list_2,
|
||||
list_3: extra.list_3,
|
||||
recommend_musicid_list: extra.recommend_musicid_list,
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
await saveFavoriteMusic(refid, result)
|
||||
logger.debugInfo(`Saved shared favorite music for profile ${refid} successfully.`);
|
||||
return true
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
logger.error(`Failed to save shared favorite music for profile ${refid}.`);
|
||||
logger.error(e);
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves shared favorite music data from the database for the player with the given refid, and applies the data to the provided extra data container.
|
||||
* This function has no effect if the 'Shared favorite music' option is not enabled.
|
||||
* Note that shared favorite music is shared across both Guitar Freaks and Drummania, as well as all supported versions of the game.
|
||||
* @param refid - The refid of the player.
|
||||
* @param extra - The destination object where favorite music data should be applied.
|
||||
*/
|
||||
export async function applySharedFavoriteMusicToExtra(refid : string, extra : Extra) : Promise<void>
|
||||
{
|
||||
if (!isSharedFavoriteMusicEnabled()) {
|
||||
return
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
let favoriteMusic = await loadFavoriteMusic(refid)
|
||||
|
||||
if (favoriteMusic == null) {
|
||||
return
|
||||
}
|
||||
|
||||
extra.list_1 = favoriteMusic.list_1
|
||||
extra.list_2 = favoriteMusic.list_2
|
||||
extra.list_3 = favoriteMusic.list_3
|
||||
extra.recommend_musicid_list = favoriteMusic.recommend_musicid_list
|
||||
logger.debugInfo(`Loaded shared favorite music for profile ${refid} successfully.`);
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
logger.error(`Failed to load shared favorite music for profile ${refid}.`);
|
||||
logger.error(e);
|
||||
}
|
||||
}
|
||||
|
||||
export async function saveFavoriteMusic(refid: string, data : FavoriteMusic) : Promise<any>
|
||||
{
|
||||
return await DB.Upsert<FavoriteMusic>(refid, {
|
||||
collection: 'favoritemusic',
|
||||
}, data)
|
||||
}
|
||||
|
||||
export async function loadFavoriteMusic(refid : string) : Promise<FavoriteMusic | null>
|
||||
{
|
||||
const favoriteMusic = await DB.FindOne<FavoriteMusic>(refid, {
|
||||
collection: 'favoritemusic'
|
||||
})
|
||||
|
||||
if (!favoriteMusic) {
|
||||
logger.debugInfo(`No shared favourite music available for profile ${refid}. Using game specific favorites. Favorites will be saved as shared favorites at the end of the game session.`);
|
||||
return null
|
||||
}
|
||||
|
||||
return favoriteMusic
|
||||
}
|
||||
|
||||
|
|
@ -1,41 +1,80 @@
|
|||
import { getVersion } from "../utils";
|
||||
import { findMDBFile, readMDBFile, loadSongsForGameVersion } from "../data/mdb";
|
||||
import { CommonMusicDataField } from "../models/commonmusicdata";
|
||||
import Logger from "../utils/logger"
|
||||
import { getPlayableMusicResponse, PlayableMusicResponse } from "../models/Responses/playablemusicresponse";
|
||||
import { isAsphyxiaDebugMode } from "../utils/index";
|
||||
|
||||
const logger = new Logger("MusicList")
|
||||
import { processData as ExchainMusic } from "../data/Exchain"
|
||||
import { processData as MatixxMusic } from "../data/Matixx"
|
||||
import { CommonMusicDataField, readJSONOrXML, readXML } from "../data/helper";
|
||||
|
||||
export const playableMusic: EPR = async (info, data, send) => {
|
||||
const version = getVersion(info);
|
||||
const start = Date.now()
|
||||
let music: CommonMusicDataField[] = [];
|
||||
try {
|
||||
if (U.GetConfig("enable_custom_mdb")) {
|
||||
let customMdb = findMDBFile("custom")
|
||||
music = (await readMDBFile(customMdb)).music
|
||||
const data = await readXML('data/custom_mdb.xml')
|
||||
const mdb = $(data).elements("mdb.mdb_data");
|
||||
|
||||
for (const m of mdb) {
|
||||
const d = m.numbers("xg_diff_list");
|
||||
const contain = m.numbers("contain_stat");
|
||||
const gf = contain[0];
|
||||
const dm = contain[1];
|
||||
|
||||
if (gf == 0 && dm == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
let type = gf;
|
||||
if (gf == 0) {
|
||||
type = dm;
|
||||
}
|
||||
|
||||
music.push({
|
||||
id: K.ITEM('s32', m.number("music_id")),
|
||||
cont_gf: K.ITEM('bool', gf == 0 ? 0 : 1),
|
||||
cont_dm: K.ITEM('bool', dm == 0 ? 0 : 1),
|
||||
is_secret: K.ITEM('bool', 0),
|
||||
is_hot: K.ITEM('bool', type == 2 ? 0 : 1),
|
||||
data_ver: K.ITEM('s32', m.number("data_ver", 115)),
|
||||
diff: K.ARRAY('u16', [
|
||||
d[0],
|
||||
d[1],
|
||||
d[2],
|
||||
d[3],
|
||||
d[4],
|
||||
d[10],
|
||||
d[11],
|
||||
d[12],
|
||||
d[13],
|
||||
d[14],
|
||||
d[5],
|
||||
d[6],
|
||||
d[7],
|
||||
d[8],
|
||||
d[9],
|
||||
]),
|
||||
});
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
logger.warn("Read Custom MDB failed. Using default MDB as a fallback.")
|
||||
logger.debugWarn(e.stack);
|
||||
console.error(e.stack);
|
||||
console.error("Fallback: Using default MDB method.")
|
||||
music = [];
|
||||
}
|
||||
|
||||
if (music.length == 0) {
|
||||
music = (await loadSongsForGameVersion(version)).music
|
||||
if (version == 'exchain') {
|
||||
music = _.get(await ExchainMusic(), 'music', []);
|
||||
} else {
|
||||
music = _.get(await MatixxMusic(), 'music', []);
|
||||
}
|
||||
}
|
||||
|
||||
const end = Date.now()
|
||||
const timeDiff = end - start
|
||||
logger.debugInfo(`MDB loading took ${timeDiff} ms`)
|
||||
|
||||
let response : PlayableMusicResponse = getPlayableMusicResponse(music)
|
||||
await send.object(response)
|
||||
|
||||
if (isAsphyxiaDebugMode()) {
|
||||
await IO.WriteFile(`apisamples/playableMusicList.json`, JSON.stringify(music, null, 4))
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
await send.object({
|
||||
hot: {
|
||||
major: K.ITEM('s32', 1),
|
||||
minor: K.ITEM('s32', 1),
|
||||
},
|
||||
musicinfo: K.ATTR({ nr: `${music.length}` }, {
|
||||
music,
|
||||
}),
|
||||
});
|
||||
};
|
||||
|
|
@ -1,90 +0,0 @@
|
|||
import { PLUGIN_VER } from "../const";
|
||||
import { Scores } from "../models/scores";
|
||||
|
||||
type ScoreDiff = Scores['scores'][string]['diffs'][string];
|
||||
type ScoreEntry = Scores['scores'][string];
|
||||
|
||||
function selectBetterMeter(existing?: string, incoming?: string): string {
|
||||
if (!incoming) return existing ?? "0";
|
||||
if (!existing) return incoming;
|
||||
|
||||
try {
|
||||
return BigInt(incoming) > BigInt(existing) ? incoming : existing;
|
||||
} catch (e) {
|
||||
return incoming || existing;
|
||||
}
|
||||
}
|
||||
|
||||
function mergeScoreDiff(existing: ScoreDiff | undefined, incoming: ScoreDiff): ScoreDiff {
|
||||
if (!existing) return incoming;
|
||||
|
||||
return {
|
||||
perc: Math.max(existing.perc ?? 0, incoming.perc ?? 0),
|
||||
rank: Math.max(existing.rank ?? 0, incoming.rank ?? 0),
|
||||
meter: selectBetterMeter(existing.meter, incoming.meter),
|
||||
prog: Math.max(existing.prog ?? 0, incoming.prog ?? 0),
|
||||
clear: (existing.clear ?? false) || (incoming.clear ?? false),
|
||||
fc: (existing.fc ?? false) || (incoming.fc ?? false),
|
||||
ex: (existing.ex ?? false) || (incoming.ex ?? false),
|
||||
};
|
||||
}
|
||||
|
||||
function mergeScoreEntry(existing: ScoreEntry | undefined, incoming: ScoreEntry): ScoreEntry {
|
||||
const mergedDiffs: ScoreEntry['diffs'] = existing ? { ...existing.diffs } : {};
|
||||
|
||||
for (const [seq, diff] of Object.entries(incoming.diffs)) {
|
||||
mergedDiffs[seq] = mergeScoreDiff(mergedDiffs[seq], diff);
|
||||
}
|
||||
|
||||
const mergedUpdate = existing?.update ? [...existing.update] : [0, 0];
|
||||
if (incoming.update && (mergedUpdate[1] ?? 0) < incoming.update[1]) {
|
||||
mergedUpdate[0] = incoming.update[0];
|
||||
mergedUpdate[1] = incoming.update[1];
|
||||
}
|
||||
|
||||
return {
|
||||
update: mergedUpdate,
|
||||
diffs: mergedDiffs,
|
||||
};
|
||||
}
|
||||
|
||||
function mergeScoreCollections(target: Scores['scores'], incoming: Scores['scores']): Scores['scores'] {
|
||||
const merged = { ...target } as Scores['scores'];
|
||||
|
||||
for (const [mid, entry] of Object.entries(incoming)) {
|
||||
merged[mid] = mergeScoreEntry(merged[mid], entry);
|
||||
}
|
||||
|
||||
return merged;
|
||||
}
|
||||
|
||||
async function persistSharedScores(refid: string, game: 'gf' | 'dm', scores: Scores['scores']) {
|
||||
await DB.Upsert<Scores>(refid, { collection: 'scores', game, version: 'shared' }, {
|
||||
collection: 'scores',
|
||||
version: 'shared',
|
||||
pluginVer: PLUGIN_VER,
|
||||
game,
|
||||
scores,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Load and merge scores across all versions for a player/game pair and persist them under version "shared".
|
||||
*/
|
||||
export async function getMergedSharedScores(refid: string, game: 'gf' | 'dm'): Promise<Scores['scores']> {
|
||||
const scoreDocs = await DB.Find<Scores>(refid, { collection: 'scores', game });
|
||||
const mergedScores = scoreDocs.reduce<Scores['scores']>((acc, doc) => mergeScoreCollections(acc, doc.scores), {} as Scores['scores']);
|
||||
|
||||
await persistSharedScores(refid, game, mergedScores);
|
||||
return mergedScores;
|
||||
}
|
||||
|
||||
/**
|
||||
* Merge the provided score set into the shared scores document for the player/game pair.
|
||||
*/
|
||||
export async function mergeScoresIntoShared(refid: string, game: 'gf' | 'dm', scores: Scores['scores']) {
|
||||
const existingShared = await DB.FindOne<Scores>(refid, { collection: 'scores', game, version: 'shared' });
|
||||
const mergedScores = mergeScoreCollections(existingShared?.scores ?? {}, scores);
|
||||
|
||||
await persistSharedScores(refid, game, mergedScores);
|
||||
}
|
||||
|
|
@ -1,10 +1,3 @@
|
|||
/// <reference lib="es2020.bigint" />
|
||||
|
||||
import { getEncoreStageData } from "../data/extrastage";
|
||||
import Logger from "../utils/logger";
|
||||
import { getVersion } from "../utils";
|
||||
|
||||
const logger = new Logger('info');
|
||||
export const shopInfoRegist: EPR = async (info, data, send) => {
|
||||
send.object({
|
||||
data: {
|
||||
|
|
@ -21,393 +14,13 @@ export const shopInfoRegist: EPR = async (info, data, send) => {
|
|||
}
|
||||
|
||||
export const gameInfoGet: EPR = async (info, data, send) => {
|
||||
|
||||
const eventData = getEventDataResponse()
|
||||
const extraData = getEncoreStageData(info)
|
||||
const VER = getVersion(info)
|
||||
if (VER == "galaxywave"){
|
||||
await send.object({
|
||||
now_date: K.ITEM('u64', BigInt(Date.now())),
|
||||
extra: {
|
||||
extra_lv: K.ITEM('s32', extraData.level),
|
||||
extramusic: {
|
||||
music: extraData.musics.map(mid => {
|
||||
return {
|
||||
musicid: K.ITEM('s32', mid),
|
||||
get_border: K.ITEM('u8', 0),
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
infect_music: { term: K.ITEM('u8', 0) },
|
||||
unlock_challenge: { term: K.ITEM('s32', 0) },
|
||||
battle: { term: K.ITEM('s32', 0) },
|
||||
battle_chara: { term: K.ITEM('s32', 0) },
|
||||
data_ver_limit: { term: K.ITEM('s32', 0) },
|
||||
ea_pass_propel: { term: K.ITEM('s32', 0) },
|
||||
monthly_skill: {
|
||||
term: K.ITEM('u8', 0),
|
||||
target_music: {
|
||||
music: {
|
||||
musicid: K.ITEM('s32', 0),
|
||||
},
|
||||
},
|
||||
},
|
||||
update_prog: { term: K.ITEM('s32', 0) },
|
||||
rockwave: {
|
||||
event_list: {
|
||||
event: {
|
||||
data_id: K.ITEM('s32', 0),
|
||||
data_version: K.ITEM('s32', 0),
|
||||
event_id: K.ITEM('s32', 0),
|
||||
event_type: K.ITEM('s32', 0),
|
||||
start_date: K.ITEM('u64', BigInt(0)),
|
||||
end_date: K.ITEM('u64', BigInt(0)),
|
||||
is_open: K.ITEM('bool', 0),
|
||||
bg_no: K.ITEM('s32', 0),
|
||||
target_musicid: K.ITEM('s32', 0),
|
||||
clear_border: K.ITEM('s32', 0),
|
||||
reward_musicid: K.ITEM('s32', 0),
|
||||
reward_musicid_border_list: K.ITEM('s32', 0),
|
||||
reward_stickerid: K.ITEM('s32', 0),
|
||||
reward_stickerid_list: K.ITEM('s32', 0),
|
||||
reward_stickerid_border_list: K.ITEM('s32', 0),
|
||||
firstbit: K.ITEM('s32', 0),
|
||||
quest_no: K.ITEM('s32', 0),
|
||||
target_music_list: {
|
||||
music: {
|
||||
musicid: K.ITEM('s32', 0),
|
||||
}
|
||||
},
|
||||
ranking_list: K.ITEM('u64', BigInt(0)),
|
||||
}
|
||||
}
|
||||
},
|
||||
general_term: {
|
||||
termdata: {
|
||||
type: K.ITEM('str', ''),
|
||||
term: K.ITEM('s32', 0),
|
||||
state: K.ITEM('s32', 0),
|
||||
start_date_ms: K.ITEM('u64', BigInt(0)),
|
||||
end_date_ms: K.ITEM('u64', BigInt(0)),
|
||||
}
|
||||
},
|
||||
jubeat_omiyage_challenge: {},
|
||||
kac2017: {},
|
||||
nostalgia_concert: {},
|
||||
trbitemdata: {},
|
||||
ctrl_movie: {},
|
||||
ng_jacket: {},
|
||||
ng_recommend_music: {},
|
||||
ranking: {
|
||||
skill_0_999: {},
|
||||
skill_1000_1499: {},
|
||||
skill_1500_1999: {},
|
||||
skill_2000_2499: {},
|
||||
skill_2500_2999: {},
|
||||
skill_3000_3499: {},
|
||||
skill_3500_3999: {},
|
||||
skill_4000_4499: {},
|
||||
skill_4500_4999: {},
|
||||
skill_5000_5499: {},
|
||||
skill_5500_5999: {},
|
||||
skill_6000_6499: {},
|
||||
skill_6500_6999: {},
|
||||
skill_7000_7499: {},
|
||||
skill_7500_7999: {},
|
||||
skill_8000_8499: {},
|
||||
skill_8500_9999: {},
|
||||
total: {},
|
||||
original: {},
|
||||
bemani: {},
|
||||
famous: {},
|
||||
anime: {},
|
||||
band: {},
|
||||
western: {},
|
||||
},
|
||||
processing_report_state: K.ITEM('u8', 0),
|
||||
assert_report_state: K.ITEM('u8', 0),
|
||||
recommendmusic: { '@attr': { nr: 0 } },
|
||||
demomusic: { '@attr': { nr: 0 } },
|
||||
event_skill: {},
|
||||
temperature: { is_send: K.ITEM('bool', 0) },
|
||||
bemani_summer_2018: { is_open: K.ITEM('bool', 0) },
|
||||
kac2018: {
|
||||
event: {
|
||||
term: K.ITEM('s32', 0),
|
||||
since: K.ITEM('u64', BigInt(0)),
|
||||
till: K.ITEM('u64', BigInt(0)),
|
||||
is_open: K.ITEM('bool', 0),
|
||||
target_music: {
|
||||
music_id: K.ARRAY('s32', [0, 0, 0, 0, 0, 0]),
|
||||
},
|
||||
},
|
||||
},
|
||||
...eventData,
|
||||
});
|
||||
} else if (VER == "fuzzup"){
|
||||
await send.object({
|
||||
now_date: K.ITEM('u64', BigInt(Date.now())),
|
||||
extra: {
|
||||
extra_lv: K.ITEM('u8', extraData.level),
|
||||
extramusic: {
|
||||
music: extraData.musics.map(mid => {
|
||||
return {
|
||||
musicid: K.ITEM('s32', mid),
|
||||
get_border: K.ITEM('u8', 0),
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
infect_music: { term: K.ITEM('u8', 0) },
|
||||
unlock_challenge: { term: K.ITEM('u8', 0) },
|
||||
battle: { term: K.ITEM('u8', 0) },
|
||||
battle_chara: { term: K.ITEM('u8', 0) },
|
||||
data_ver_limit: { term: K.ITEM('s32', 0) },
|
||||
ea_pass_propel: { term: K.ITEM('u8', 0) },
|
||||
monthly_skill: {
|
||||
term: K.ITEM('u8', 0),
|
||||
target_music: {
|
||||
music: {
|
||||
musicid: K.ITEM('s32', 0),
|
||||
},
|
||||
},
|
||||
},
|
||||
update_prog: { term: K.ITEM('u8', 0) },
|
||||
rockwave: { event_list: {} },
|
||||
general_term: {},
|
||||
jubeat_omiyage_challenge: {},
|
||||
kac2017: {},
|
||||
nostalgia_concert: {},
|
||||
trbitemdata: {},
|
||||
ctrl_movie: {},
|
||||
ng_jacket: {},
|
||||
ng_recommend_music: {},
|
||||
ranking: {
|
||||
skill_0_999: {},
|
||||
skill_1000_1499: {},
|
||||
skill_1500_1999: {},
|
||||
skill_2000_2499: {},
|
||||
skill_2500_2999: {},
|
||||
skill_3000_3499: {},
|
||||
skill_3500_3999: {},
|
||||
skill_4000_4499: {},
|
||||
skill_4500_4999: {},
|
||||
skill_5000_5499: {},
|
||||
skill_5500_5999: {},
|
||||
skill_6000_6499: {},
|
||||
skill_6500_6999: {},
|
||||
skill_7000_7499: {},
|
||||
skill_7500_7999: {},
|
||||
skill_8000_8499: {},
|
||||
skill_8500_9999: {},
|
||||
total: {},
|
||||
original: {},
|
||||
bemani: {},
|
||||
famous: {},
|
||||
anime: {},
|
||||
band: {},
|
||||
western: {},
|
||||
},
|
||||
processing_report_state: K.ITEM('u8', 0),
|
||||
assert_report_state: K.ITEM('u8', 0),
|
||||
recommendmusic: { '@attr': { nr: 0 } },
|
||||
demomusic: { '@attr': { nr: 0 } },
|
||||
event_skill: {},
|
||||
temperature: { is_send: K.ITEM('bool', 0) },
|
||||
bemani_summer_2018: { is_open: K.ITEM('bool', 0) },
|
||||
kac2018: {
|
||||
event: {
|
||||
term: K.ITEM('s32', 0),
|
||||
since: K.ITEM('u64', BigInt(0)),
|
||||
till: K.ITEM('u64', BigInt(0)),
|
||||
is_open: K.ITEM('bool', 0),
|
||||
target_music: {
|
||||
music_id: K.ARRAY('s32', [0, 0, 0, 0, 0, 0]),
|
||||
},
|
||||
},
|
||||
},
|
||||
livehouse: {
|
||||
event_list: {
|
||||
event: {
|
||||
is_open: K.ITEM('bool', 0),
|
||||
term: K.ITEM('u8', 0),
|
||||
start_date_ms: K.ITEM('u64', BigInt(0)),
|
||||
end_date_ms: K.ITEM('u64', BigInt(0)),
|
||||
livehouse_name: K.ITEM('str', 'Asphyxia'),
|
||||
reward_list: {
|
||||
reward: {
|
||||
reward_id: K.ITEM('s32', 0),
|
||||
reward_kind: K.ITEM('s32', 0),
|
||||
reward_itemid: K.ITEM('s32', 0),
|
||||
unlock_border: K.ITEM('s32', 0),
|
||||
},
|
||||
},
|
||||
requirements_musicid: K.ITEM('s32', 0),
|
||||
member_table: K.ITEM('s32', 0),
|
||||
},
|
||||
},
|
||||
bonus: {
|
||||
term: K.ITEM('u8', 0),
|
||||
stage_bonus: K.ITEM('s32', 0),
|
||||
charm_bonus: K.ITEM('s32', 0),
|
||||
start_date_ms: K.ITEM('u64', BigInt(0)),
|
||||
end_date_ms: K.ITEM('u64', BigInt(0)),
|
||||
},
|
||||
},
|
||||
...eventData,
|
||||
});
|
||||
}//Older
|
||||
else {
|
||||
await send.object({
|
||||
now_date: K.ITEM('u64', BigInt(Date.now())),
|
||||
extra: {
|
||||
extra_lv: K.ITEM('u8', extraData.level),
|
||||
extramusic: {
|
||||
music: extraData.musics.map(mid => {
|
||||
return {
|
||||
musicid: K.ITEM('s32', mid),
|
||||
get_border: K.ITEM('u8', 0),
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
infect_music: { term: K.ITEM('u8', 0) },
|
||||
unlock_challenge: { term: K.ITEM('u8', 0) },
|
||||
battle: { term: K.ITEM('u8', 0) },
|
||||
battle_chara: { term: K.ITEM('u8', 0) },
|
||||
data_ver_limit: { term: K.ITEM('u8', 0) },
|
||||
ea_pass_propel: { term: K.ITEM('u8', 0) },
|
||||
monthly_skill: {
|
||||
term: K.ITEM('u8', 0),
|
||||
target_music: {
|
||||
music: {
|
||||
musicid: K.ITEM('s32', 0),
|
||||
},
|
||||
},
|
||||
},
|
||||
update_prog: { term: K.ITEM('u8', 0) },
|
||||
rockwave: { event_list: {} },
|
||||
general_term: {},
|
||||
jubeat_omiyage_challenge: {},
|
||||
kac2017: {},
|
||||
nostalgia_concert: {},
|
||||
trbitemdata: {},
|
||||
ctrl_movie: {},
|
||||
ng_jacket: {},
|
||||
ng_recommend_music: {},
|
||||
ranking: {
|
||||
skill_0_999: {},
|
||||
skill_1000_1499: {},
|
||||
skill_1500_1999: {},
|
||||
skill_2000_2499: {},
|
||||
skill_2500_2999: {},
|
||||
skill_3000_3499: {},
|
||||
skill_3500_3999: {},
|
||||
skill_4000_4499: {},
|
||||
skill_4500_4999: {},
|
||||
skill_5000_5499: {},
|
||||
skill_5500_5999: {},
|
||||
skill_6000_6499: {},
|
||||
skill_6500_6999: {},
|
||||
skill_7000_7499: {},
|
||||
skill_7500_7999: {},
|
||||
skill_8000_8499: {},
|
||||
skill_8500_9999: {},
|
||||
total: {},
|
||||
original: {},
|
||||
bemani: {},
|
||||
famous: {},
|
||||
anime: {},
|
||||
band: {},
|
||||
western: {},
|
||||
},
|
||||
processing_report_state: K.ITEM('u8', 0),
|
||||
assert_report_state: K.ITEM('u8', 0),
|
||||
recommendmusic: { '@attr': { nr: 0 } },
|
||||
demomusic: { '@attr': { nr: 0 } },
|
||||
event_skill: {},
|
||||
temperature: { is_send: K.ITEM('bool', 0) },
|
||||
bemani_summer_2018: { is_open: K.ITEM('bool', 0) },
|
||||
kac2018: {
|
||||
event: {
|
||||
term: K.ITEM('s32', 0),
|
||||
since: K.ITEM('u64', BigInt(0)),
|
||||
till: K.ITEM('u64', BigInt(0)),
|
||||
is_open: K.ITEM('bool', 0),
|
||||
target_music: {
|
||||
music_id: K.ARRAY('s32', [0, 0, 0, 0, 0, 0]),
|
||||
},
|
||||
},
|
||||
},
|
||||
KAC2016: {
|
||||
is_entry: K.ITEM('bool', 0),
|
||||
term: K.ITEM('u8', 0),
|
||||
musicid: K.ITEM('s32', 0),
|
||||
},
|
||||
KAC2016_skill_ranking: { term: K.ITEM('u8', 0) },
|
||||
season_sticker: { term: K.ITEM('u8', 0) },
|
||||
paseli_point_lose: { term: K.ITEM('u8', 0) },
|
||||
nostal_link: { term: K.ITEM('u8', 0) },
|
||||
encore_advent: { term: K.ITEM('u8', 0) },
|
||||
sdvx_stamprally: { term: K.ITEM('u8', 0) },
|
||||
sdvx_stamprally2: { term: K.ITEM('u8', 0) },
|
||||
floor_policy_2_info: { term: K.ITEM('u8', 0) },
|
||||
long_otobear_fes_2: {
|
||||
term: K.ITEM('u8', 0),
|
||||
bonus_musicid: K.ITEM('s32', 0),
|
||||
},
|
||||
...eventData,
|
||||
});
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
function getEventDataResponse() {
|
||||
const addition: any = {
|
||||
monstar_subjugation: {
|
||||
bonus_musicid: K.ITEM('s32', 0),
|
||||
},
|
||||
bear_fes: {},
|
||||
nextadium: {},
|
||||
galaxy_parade: {
|
||||
corner_list: {
|
||||
corner: {
|
||||
is_open: K.ITEM('bool', 0),
|
||||
data_ver: K.ITEM('s32', 0),
|
||||
genre: K.ITEM('s32', 0),
|
||||
corner_id: K.ITEM('s32', 0),
|
||||
corner_name: K.ITEM('str', ''),
|
||||
start_date_ms: K.ITEM('u64', BigInt(0)),
|
||||
end_date_ms: K.ITEM('u64', BigInt(0)),
|
||||
requirements_musicid: K.ITEM('s32', 0),
|
||||
reward_list: {
|
||||
reward: {
|
||||
reward_id: K.ITEM('s32', 0),
|
||||
reward_kind: K.ITEM('s32', 0),
|
||||
reward_itemid: K.ITEM('s32', 0),
|
||||
unlock_border: K.ITEM('s32', 0),
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
gacha_table: {
|
||||
chara_odds: {
|
||||
chara_id: K.ITEM('s32', 0),
|
||||
odds: K.ITEM('s32', 0),
|
||||
}
|
||||
},
|
||||
bonus: {
|
||||
term: K.ITEM('s32', 0),
|
||||
stage_bonus: K.ITEM('s32', 0),
|
||||
charm_bonus: K.ITEM('s32', 0),
|
||||
start_date_ms: K.ITEM('u64', BigInt(0)),
|
||||
end_date_ms: K.ITEM('u64', BigInt(0)),
|
||||
}
|
||||
},
|
||||
};
|
||||
const time = BigInt(31536000);
|
||||
|
||||
for (let i = 1; i <= 20; ++i) {
|
||||
const obj = {
|
||||
term: K.ITEM('u8', 0),
|
||||
|
|
@ -420,8 +33,7 @@ function getEventDataResponse() {
|
|||
term: K.ITEM('u8', 0),
|
||||
start_date_ms: K.ITEM('u64', time),
|
||||
end_date_ms: K.ITEM('u64', time),
|
||||
//bonus_musicid: {},
|
||||
bonus_musicid: K.ITEM('s32', 0),
|
||||
bonus_musicid: {},
|
||||
};
|
||||
addition[`sdvx_stamprally3`] = obj;
|
||||
addition[`chronicle_1`] = obj;
|
||||
|
|
@ -430,20 +42,7 @@ function getEventDataResponse() {
|
|||
term: K.ITEM('u8', 0),
|
||||
sticker_list: {},
|
||||
};
|
||||
addition['thanksgiving'] = {
|
||||
...obj,
|
||||
box_term: {
|
||||
state: K.ITEM('u8', 0)
|
||||
}
|
||||
};
|
||||
addition['lotterybox'] = {
|
||||
...obj,
|
||||
box_term: {
|
||||
state: K.ITEM('u8', 0)
|
||||
}
|
||||
};
|
||||
} else {
|
||||
|
||||
addition[`phrase_combo_challenge_${i}`] = obj;
|
||||
}
|
||||
|
||||
|
|
@ -451,42 +50,94 @@ function getEventDataResponse() {
|
|||
addition['monstar_subjugation'][`monstar_subjugation_${i}`] = obj;
|
||||
addition['bear_fes'][`bear_fes_${i}`] = obj;
|
||||
}
|
||||
|
||||
if (i <= 2) {
|
||||
addition[`gitadora_oracle_${i}`] = {
|
||||
term: K.ITEM('u8', 0),
|
||||
bonus_musicid: K.ITEM('s32', 0),
|
||||
};
|
||||
addition[`gitadora_oracle_${i}`] = {
|
||||
term: K.ITEM('u8', 0),
|
||||
bonus_musicid: K.ITEM('s32', 0),
|
||||
};
|
||||
}
|
||||
|
||||
if (i <= 3) {
|
||||
addition[`kouyou_challenge_${i}`] = {
|
||||
term: K.ITEM('u8', 0),
|
||||
bonus_musicid: K.ITEM('s32', 0),
|
||||
};
|
||||
addition[`dokidoki_valentine2_${i}`] = {
|
||||
term: K.ITEM('u8', 0),
|
||||
bonus_musicid: K.ITEM('s32', 0),
|
||||
};
|
||||
addition[`wakuteka_whiteday2_${i}`] = { term: K.ITEM('u8', 0) };
|
||||
addition[`ohanami_challenge_${i}`] = {
|
||||
term: K.ITEM('u8', 0),
|
||||
bonus_musicid: K.ITEM('s32', 0),
|
||||
};
|
||||
addition[`otobear_in_the_tsubo_${i}`] = {
|
||||
term: K.ITEM('u8', 0),
|
||||
bonus_musicid: K.ITEM('s32', 0),
|
||||
};
|
||||
addition[`summer_craft_${i}`] = {
|
||||
term: K.ITEM('u8', 0),
|
||||
bonus_musicid: K.ITEM('s32', 0),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
return addition
|
||||
}
|
||||
|
||||
await send.object({
|
||||
now_date: K.ITEM('u64', time),
|
||||
extra: {
|
||||
extra_lv: K.ITEM('u8', 10),
|
||||
extramusic: {
|
||||
music: {
|
||||
musicid: K.ITEM('s32', 0),
|
||||
get_border: K.ITEM('u8', 0),
|
||||
},
|
||||
},
|
||||
},
|
||||
infect_music: { term: K.ITEM('u8', 0) },
|
||||
unlock_challenge: { term: K.ITEM('u8', 0) },
|
||||
battle: { term: K.ITEM('u8', 0) },
|
||||
battle_chara: { term: K.ITEM('u8', 0) },
|
||||
data_ver_limit: { term: K.ITEM('u8', 0) },
|
||||
ea_pass_propel: { term: K.ITEM('u8', 0) },
|
||||
monthly_skill: {
|
||||
term: K.ITEM('u8', 0),
|
||||
target_music: {
|
||||
music: {
|
||||
musicid: K.ITEM('s32', 0),
|
||||
},
|
||||
},
|
||||
},
|
||||
update_prog: { term: K.ITEM('u8', 0) },
|
||||
rockwave: { event_list: {} },
|
||||
general_term: {},
|
||||
jubeat_omiyage_challenge: {},
|
||||
kac2017: {},
|
||||
nostalgia_concert: {},
|
||||
trbitemdata: {},
|
||||
ctrl_movie: {},
|
||||
ng_jacket: {},
|
||||
ng_recommend_music: {},
|
||||
ranking: {
|
||||
skill_0_999: {},
|
||||
skill_1000_1499: {},
|
||||
skill_1500_1999: {},
|
||||
skill_2000_2499: {},
|
||||
skill_2500_2999: {},
|
||||
skill_3000_3499: {},
|
||||
skill_3500_3999: {},
|
||||
skill_4000_4499: {},
|
||||
skill_4500_4999: {},
|
||||
skill_5000_5499: {},
|
||||
skill_5500_5999: {},
|
||||
skill_6000_6499: {},
|
||||
skill_6500_6999: {},
|
||||
skill_7000_7499: {},
|
||||
skill_7500_7999: {},
|
||||
skill_8000_8499: {},
|
||||
skill_8500_9999: {},
|
||||
total: {},
|
||||
original: {},
|
||||
bemani: {},
|
||||
famous: {},
|
||||
anime: {},
|
||||
band: {},
|
||||
western: {},
|
||||
},
|
||||
processing_report_state: K.ITEM('u8', 0),
|
||||
assert_report_state: K.ITEM('u8', 0),
|
||||
recommendmusic: { '@attr': { nr: 0 } },
|
||||
demomusic: { '@attr': { nr: 0 } },
|
||||
event_skill: {},
|
||||
temperature: { is_send: K.ITEM('bool', 0) },
|
||||
bemani_summer_2018: { is_open: K.ITEM('bool', 0) },
|
||||
kac2018: {
|
||||
event: {
|
||||
term: K.ITEM('s32', 0),
|
||||
since: K.ITEM('u64', BigInt(0)),
|
||||
till: K.ITEM('u64', BigInt(0)),
|
||||
is_open: K.ITEM('bool', 0),
|
||||
target_music: {
|
||||
music_id: K.ARRAY('s32', [0, 0, 0, 0, 0, 0]),
|
||||
},
|
||||
},
|
||||
},
|
||||
...addition,
|
||||
});
|
||||
};
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,79 +1,37 @@
|
|||
import { gameInfoGet, shopInfoRegist } from "./handlers/info";
|
||||
import { playableMusic } from "./handlers/MusicList"
|
||||
import { getPlayer, check, regist, savePlayers } from "./handlers/profiles";
|
||||
import { getPlayer, check, regist, savePlayer } from "./handlers/profiles";
|
||||
import { updatePlayerInfo } from "./handlers/webui";
|
||||
import { isAsphyxiaDebugMode, isRequiredCoreVersion } from "./utils";
|
||||
import Logger from "./utils/logger";
|
||||
|
||||
const logger = new Logger("main")
|
||||
import { isRequiredVersion } from "./utils";
|
||||
|
||||
export function register() {
|
||||
if(!isRequiredCoreVersion(1, 20)) {
|
||||
console.error("A newer version of Asphyxia Core (v1.20 or later) is required.")
|
||||
if(!isRequiredVersion(1, 20)) {
|
||||
console.error("You need newer version of Core. v1.20 or newer required.")
|
||||
}
|
||||
|
||||
R.GameCode('M32');
|
||||
|
||||
R.Config("encore_version", {
|
||||
name: "Encore Version",
|
||||
desc: "Set encore version",
|
||||
type: "integer",
|
||||
default: 13,
|
||||
})
|
||||
|
||||
R.Config("nextage_dummy_encore", {
|
||||
name: "Dummy Encore for SPE (Nextage Only)",
|
||||
desc: "Since Nextage's Special Premium Encore system is bit complicated, \n"
|
||||
+ "SPE System isn't fully implemented. \n"
|
||||
+ "This option is a workaround for this issue as limiting some Encores for SPE.",
|
||||
type: "boolean",
|
||||
default: false
|
||||
})
|
||||
|
||||
R.Config("enable_custom_mdb", {
|
||||
name: "Enable Custom MDB",
|
||||
desc: "If disabled, the server will provide the default MDB (song list) to Gitadora clients, depending on which version of the game they are running." +
|
||||
"Enable this option to provide your own custom MDB instead. MDB files are stored in the 'gitadora@asphyxia/data/mdb' folder, and can be in .xml, .json or .b64 format.",
|
||||
desc: "For who uses own MDB",
|
||||
type: "boolean",
|
||||
default: false,
|
||||
})
|
||||
|
||||
R.Config("shared_favorite_songs", {
|
||||
name: "Shared Favorite Songs (Experimental)",
|
||||
desc: "If disabled, players will be able to keep separate lists of favorite songs for each version of Gitadora, as well as between Guitar Freaks and Drummania. " +
|
||||
"Enable this option to have a single unified list of favorite songs for both games, and across all versions. Default is false, to match original arcade behaviour.",
|
||||
type: "boolean",
|
||||
default: false,
|
||||
})
|
||||
|
||||
R.Config("shared_song_scores", {
|
||||
name: "Shared Song Scores (Experimental)",
|
||||
desc: "If disabled, players will keep separate scoreboards per version. Enable to merge best scores across all versions and games into a shared store.",
|
||||
type: "boolean",
|
||||
default: false,
|
||||
})
|
||||
|
||||
R.DataFile("data/mdb/custom.xml", {
|
||||
R.DataFile("data/custom_mdb.xml", {
|
||||
accept: ".xml",
|
||||
name: "Custom MDB",
|
||||
desc: "Remember to enable the 'Enable Custom MDB' option for the uploaded file to have any effect."
|
||||
desc: "You need to enable Custom MDB option first."
|
||||
})
|
||||
|
||||
R.WebUIEvent('updatePlayerInfo', updatePlayerInfo);
|
||||
|
||||
const MultiRoute = (method: string, handler: EPR | boolean) => {
|
||||
// Helper for register multiple versions.
|
||||
R.Route(`${method}`, handler);
|
||||
R.Route(`re_${method}`, handler);
|
||||
R.Route(`matixx_${method}`, handler);
|
||||
R.Route(`exchain_${method}`, handler);
|
||||
R.Route(`matixx_${method}`, handler);
|
||||
R.Route(`nextage_${method}`, handler)
|
||||
R.Route(`highvoltage_${method}`, handler)
|
||||
R.Route(`fuzzup_${method}`, handler)
|
||||
R.Route(`galaxywave_${method}`, handler)
|
||||
R.Route(`galaxywave_delta_${method}`, handler)
|
||||
// TODO: TB, and more older version?
|
||||
// TODO: NEXTAGE
|
||||
// TODO: TB, TBRE and more older version?
|
||||
};
|
||||
|
||||
// Info
|
||||
|
|
@ -87,14 +45,5 @@ export function register() {
|
|||
MultiRoute('cardutil.regist', regist);
|
||||
MultiRoute('cardutil.check', check);
|
||||
MultiRoute('gametop.get', getPlayer);
|
||||
MultiRoute('gameend.regist', savePlayers);
|
||||
|
||||
// Misc
|
||||
R.Route('bemani_gakuen.get_music_info', true)
|
||||
|
||||
R.Unhandled(async (info, data, send) => {
|
||||
if (["eventlog"].includes(info.module)) return;
|
||||
logger.error(`Received Unhandled Request on Method "${info.method}" by ${info.model}/${info.module}`)
|
||||
logger.debugError(`Received Request: ${JSON.stringify(data, null, 4)}`)
|
||||
})
|
||||
MultiRoute('gameend.regist', savePlayer);
|
||||
}
|
||||
|
|
@ -1,79 +0,0 @@
|
|||
export interface BattleDataResponse
|
||||
{
|
||||
info: {
|
||||
orb: KITEM<'s32'>,
|
||||
get_gb_point: KITEM<'s32'>,
|
||||
send_gb_point: KITEM<'s32'>,
|
||||
}
|
||||
greeting: {
|
||||
greeting_1: KITEM<'str'>,
|
||||
greeting_2: KITEM<'str'>,
|
||||
greeting_3: KITEM<'str'>,
|
||||
greeting_4: KITEM<'str'>,
|
||||
greeting_5: KITEM<'str'>,
|
||||
greeting_6: KITEM<'str'>,
|
||||
greeting_7: KITEM<'str'>,
|
||||
greeting_8: KITEM<'str'>,
|
||||
greeting_9: KITEM<'str'>,
|
||||
|
||||
}
|
||||
setting: {
|
||||
matching: KITEM<'s32'>,
|
||||
info_level: KITEM<'s32'>,
|
||||
}
|
||||
|
||||
score: {
|
||||
battle_class: KITEM<'s32'>,
|
||||
max_battle_class: KITEM<'s32'>,
|
||||
battle_point: KITEM<'s32'>,
|
||||
win: KITEM<'s32'>,
|
||||
lose: KITEM<'s32'>,
|
||||
draw: KITEM<'s32'>,
|
||||
consecutive_win: KITEM<'s32'>,
|
||||
max_consecutive_win: KITEM<'s32'>,
|
||||
glorious_win: KITEM<'s32'>,
|
||||
max_defeat_skill: KITEM<'s32'>,
|
||||
latest_result: KITEM<'s32'>,
|
||||
|
||||
}
|
||||
history: {}
|
||||
}
|
||||
|
||||
export function getDefaultBattleDataResponse() : BattleDataResponse {
|
||||
return {
|
||||
info: {
|
||||
orb: K.ITEM('s32', 0),
|
||||
get_gb_point: K.ITEM('s32', 0),
|
||||
send_gb_point: K.ITEM('s32', 0),
|
||||
},
|
||||
greeting: {
|
||||
greeting_1: K.ITEM('str', ''),
|
||||
greeting_2: K.ITEM('str', ''),
|
||||
greeting_3: K.ITEM('str', ''),
|
||||
greeting_4: K.ITEM('str', ''),
|
||||
greeting_5: K.ITEM('str', ''),
|
||||
greeting_6: K.ITEM('str', ''),
|
||||
greeting_7: K.ITEM('str', ''),
|
||||
greeting_8: K.ITEM('str', ''),
|
||||
greeting_9: K.ITEM('str', ''),
|
||||
},
|
||||
setting: {
|
||||
matching: K.ITEM('s32', 0),
|
||||
info_level: K.ITEM('s32', 0),
|
||||
},
|
||||
score: {
|
||||
battle_class: K.ITEM('s32', 0),
|
||||
max_battle_class: K.ITEM('s32', 0),
|
||||
battle_point: K.ITEM('s32', 0),
|
||||
win: K.ITEM('s32', 0),
|
||||
lose: K.ITEM('s32', 0),
|
||||
draw: K.ITEM('s32', 0),
|
||||
consecutive_win: K.ITEM('s32', 0),
|
||||
max_consecutive_win: K.ITEM('s32', 0),
|
||||
glorious_win: K.ITEM('s32', 0),
|
||||
max_defeat_skill: K.ITEM('s32', 0),
|
||||
latest_result: K.ITEM('s32', 0),
|
||||
},
|
||||
history: {},
|
||||
}
|
||||
}
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
export interface CheckPlayerResponse {
|
||||
player: {
|
||||
name: KITEM<'str'>,
|
||||
charaid: KITEM<'s32'>,
|
||||
did: KITEM<'s32'>,
|
||||
skilldata: {
|
||||
skill: KITEM<'s32'>
|
||||
all_skill: KITEM<'s32'>
|
||||
old_skill: KITEM<'s32'>
|
||||
old_all_skill: KITEM<'s32'>
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
export function getCheckPlayerResponse(playerNo : number, name: string, id: number) : CheckPlayerResponse
|
||||
{
|
||||
return {
|
||||
player: K.ATTR({ no: `${playerNo}`, state: '2' }, {
|
||||
name: K.ITEM('str', name),
|
||||
charaid: K.ITEM('s32', 0),
|
||||
did: K.ITEM('s32', id),
|
||||
skilldata: {
|
||||
skill: K.ITEM('s32', 0),
|
||||
all_skill: K.ITEM('s32', 0),
|
||||
old_skill: K.ITEM('s32', 0),
|
||||
old_all_skill: K.ITEM('s32', 0),
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
import { CommonMusicDataField } from "../commonmusicdata"
|
||||
|
||||
export interface PlayableMusicResponse
|
||||
{
|
||||
hot: {
|
||||
major: KITEM<'s32'>,
|
||||
minor: KITEM<'s32'>
|
||||
}
|
||||
musicinfo: KATTR<any>
|
||||
}
|
||||
|
||||
export function getPlayableMusicResponse(music : CommonMusicDataField[]) : PlayableMusicResponse {
|
||||
return {
|
||||
hot: {
|
||||
major: K.ITEM('s32', 1),
|
||||
minor: K.ITEM('s32', 1),
|
||||
},
|
||||
musicinfo: K.ATTR({ nr: `${music.length}` }, {
|
||||
music,
|
||||
}),
|
||||
}
|
||||
}
|
||||
|
|
@ -1,71 +0,0 @@
|
|||
import { Profile } from "../profile";
|
||||
|
||||
export interface PlayerPlayInfoResponse {
|
||||
cabid: KITEM<'s32'>,
|
||||
play: KITEM<'s32'>,
|
||||
playtime: KITEM<'s32'>,
|
||||
playterm: KITEM<'s32'>,
|
||||
session_cnt: KITEM<'s32'>,
|
||||
matching_num: KITEM<'s32'>,
|
||||
extra_stage: KITEM<'s32'>,
|
||||
extra_play: KITEM<'s32'>,
|
||||
extra_clear: KITEM<'s32'>,
|
||||
encore_play: KITEM<'s32'>,
|
||||
encore_clear: KITEM<'s32'>,
|
||||
pencore_play: KITEM<'s32'>,
|
||||
pencore_clear: KITEM<'s32'>,
|
||||
max_clear_diff: KITEM<'s32'>,
|
||||
max_full_diff: KITEM<'s32'>,
|
||||
max_exce_diff: KITEM<'s32'>,
|
||||
clear_num: KITEM<'s32'>,
|
||||
full_num: KITEM<'s32'>,
|
||||
exce_num: KITEM<'s32'>,
|
||||
no_num: KITEM<'s32'>,
|
||||
e_num: KITEM<'s32'>,
|
||||
d_num: KITEM<'s32'>,
|
||||
c_num: KITEM<'s32'>,
|
||||
b_num: KITEM<'s32'>,
|
||||
a_num: KITEM<'s32'>,
|
||||
s_num: KITEM<'s32'>,
|
||||
ss_num: KITEM<'s32'>,
|
||||
last_category: KITEM<'s32'>,
|
||||
last_musicid: KITEM<'s32'>,
|
||||
last_seq: KITEM<'s32'>,
|
||||
disp_level: KITEM<'s32'>,
|
||||
}
|
||||
export function getPlayerPlayInfoResponse(profile : Profile) : PlayerPlayInfoResponse {
|
||||
return {
|
||||
cabid: K.ITEM('s32', 0),
|
||||
play: K.ITEM('s32', profile.play),
|
||||
playtime: K.ITEM('s32', profile.playtime),
|
||||
playterm: K.ITEM('s32', profile.playterm),
|
||||
session_cnt: K.ITEM('s32', profile.session_cnt),
|
||||
matching_num: K.ITEM('s32', 0),
|
||||
extra_stage: K.ITEM('s32', profile.extra_stage),
|
||||
extra_play: K.ITEM('s32', profile.extra_play),
|
||||
extra_clear: K.ITEM('s32', profile.extra_clear),
|
||||
encore_play: K.ITEM('s32', profile.encore_play),
|
||||
encore_clear: K.ITEM('s32', profile.encore_clear),
|
||||
pencore_play: K.ITEM('s32', profile.pencore_play),
|
||||
pencore_clear: K.ITEM('s32', profile.pencore_clear),
|
||||
max_clear_diff: K.ITEM('s32', profile.max_clear_diff),
|
||||
max_full_diff: K.ITEM('s32', profile.max_full_diff),
|
||||
max_exce_diff: K.ITEM('s32', profile.max_exce_diff),
|
||||
clear_num: K.ITEM('s32', profile.clear_num),
|
||||
full_num: K.ITEM('s32', profile.full_num),
|
||||
exce_num: K.ITEM('s32', profile.exce_num),
|
||||
no_num: K.ITEM('s32', profile.no_num),
|
||||
e_num: K.ITEM('s32', profile.e_num),
|
||||
d_num: K.ITEM('s32', profile.d_num),
|
||||
c_num: K.ITEM('s32', profile.c_num),
|
||||
b_num: K.ITEM('s32', profile.b_num),
|
||||
a_num: K.ITEM('s32', profile.a_num),
|
||||
s_num: K.ITEM('s32', profile.s_num),
|
||||
ss_num: K.ITEM('s32', profile.ss_num),
|
||||
last_category: K.ITEM('s32', profile.last_category),
|
||||
last_musicid: K.ITEM('s32', profile.last_musicid),
|
||||
last_seq: K.ITEM('s32', profile.last_seq),
|
||||
disp_level: K.ITEM('s32', profile.disp_level),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,110 +0,0 @@
|
|||
import { Profile } from "../profile"
|
||||
import { Record } from "../record"
|
||||
|
||||
export interface PlayerRecordResponse {
|
||||
max_record: {
|
||||
skill: KITEM<'s32'>,
|
||||
all_skill: KITEM<'s32'>,
|
||||
clear_diff: KITEM<'s32'>,
|
||||
full_diff: KITEM<'s32'>,
|
||||
exce_diff: KITEM<'s32'>,
|
||||
clear_music_num: KITEM<'s32'>,
|
||||
full_music_num: KITEM<'s32'>,
|
||||
exce_music_num: KITEM<'s32'>,
|
||||
clear_seq_num: KITEM<'s32'>,
|
||||
classic_all_skill: KITEM<'s32'>
|
||||
},
|
||||
diff_record: {
|
||||
diff_100_nr: KITEM<'s32'>,
|
||||
diff_150_nr: KITEM<'s32'>,
|
||||
diff_200_nr: KITEM<'s32'>,
|
||||
diff_250_nr: KITEM<'s32'>,
|
||||
diff_300_nr: KITEM<'s32'>,
|
||||
diff_350_nr: KITEM<'s32'>,
|
||||
diff_400_nr: KITEM<'s32'>,
|
||||
diff_450_nr: KITEM<'s32'>,
|
||||
diff_500_nr: KITEM<'s32'>,
|
||||
diff_550_nr: KITEM<'s32'>,
|
||||
diff_600_nr: KITEM<'s32'>,
|
||||
diff_650_nr: KITEM<'s32'>,
|
||||
diff_700_nr: KITEM<'s32'>,
|
||||
diff_750_nr: KITEM<'s32'>,
|
||||
diff_800_nr: KITEM<'s32'>,
|
||||
diff_850_nr: KITEM<'s32'>,
|
||||
diff_900_nr: KITEM<'s32'>,
|
||||
diff_950_nr: KITEM<'s32'>,
|
||||
diff_100_clear: KARRAY<'s32'>
|
||||
diff_150_clear: KARRAY<'s32'>
|
||||
diff_200_clear: KARRAY<'s32'>
|
||||
diff_250_clear: KARRAY<'s32'>
|
||||
diff_300_clear: KARRAY<'s32'>
|
||||
diff_350_clear: KARRAY<'s32'>
|
||||
diff_400_clear: KARRAY<'s32'>
|
||||
diff_450_clear: KARRAY<'s32'>
|
||||
diff_500_clear: KARRAY<'s32'>
|
||||
diff_550_clear: KARRAY<'s32'>
|
||||
diff_600_clear: KARRAY<'s32'>
|
||||
diff_650_clear: KARRAY<'s32'>
|
||||
diff_700_clear: KARRAY<'s32'>
|
||||
diff_750_clear: KARRAY<'s32'>
|
||||
diff_800_clear: KARRAY<'s32'>
|
||||
diff_850_clear: KARRAY<'s32'>
|
||||
diff_900_clear: KARRAY<'s32'>
|
||||
diff_950_clear: KARRAY<'s32'>
|
||||
}
|
||||
}
|
||||
|
||||
export function getPlayerRecordResponse(profile: Profile, rec: Record) : PlayerRecordResponse {
|
||||
return {
|
||||
max_record: {
|
||||
skill: K.ITEM('s32', profile.max_skill),
|
||||
all_skill: K.ITEM('s32', profile.max_all_skill),
|
||||
clear_diff: K.ITEM('s32', profile.clear_diff),
|
||||
full_diff: K.ITEM('s32', profile.full_diff),
|
||||
exce_diff: K.ITEM('s32', profile.exce_diff),
|
||||
clear_music_num: K.ITEM('s32', profile.clear_music_num),
|
||||
full_music_num: K.ITEM('s32', profile.full_music_num),
|
||||
exce_music_num: K.ITEM('s32', profile.exce_music_num),
|
||||
clear_seq_num: K.ITEM('s32', profile.clear_seq_num),
|
||||
classic_all_skill: K.ITEM('s32', profile.classic_all_skill),
|
||||
},
|
||||
diff_record: {
|
||||
diff_100_nr: K.ITEM('s32', rec.diff_100_nr),
|
||||
diff_150_nr: K.ITEM('s32', rec.diff_150_nr),
|
||||
diff_200_nr: K.ITEM('s32', rec.diff_200_nr),
|
||||
diff_250_nr: K.ITEM('s32', rec.diff_250_nr),
|
||||
diff_300_nr: K.ITEM('s32', rec.diff_300_nr),
|
||||
diff_350_nr: K.ITEM('s32', rec.diff_350_nr),
|
||||
diff_400_nr: K.ITEM('s32', rec.diff_400_nr),
|
||||
diff_450_nr: K.ITEM('s32', rec.diff_450_nr),
|
||||
diff_500_nr: K.ITEM('s32', rec.diff_500_nr),
|
||||
diff_550_nr: K.ITEM('s32', rec.diff_550_nr),
|
||||
diff_600_nr: K.ITEM('s32', rec.diff_600_nr),
|
||||
diff_650_nr: K.ITEM('s32', rec.diff_650_nr),
|
||||
diff_700_nr: K.ITEM('s32', rec.diff_700_nr),
|
||||
diff_750_nr: K.ITEM('s32', rec.diff_750_nr),
|
||||
diff_800_nr: K.ITEM('s32', rec.diff_800_nr),
|
||||
diff_850_nr: K.ITEM('s32', rec.diff_850_nr),
|
||||
diff_900_nr: K.ITEM('s32', rec.diff_900_nr),
|
||||
diff_950_nr: K.ITEM('s32', rec.diff_950_nr),
|
||||
diff_100_clear: K.ARRAY('s32', rec.diff_100_clear),
|
||||
diff_150_clear: K.ARRAY('s32', rec.diff_150_clear),
|
||||
diff_200_clear: K.ARRAY('s32', rec.diff_200_clear),
|
||||
diff_250_clear: K.ARRAY('s32', rec.diff_250_clear),
|
||||
diff_300_clear: K.ARRAY('s32', rec.diff_300_clear),
|
||||
diff_350_clear: K.ARRAY('s32', rec.diff_350_clear),
|
||||
diff_400_clear: K.ARRAY('s32', rec.diff_400_clear),
|
||||
diff_450_clear: K.ARRAY('s32', rec.diff_450_clear),
|
||||
diff_500_clear: K.ARRAY('s32', rec.diff_500_clear),
|
||||
diff_550_clear: K.ARRAY('s32', rec.diff_550_clear),
|
||||
diff_600_clear: K.ARRAY('s32', rec.diff_600_clear),
|
||||
diff_650_clear: K.ARRAY('s32', rec.diff_650_clear),
|
||||
diff_700_clear: K.ARRAY('s32', rec.diff_700_clear),
|
||||
diff_750_clear: K.ARRAY('s32', rec.diff_750_clear),
|
||||
diff_800_clear: K.ARRAY('s32', rec.diff_800_clear),
|
||||
diff_850_clear: K.ARRAY('s32', rec.diff_850_clear),
|
||||
diff_900_clear: K.ARRAY('s32', rec.diff_900_clear),
|
||||
diff_950_clear: K.ARRAY('s32', rec.diff_950_clear),
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
export interface PlayerStickerResponse {
|
||||
id: KITEM<'s32'>,
|
||||
pos_x: KITEM<'float'> ,
|
||||
pos_y: KITEM<'float'>,
|
||||
scale_x: KITEM<'float'> ,
|
||||
scale_y: KITEM<'float'>,
|
||||
rotate: KITEM<'float'>
|
||||
}
|
||||
|
||||
export function getPlayerStickerResponse(playerCard : any[]) : PlayerStickerResponse[] {
|
||||
let stickers : PlayerStickerResponse[] = []
|
||||
if (!_.isArray(playerCard)) {
|
||||
return stickers
|
||||
}
|
||||
|
||||
for (const item of playerCard) {
|
||||
const id = _.get(item, 'id');
|
||||
const posX = _.get(item, 'position.0');
|
||||
const posY = _.get(item, 'position.1');
|
||||
const scaleX = _.get(item, 'scale.0');
|
||||
const scaleY = _.get(item, 'scale.1');
|
||||
const rotation = _.get(item, 'rotation');
|
||||
|
||||
if (
|
||||
!isFinite(id) ||
|
||||
!isFinite(posX) ||
|
||||
!isFinite(posY) ||
|
||||
!isFinite(scaleX) ||
|
||||
!isFinite(scaleY) ||
|
||||
!isFinite(rotation)
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
|
||||
stickers.push({
|
||||
id: K.ITEM('s32', id),
|
||||
pos_x: K.ITEM('float', posX),
|
||||
pos_y: K.ITEM('float', posY),
|
||||
scale_x: K.ITEM('float', scaleX),
|
||||
scale_y: K.ITEM('float', scaleY),
|
||||
rotate: K.ITEM('float', rotation),
|
||||
});
|
||||
}
|
||||
|
||||
return stickers
|
||||
}
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
import { PlayerRanking } from "../playerranking"
|
||||
|
||||
export interface SaveProfileResponse
|
||||
{
|
||||
skill: {
|
||||
rank: KITEM<'s32'>,
|
||||
total_nr: KITEM<'s32'>
|
||||
}
|
||||
all_skill: {
|
||||
rank: KITEM<'s32'>,
|
||||
total_nr: KITEM<'s32'>
|
||||
}
|
||||
kac2018: {
|
||||
data: {
|
||||
term: KITEM<'s32'>,
|
||||
total_score: KITEM<'s32'>,
|
||||
score: KARRAY<'s32'>,
|
||||
music_type: KARRAY<'s32'>,
|
||||
play_count: KARRAY<'s32'>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export function getSaveProfileResponse(playerNo: number, ranking : PlayerRanking)
|
||||
{
|
||||
const result : SaveProfileResponse = K.ATTR({ no: `${playerNo}` }, {
|
||||
skill: { rank: K.ITEM('s32', ranking.skill), total_nr: K.ITEM('s32', ranking.totalPlayers) },
|
||||
all_skill: { rank: K.ITEM('s32', ranking.all_skill), total_nr: K.ITEM('s32', ranking.totalPlayers) },
|
||||
kac2018: {
|
||||
data: {
|
||||
term: K.ITEM('s32', 0),
|
||||
total_score: K.ITEM('s32', 0),
|
||||
score: K.ARRAY('s32', [0, 0, 0, 0, 0, 0]),
|
||||
music_type: K.ARRAY('s32', [0, 0, 0, 0, 0, 0]),
|
||||
play_count: K.ARRAY('s32', [0, 0, 0, 0, 0, 0]),
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
return result
|
||||
}
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
import { Profile } from "../profile";
|
||||
|
||||
export interface SecretMusicResponse {
|
||||
musicid: KITEM<'s32'>;
|
||||
seq: KITEM<'u16'>;
|
||||
kind: KITEM<'s32'>;
|
||||
}
|
||||
|
||||
export function getSecretMusicResponse(profile: Profile) : SecretMusicResponse[] {
|
||||
let response : SecretMusicResponse[] = []
|
||||
|
||||
if (!profile.secretmusic?.music ) {
|
||||
return response
|
||||
}
|
||||
|
||||
for (let music of profile.secretmusic.music) {
|
||||
response.push({
|
||||
musicid: K.ITEM('s32', music.musicid),
|
||||
seq: K.ITEM('u16', music.seq),
|
||||
kind: K.ITEM('s32', music.kind)
|
||||
})
|
||||
}
|
||||
|
||||
return response
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
export interface CommonMusicDataField {
|
||||
id: KITEM<"s32">;
|
||||
cont_gf: KITEM<"bool">;
|
||||
cont_dm: KITEM<"bool">;
|
||||
is_secret: KITEM<"bool">;
|
||||
is_hot: KITEM<"bool">;
|
||||
data_ver: KITEM<"s32">;
|
||||
diff: KARRAY<"u16">;
|
||||
seq_release_state: KITEM<"s32">;
|
||||
}
|
||||
|
||||
export interface CommonMusicData {
|
||||
music: CommonMusicDataField[]
|
||||
}
|
||||
|
|
@ -1,5 +1,3 @@
|
|||
import { PLUGIN_VER } from "../const";
|
||||
|
||||
export interface Extra {
|
||||
collection: 'extra';
|
||||
|
||||
|
|
@ -13,29 +11,4 @@ export interface Extra {
|
|||
list_1: number[];
|
||||
list_2: number[];
|
||||
list_3: number[];
|
||||
recommend_musicid_list: number[];
|
||||
reward_status: number[];
|
||||
}
|
||||
|
||||
export function getDefaultExtra(game: 'gf' | 'dm', version: string, id: number) : Extra {
|
||||
const result : Extra = {
|
||||
collection: 'extra',
|
||||
pluginVer: PLUGIN_VER,
|
||||
|
||||
game,
|
||||
version,
|
||||
id,
|
||||
playstyle: Array(50).fill(0),
|
||||
custom: Array(50).fill(0),
|
||||
list_1: Array(100).fill(-1),
|
||||
list_2: Array(100).fill(-1),
|
||||
list_3: Array(100).fill(-1),
|
||||
recommend_musicid_list: Array(5).fill(-1),
|
||||
reward_status: Array(50).fill(0),
|
||||
}
|
||||
result.playstyle[1] = 1 // Note scroll speed (should default to 1.0x)
|
||||
result.playstyle[36] = 20 // Target Timing Adjustment
|
||||
result.playstyle[48] = 20 // Note Display Adjustment
|
||||
|
||||
return result
|
||||
}
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
export interface FavoriteMusic {
|
||||
collection: 'favoritemusic',
|
||||
|
||||
pluginVer: number;
|
||||
list_1: number[];
|
||||
list_2: number[];
|
||||
list_3: number[];
|
||||
recommend_musicid_list: number[];
|
||||
|
||||
}
|
||||
|
|
@ -1,9 +1,7 @@
|
|||
import { PLUGIN_VER } from "../const";
|
||||
|
||||
export interface PlayerInfo {
|
||||
collection: 'playerinfo',
|
||||
|
||||
pluginVer: number;
|
||||
pluginVer: Number;
|
||||
|
||||
id: number;
|
||||
version: string,
|
||||
|
|
@ -18,15 +16,4 @@ export interface PlayerInfo {
|
|||
}[];
|
||||
|
||||
// TODO: Add Board things.
|
||||
}
|
||||
|
||||
export function getDefaultPlayerInfo(version: string, id: number) : PlayerInfo {
|
||||
return {
|
||||
collection: 'playerinfo',
|
||||
pluginVer: PLUGIN_VER,
|
||||
id,
|
||||
version,
|
||||
name: 'ASPHYXIA-CORE USER',
|
||||
title: 'Please edit on WebUI',
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
export interface PlayerRanking
|
||||
{
|
||||
refid: string;
|
||||
skill: number;
|
||||
all_skill: number;
|
||||
totalPlayers: number;
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
export interface PlayerStickerResponse {
|
||||
id: KITEM<'s32'>,
|
||||
pos_x: KITEM<'float'> ,
|
||||
pos_y: KITEM<'float'>,
|
||||
scale_x: KITEM<'float'> ,
|
||||
scale_y: KITEM<'float'>,
|
||||
rotate: KITEM<'float'>
|
||||
}
|
||||
|
|
@ -1,6 +1,3 @@
|
|||
import { PLUGIN_VER } from "../const";
|
||||
import { SecretMusicEntry } from "./secretmusicentry";
|
||||
|
||||
export interface Profile {
|
||||
collection: 'profile';
|
||||
|
||||
|
|
@ -57,70 +54,4 @@ export interface Profile {
|
|||
exce_music_num: number;
|
||||
clear_seq_num: number;
|
||||
classic_all_skill: number;
|
||||
secretmusic: {
|
||||
music: SecretMusicEntry[];
|
||||
}
|
||||
}
|
||||
|
||||
export function getDefaultProfile (game: 'gf' | 'dm', version: string, id: number): Profile {
|
||||
return {
|
||||
collection: 'profile',
|
||||
pluginVer: PLUGIN_VER,
|
||||
|
||||
game,
|
||||
version,
|
||||
id,
|
||||
|
||||
play: 0,
|
||||
playtime: 0,
|
||||
playterm: 0,
|
||||
session_cnt: 0,
|
||||
extra_stage: 0,
|
||||
extra_play: 0,
|
||||
extra_clear: 0,
|
||||
encore_play: 0,
|
||||
encore_clear: 0,
|
||||
pencore_play: 0,
|
||||
pencore_clear: 0,
|
||||
max_clear_diff: 0,
|
||||
max_full_diff: 0,
|
||||
max_exce_diff: 0,
|
||||
clear_num: 0,
|
||||
full_num: 0,
|
||||
exce_num: 0,
|
||||
no_num: 0,
|
||||
e_num: 0,
|
||||
d_num: 0,
|
||||
c_num: 0,
|
||||
b_num: 0,
|
||||
a_num: 0,
|
||||
s_num: 0,
|
||||
ss_num: 0,
|
||||
last_category: 0,
|
||||
last_musicid: -1,
|
||||
last_seq: 0,
|
||||
disp_level: 0,
|
||||
progress: 0,
|
||||
disp_state: 0,
|
||||
skill: 0,
|
||||
all_skill: 0,
|
||||
extra_gauge: 0,
|
||||
encore_gauge: 0,
|
||||
encore_cnt: 0,
|
||||
encore_success: 0,
|
||||
unlock_point: 0,
|
||||
max_skill: 0,
|
||||
max_all_skill: 0,
|
||||
clear_diff: 0,
|
||||
full_diff: 0,
|
||||
exce_diff: 0,
|
||||
clear_music_num: 0,
|
||||
full_music_num: 0,
|
||||
exce_music_num: 0,
|
||||
clear_seq_num: 0,
|
||||
classic_all_skill: 0,
|
||||
secretmusic: {
|
||||
music: []
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
@ -1,5 +1,3 @@
|
|||
import { PLUGIN_VER } from "../const";
|
||||
|
||||
export interface Record {
|
||||
collection: 'record';
|
||||
|
||||
|
|
@ -43,50 +41,4 @@ export interface Record {
|
|||
diff_850_clear: number[];
|
||||
diff_900_clear: number[];
|
||||
diff_950_clear: number[];
|
||||
}
|
||||
|
||||
export function getDefaultRecord(game: 'gf' | 'dm', version: string): Record {
|
||||
return {
|
||||
collection: 'record',
|
||||
pluginVer: PLUGIN_VER,
|
||||
game,
|
||||
version,
|
||||
|
||||
diff_100_nr: 0,
|
||||
diff_150_nr: 0,
|
||||
diff_200_nr: 0,
|
||||
diff_250_nr: 0,
|
||||
diff_300_nr: 0,
|
||||
diff_350_nr: 0,
|
||||
diff_400_nr: 0,
|
||||
diff_450_nr: 0,
|
||||
diff_500_nr: 0,
|
||||
diff_550_nr: 0,
|
||||
diff_600_nr: 0,
|
||||
diff_650_nr: 0,
|
||||
diff_700_nr: 0,
|
||||
diff_750_nr: 0,
|
||||
diff_800_nr: 0,
|
||||
diff_850_nr: 0,
|
||||
diff_900_nr: 0,
|
||||
diff_950_nr: 0,
|
||||
diff_100_clear: [0, 0, 0, 0, 0, 0, 0],
|
||||
diff_150_clear: [0, 0, 0, 0, 0, 0, 0],
|
||||
diff_200_clear: [0, 0, 0, 0, 0, 0, 0],
|
||||
diff_250_clear: [0, 0, 0, 0, 0, 0, 0],
|
||||
diff_300_clear: [0, 0, 0, 0, 0, 0, 0],
|
||||
diff_350_clear: [0, 0, 0, 0, 0, 0, 0],
|
||||
diff_400_clear: [0, 0, 0, 0, 0, 0, 0],
|
||||
diff_450_clear: [0, 0, 0, 0, 0, 0, 0],
|
||||
diff_500_clear: [0, 0, 0, 0, 0, 0, 0],
|
||||
diff_550_clear: [0, 0, 0, 0, 0, 0, 0],
|
||||
diff_600_clear: [0, 0, 0, 0, 0, 0, 0],
|
||||
diff_650_clear: [0, 0, 0, 0, 0, 0, 0],
|
||||
diff_700_clear: [0, 0, 0, 0, 0, 0, 0],
|
||||
diff_750_clear: [0, 0, 0, 0, 0, 0, 0],
|
||||
diff_800_clear: [0, 0, 0, 0, 0, 0, 0],
|
||||
diff_850_clear: [0, 0, 0, 0, 0, 0, 0],
|
||||
diff_900_clear: [0, 0, 0, 0, 0, 0, 0],
|
||||
diff_950_clear: [0, 0, 0, 0, 0, 0, 0],
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,10 +1,8 @@
|
|||
import { PLUGIN_VER } from "../const";
|
||||
|
||||
export interface Scores {
|
||||
collection: 'scores';
|
||||
|
||||
game: 'gf' | 'dm';
|
||||
version?: string;
|
||||
version: string;
|
||||
pluginVer: number
|
||||
|
||||
scores: {
|
||||
|
|
@ -24,13 +22,3 @@ export interface Scores {
|
|||
};
|
||||
};
|
||||
}
|
||||
|
||||
export function getDefaultScores (game: 'gf' | 'dm', version: string): Scores {
|
||||
return {
|
||||
collection: 'scores',
|
||||
version,
|
||||
pluginVer: PLUGIN_VER,
|
||||
game,
|
||||
scores: {}
|
||||
}
|
||||
};
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
export interface SecretMusicEntry {
|
||||
musicid: number;
|
||||
seq: number;
|
||||
kind: number;
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
export interface SecretMusicResponse {
|
||||
musicid: KITEM<'s32'>;
|
||||
seq: KITEM<'u16'>;
|
||||
kind: KITEM<'s32'>;
|
||||
}
|
||||
19
gitadora@asphyxia/utils.ts
Normal file
19
gitadora@asphyxia/utils.ts
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
export const isGF = (info: EamuseInfo) => {
|
||||
return info.model.split(':')[2] == 'A';
|
||||
};
|
||||
|
||||
export const isDM = (info: EamuseInfo) => {
|
||||
return info.model.split(':')[2] == 'B';
|
||||
};
|
||||
|
||||
export const getVersion = (info: EamuseInfo) => {
|
||||
const moduleName: string = info.module;
|
||||
return moduleName.match(/([^_]*)_(.*)/)[1];
|
||||
};
|
||||
|
||||
export function isRequiredVersion(major: number, minor: number) {
|
||||
// version value exposed since Core v1.19
|
||||
const core_major = typeof CORE_VERSION_MAJOR === "number" ? CORE_VERSION_MAJOR : 1
|
||||
const core_minor = typeof CORE_VERSION_MINOR === "number" ? CORE_VERSION_MINOR : 18
|
||||
return core_major >= major && core_minor >= minor
|
||||
}
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
export const isGF = (info: EamuseInfo) => {
|
||||
return info.model.split(':')[2] == 'A';
|
||||
};
|
||||
|
||||
export const isDM = (info: EamuseInfo) => {
|
||||
return info.model.split(':')[2] == 'B';
|
||||
};
|
||||
|
||||
export const getVersion = (info: EamuseInfo) => {
|
||||
const moduleName: string = info.module;
|
||||
const moduleMatch = moduleName.match(/([^_]*)_(.*)/);
|
||||
|
||||
if (moduleMatch && moduleMatch[1]) {
|
||||
return moduleMatch[1];
|
||||
}
|
||||
|
||||
console.error(`Unable to parse version from module name "${moduleName}".`);
|
||||
return "unknown";
|
||||
};
|
||||
|
||||
export function isRequiredCoreVersion(major: number, minor: number) {
|
||||
// version value exposed since Core v1.19
|
||||
const core_major = typeof CORE_VERSION_MAJOR === "number" ? CORE_VERSION_MAJOR : 1
|
||||
const core_minor = typeof CORE_VERSION_MINOR === "number" ? CORE_VERSION_MINOR : 18
|
||||
return core_major > major || (core_major === major && core_minor >= minor)
|
||||
};
|
||||
|
||||
export function isAsphyxiaDebugMode() : boolean {
|
||||
const argv = (globalThis as { process?: { argv?: string[] } }).process?.argv ?? [];
|
||||
return argv.includes("--dev") || argv.includes("--console");
|
||||
}
|
||||
|
||||
export function isSharedFavoriteMusicEnabled() : boolean{
|
||||
return Boolean(U.GetConfig("shared_favorite_songs"))
|
||||
}
|
||||
|
||||
export function isSharedSongScoresEnabled() : boolean{
|
||||
return Boolean(U.GetConfig("shared_song_scores"))
|
||||
}
|
||||
|
|
@ -1,57 +0,0 @@
|
|||
import { isAsphyxiaDebugMode } from ".";
|
||||
|
||||
export default class Logger {
|
||||
public category: string | null;
|
||||
|
||||
public constructor(category?: string) {
|
||||
this.category = (category == null) ? null : `[${category}]`
|
||||
}
|
||||
|
||||
public error(...args: any[]) {
|
||||
this.argsHandler(console.error, ...args)
|
||||
}
|
||||
|
||||
public debugError(...args: any[]) {
|
||||
if (isAsphyxiaDebugMode()) {
|
||||
this.argsHandler(console.error, ...args)
|
||||
}
|
||||
}
|
||||
|
||||
public warn(...args: any[]) {
|
||||
this.argsHandler(console.warn, ...args)
|
||||
}
|
||||
|
||||
public debugWarn(...args: any[]) {
|
||||
if (isAsphyxiaDebugMode()) {
|
||||
this.argsHandler(console.warn, ...args)
|
||||
}
|
||||
}
|
||||
|
||||
public info(...args: any[]) {
|
||||
this.argsHandler(console.info, ...args)
|
||||
}
|
||||
|
||||
public debugInfo(...args: any[]) {
|
||||
if (isAsphyxiaDebugMode()) {
|
||||
this.argsHandler(console.info, ...args)
|
||||
}
|
||||
}
|
||||
|
||||
public log(...args: any[]) {
|
||||
this.argsHandler(console.log, ...args)
|
||||
}
|
||||
|
||||
public debugLog(...args: any[]) {
|
||||
if (isAsphyxiaDebugMode()) {
|
||||
this.argsHandler(console.log, ...args)
|
||||
}
|
||||
}
|
||||
|
||||
private argsHandler(target: Function, ...args: any[]) {
|
||||
if (this.category == null) {
|
||||
target(...args)
|
||||
} else {
|
||||
target(this.category, ...args)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,107 +0,0 @@
|
|||
//DATA//
|
||||
infos: DB.Find(null, { collection: 'playerinfo' })
|
||||
profiles: DB.Find(null, { collection: 'profile' })
|
||||
-
|
||||
|
||||
-
|
||||
function getFullGameName(shortName) {
|
||||
switch (shortName) {
|
||||
case "dm" :
|
||||
return "DrumMania"
|
||||
case "gf":
|
||||
return "GuitarFreaks"
|
||||
default:
|
||||
return "Unknown"
|
||||
}
|
||||
}
|
||||
|
||||
function getFullGameVersion(shortVer) {
|
||||
switch (shortVer) {
|
||||
case "re" :
|
||||
return "Tri-Boost Re:EVOLVE"
|
||||
case "matixx":
|
||||
return "Matixx"
|
||||
case "EXCHAIN":
|
||||
return "exchain"
|
||||
case "nextage":
|
||||
return "NEX+AGE"
|
||||
case "highvoltage":
|
||||
return "HIGH-VOLTAGE"
|
||||
case "fuzzup":
|
||||
return "FUZZ-UP"
|
||||
case "galaxywave":
|
||||
return "GALAXY WAVE"
|
||||
case "galaxywave_delta":
|
||||
return "GALAXY WAVE DELTA"
|
||||
default:
|
||||
return "Unknown"
|
||||
}
|
||||
}
|
||||
|
||||
const versions = ["re", "matixx", "exchain", "nextage", "highvoltage", "fuzzup", "galaxywave", "galaxywave_delta"]
|
||||
const games = ["gf", "dm"]
|
||||
|
||||
function generateLeaderboards(infos, profiles) {
|
||||
let result = []
|
||||
|
||||
for (const version of versions) {
|
||||
for (const game of games) {
|
||||
result.push(generateLeaderboard(infos, profiles, version, game))
|
||||
}
|
||||
}
|
||||
|
||||
// Hide versions and games with no entries
|
||||
result = result.filter((e) => e.entries.length > 0)
|
||||
return result
|
||||
}
|
||||
|
||||
function generateLeaderboard(infos, profiles, version, game) {
|
||||
let entries = []
|
||||
let idx = 1
|
||||
let currentProfiles = profiles.filter((e) => e.game === game && e.version === version)
|
||||
currentProfiles = currentProfiles.sort((a, b) => b.skill - a.skill)
|
||||
|
||||
for (const profile of currentProfiles) {
|
||||
const info = infos.find(i => i.__refid === profile.__refid)
|
||||
const name = info ? info.name : "Unknown"
|
||||
const scoreData = {
|
||||
rank: idx,
|
||||
name: name,
|
||||
skill: profile.skill / 100,
|
||||
all_skill: profile.all_skill / 100,
|
||||
clear_music_num : profile.clear_music_num,
|
||||
clear_diff: profile.clear_diff / 100
|
||||
}
|
||||
entries.push(scoreData)
|
||||
idx++
|
||||
}
|
||||
|
||||
let result = {
|
||||
version: version,
|
||||
game: game,
|
||||
entries: entries
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
-
|
||||
|
||||
each board in generateLeaderboards(infos, profiles)
|
||||
h3 #{getFullGameName(board.game)} #{getFullGameVersion(board.version)}
|
||||
table
|
||||
tr
|
||||
th Rank
|
||||
th Name
|
||||
th Skill
|
||||
th All Skill
|
||||
th Songs Cleared
|
||||
th Hardest Clear
|
||||
each e in board.entries
|
||||
tr
|
||||
td #{e.rank}
|
||||
td #{e.name}
|
||||
td #{e.skill}
|
||||
td #{e.all_skill}
|
||||
td #{e.clear_music_num}
|
||||
td #{e.clear_diff}
|
||||
|
||||
|
|
@ -1,42 +1,6 @@
|
|||
//DATA//
|
||||
info: DB.Find(refid, { collection: 'playerinfo' })
|
||||
profile: DB.Find(refid, { collection: 'profile' })
|
||||
-
|
||||
|
||||
-
|
||||
function getFullGameName(shortName) {
|
||||
switch (shortName) {
|
||||
case "gf":
|
||||
return "GuitarFreaks"
|
||||
case "dm" :
|
||||
return "DrumMania"
|
||||
default:
|
||||
return "Unknown"
|
||||
}
|
||||
}
|
||||
|
||||
function getFullGameVersion(shortVer) {
|
||||
switch (shortVer) {
|
||||
case "re" :
|
||||
return "Tri-Boost Re:EVOLVE"
|
||||
case "matixx":
|
||||
return "Matixx"
|
||||
case "EXCHAIN":
|
||||
return "exchain"
|
||||
case "nextage":
|
||||
return "NEX+AGE"
|
||||
case "highvoltage":
|
||||
return "HIGH-VOLTAGE"
|
||||
case "fuzzup":
|
||||
return "FUZZ-UP"
|
||||
case "galaxywave":
|
||||
return "GALAXY WAVE"
|
||||
case "galaxywave_delta":
|
||||
return "GALAXY WAVE DELTA"
|
||||
default:
|
||||
return "Unknown"
|
||||
}
|
||||
}
|
||||
-
|
||||
|
||||
div
|
||||
|
|
@ -46,7 +10,7 @@ div
|
|||
p.card-header-title
|
||||
span.icon
|
||||
i.mdi.mdi-account-edit
|
||||
| User Detail (#{getFullGameVersion(i.version)})
|
||||
| User Detail (#{i.version})
|
||||
.card-content
|
||||
form(method="post" action="/emit/updatePlayerInfo")
|
||||
.field
|
||||
|
|
@ -69,51 +33,4 @@ div
|
|||
button.button.is-primary(type="submit")
|
||||
span.icon
|
||||
i.mdi.mdi-check
|
||||
span Submit
|
||||
|
||||
div
|
||||
each pr in profile
|
||||
.card
|
||||
.card-header
|
||||
p.card-header-title
|
||||
span.icon
|
||||
i.mdi.mdi-account-details
|
||||
| Profile Detail (#{getFullGameName(pr.game)} #{getFullGameVersion(pr.version)})
|
||||
.card-content
|
||||
form(method="post")
|
||||
.field
|
||||
label.label Skill
|
||||
.control
|
||||
input.input(type="text" name="skill", value=(pr.skill/100) readonly)
|
||||
.field
|
||||
label.label Skill (All Songs)
|
||||
.control
|
||||
input.input(type="text" name="all_skill", value=(pr.all_skill/100) readonly)
|
||||
.field
|
||||
label.label Songs Cleared
|
||||
.control
|
||||
input.input(type="text" name="clear_num", value=pr.clear_num readonly)
|
||||
.field
|
||||
label.label Full Combos
|
||||
.control
|
||||
input.input(type="text" name="full_num", value=pr.full_num readonly)
|
||||
.field
|
||||
label.label Excellent Full Combos
|
||||
.control
|
||||
input.input(type="text" name="exce_num", value=pr.exce_num readonly)
|
||||
.field
|
||||
label.label Highest Difficulty Cleared
|
||||
.control
|
||||
input.input(type="text" name="max_clear_diff", value=(pr.max_clear_diff/100) readonly)
|
||||
.field
|
||||
label.label Highest Difficulty Full Combo
|
||||
.control
|
||||
input.input(type="text" name="max_full_diff", value=(pr.max_full_diff/100) readonly)
|
||||
.field
|
||||
label.label Highest Difficulty Excellent Full Combo
|
||||
.control
|
||||
input.input(type="text" name="max_exce_diff", value=(pr.max_exce_diff/100) readonly)
|
||||
.field
|
||||
label.label Sessions
|
||||
.control
|
||||
input.input(type="text" name="session_cnt", value=pr.session_cnt readonly)
|
||||
span Submit
|
||||
|
|
@ -1,170 +0,0 @@
|
|||
# beatmaniaIIDX
|
||||
|
||||
Plugin Version: **v0.1.17**
|
||||
|
||||
---
|
||||
|
||||
Supported Versions
|
||||
- beatmaniaIIDX 14 GOLD (2007072301)
|
||||
- beatmaniaIIDX 15 DJ TROOPERS (2008031100)
|
||||
- beatmaniaIIDX 16 EMPRESS (2009072200)
|
||||
- beatmaniaIIDX 17 SIRIUS (2010071200)
|
||||
- beatmaniaIIDX 18 Resort Anthem (2011071200)
|
||||
- beatmaniaIIDX 19 Lincle (2012090300)
|
||||
- beatmaniaIIDX 20 tricoro (2013090900)
|
||||
- beatmaniaIIDX 21 SPADA (2014071600)
|
||||
- beatmaniaIIDX 22 PENDUAL (2015080500)
|
||||
- beatmaniaIIDX 23 copula (2016083100)
|
||||
- beatmaniaIIDX 24 SINOBUZ (2017082800)
|
||||
- beatmaniaIIDX 25 CANNON BALLERS (2018091900)
|
||||
- beatmaniaIIDX 26 Rootage (2019090200)
|
||||
- beatmaniaIIDX 27 HEROIC VERSE (2020092900)
|
||||
- beatmaniaIIDX 28 BISTROVER (2021091500)
|
||||
- beatmaniaIIDX 29 CastHour (2022082400)
|
||||
- beatmaniaIIDX 30 RESIDENT (2023090500)
|
||||
- beatmaniaIIDX 31 EPOLIS (2024082600)
|
||||
- beatmaniaIIDX 32 Pinky Crush (2025082500)
|
||||
|
||||
---
|
||||
|
||||
Features
|
||||
- STEP UP (Partial)
|
||||
- SKILL ANALYZER
|
||||
- EVENT (Partial)
|
||||
- ARENA (LOCAL only)
|
||||
- RANDOME LANE TICKET
|
||||
- FAVORITE/SONG SELECTION NOTES
|
||||
- ORIGINAL FILTER
|
||||
|
||||
---
|
||||
|
||||
Known Issues
|
||||
- Clear Lamps may display invalid lamps due to missing conversion code
|
||||
- DJ LEVEL folders are broken in ~ DJ TROOPERS due to missing rank\_id
|
||||
- LEGGENDARIA play records before HEROIC VERSE may not display on higher version due to missing conversion code
|
||||
- SUPER FUTURE 2323 play records doesn't display on other version due to missing conversion code
|
||||
- ONE MORE EXTRA STAGE progress won't save (can't test this due to skill issue)
|
||||
- Some of licensed songs are locked behind (kinda solved with music\_open but needs to be verified)
|
||||
- Some of badges aren't saving in RESIDENT ~ (needs to figure out name to id)
|
||||
|
||||
---
|
||||
|
||||
Changelogs
|
||||
|
||||
**v0.1.0**
|
||||
- Added Initial support for Lincle
|
||||
|
||||
**v0.1.1**
|
||||
- Added Initial support for HEROIC VERSE
|
||||
- Expanded score array to adapting newer difficulty (SPN ~ DPA [6] -> SPB ~ DPL [10])
|
||||
- This borked previous score datas recorded with v0.1.0
|
||||
- All score data now shared with all version
|
||||
- as it doesn't have music\_id conversion, it will display incorrect data on certain versions
|
||||
- Added Initial customize support (no webui)
|
||||
|
||||
**v0.1.2**
|
||||
- Added Initial support for BISTROVER
|
||||
- Added Initial Rival support (partial webui)
|
||||
|
||||
**v0.1.3**
|
||||
- Added Initial support for CastHour
|
||||
|
||||
**v0.1.4**
|
||||
- Added Initial support for RESIDENT
|
||||
|
||||
**v0.1.5**
|
||||
- Added Initial support for Resort Anthem
|
||||
- LEAGUE, STORY does not work yet
|
||||
- Fixed where s\_hispeed/d\_hispeed doesn't save correctly
|
||||
|
||||
**v0.1.6**
|
||||
- Added Initial support for tricoro
|
||||
- Some of event savings are broken
|
||||
- Added movie\_upload url setting on plugin setting (BISTROVER ~)
|
||||
- This uses JSON instead of XML and this requires additional setup (can't test or implement this as I don't own NVIDIA GPU)
|
||||
|
||||
**v0.1.7**
|
||||
- Added Initial support for SPADA
|
||||
- Some of event savings are broken
|
||||
- Fixed where rtype didn't save correctly (BISTROVER ~)
|
||||
|
||||
**v0.1.8**
|
||||
- Added RIVAL pacemaker support
|
||||
- Added Initial support for PENDUAL
|
||||
- Some of event savings are broken
|
||||
- Fixed where old\_linkage\_secret\_flg is missing on pc.get response (RESIDENT)
|
||||
- Fixed where game could crash due to invalid rival qprodata
|
||||
- Fixed where lift isn't saving (SPADA)
|
||||
|
||||
**v0.1.9**
|
||||
- Added Initial support for copula
|
||||
- Some of event savings are broken
|
||||
- Added shop.getconvention/shop.setconvention/shop.getname/shop.savename response
|
||||
|
||||
**v0.1.10**
|
||||
- Added Initial support for SINOBUZ ~ Rootage
|
||||
- Converted from asphyxia\_route\_public
|
||||
|
||||
**v0.1.11**
|
||||
- Added Shop Ranking support
|
||||
- Changed pc.common/gameSystem.systemInfo response not to use pugFile
|
||||
- IIDX\_CPUS on models/arena.ts came from asphyxia\_route\_public
|
||||
|
||||
**v0.1.12**
|
||||
- Exposed some of pc.common attributes to plugin settings (WIP)
|
||||
- Added Experimental WebUI (WIP)
|
||||
- Added music.crate/music.breg response
|
||||
- CLEAR RATE and BEGINNER clear lamp may not work on certain versions
|
||||
- Added Initial support for SIRIUS
|
||||
- Fixed where Venue Top didn't save correctly (BISTROVER ~)
|
||||
- Fixed where music.appoint send empty response even rival has score data but player doesn't have score data
|
||||
- Fixed where FAVORITE may work only on specific version
|
||||
- Fixed where shop name always displayed as "CORE" instead of saved one
|
||||
- Fixed where rlist STEP UP achieve value was fixed value instead of saved one
|
||||
- Fixed where fcombo isn't saving (Resort Anthem)
|
||||
- Removed shop.savename as not working as intented
|
||||
|
||||
**v0.1.13**
|
||||
- Added Initial support for DJ TROOPERS
|
||||
- Added Initial support for EMPRESS
|
||||
- Fixed where EXPERT result does not display total cleared users and ranking position
|
||||
|
||||
**v0.1.14**
|
||||
- Added Experimental OMEGA-Attack event saving support on tricoro
|
||||
- Reworked on SINOBUZ ~ Rootage responses
|
||||
- Fixed where Base64toBuffer returns invalid value sometimes
|
||||
- Fixed where timing display option isn't saving on certain versions
|
||||
|
||||
**v0.1.15**
|
||||
- Added Initial support for GOLD
|
||||
- Added Disable Beginner Option
|
||||
- Added Experimental Badge saving support
|
||||
- Added Experimental score import/export
|
||||
- Fixed where plugin may fail to register due to missing types in dev mode (invalid setup for dev, just enough to get around)
|
||||
- Fixed where unable to login after first-play (SPADA, SINOBUZ, Rootage)
|
||||
- Fixed where pacemaker isn't working as intended due to malformed ghost data on music.appoint response (~ DJ TROOPERS)
|
||||
- Fixed where pacemaker isn't working as intented due to wrong condition check (HEROIC VERSE ~)
|
||||
- Fixed where pacemaker sub-type isn't load correctly (HEROIC VERSE ~)
|
||||
- Fixed where QPRO data doesn't get saved in WebUI
|
||||
|
||||
**v0.1.16**
|
||||
- Added Initial support for EPOLIS
|
||||
- Added music\_open on gameSystem.systemInfo response
|
||||
- Added EXTRA FAVORITE support
|
||||
- Fixed where lightning settings doesn't get saved on logout
|
||||
- Fixed where Disable Music Preview, Disable HCN Color, VEFX Lock settings doesn't reflect
|
||||
- Fixed where MISS COUNT has 0 as default (including score import)
|
||||
- Fixed where MISS COUNT doesn't get updated when exscore is same
|
||||
- Fixed where lightning model settings saved incorrectly
|
||||
- Fixed where unable to import score if user has DP scores
|
||||
- Fixed where unable to achieve dan if you failed once
|
||||
- Fixed where unable to login (tricoro, CastHour, Rootage)
|
||||
- Fixed where unable to specify rival in WebUI
|
||||
- Fixed where music.arenaCPU isn't working as intended due to change of type (EPOLIS ~)
|
||||
- Fixed where qpro head equip request handle as hand equip (@anzuwork)
|
||||
- Added error message for invalid score database entries
|
||||
- Reverted `v0.1.15` dev mode related code changes (now requires proper dev setup, refer parent README.md)
|
||||
- WebUI is now display values of corresponding version
|
||||
|
||||
**v0.1.17**
|
||||
- Added Initial support for Pinky Crush
|
||||
|
|
@ -1,94 +0,0 @@
|
|||
{
|
||||
"31": {
|
||||
"0": {
|
||||
"15": {
|
||||
"music_id": [ 25090, 23068, 19004, 29045 ],
|
||||
"class_id": [ 3, 3, 3, 3 ],
|
||||
"kind": 0
|
||||
},
|
||||
"16": {
|
||||
"music_id": [ 23005, 27078, 22065, 27060 ],
|
||||
"class_id": [ 3, 3, 3, 3 ],
|
||||
"kind": 0
|
||||
},
|
||||
"17": {
|
||||
"music_id": [ 29007, 26108, 19002, 18004 ],
|
||||
"class_id": [ 3, 3, 3, 3 ],
|
||||
"kind": 0
|
||||
},
|
||||
"18": {
|
||||
"music_id": [ 25007, 18032, 16020, 12004 ],
|
||||
"class_id": [ 3, 3, 3, 3 ],
|
||||
"kind": 0
|
||||
}
|
||||
},
|
||||
"1": {
|
||||
"15": {
|
||||
"music_id": [ 15032, 29033, 27092, 30020 ],
|
||||
"class_id": [ 3, 3, 3, 3 ],
|
||||
"kind": 0
|
||||
},
|
||||
"16": {
|
||||
"music_id": [ 10028, 26070, 28091, 23075 ],
|
||||
"class_id": [ 3, 3, 3, 3 ],
|
||||
"kind": 0
|
||||
},
|
||||
"17": {
|
||||
"music_id": [ 26012, 28002, 17017, 28005 ],
|
||||
"class_id": [ 3, 3, 3, 3 ],
|
||||
"kind": 0
|
||||
},
|
||||
"18": {
|
||||
"music_id": [ 28008, 15001, 19002, 9028 ],
|
||||
"class_id": [ 3, 3, 3, 3 ],
|
||||
"kind": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"32": {
|
||||
"0": {
|
||||
"15": {
|
||||
"music_id": [ 19022, 30033, 27013, 29045 ],
|
||||
"class_id": [ 3, 3, 3, 3 ],
|
||||
"kind": 0
|
||||
},
|
||||
"16": {
|
||||
"music_id": [ 27034, 24023, 16009, 25085 ],
|
||||
"class_id": [ 3, 3, 3, 3 ],
|
||||
"kind": 0
|
||||
},
|
||||
"17": {
|
||||
"music_id": [ 26087, 19002, 29050, 30024 ],
|
||||
"class_id": [ 3, 3, 3, 3 ],
|
||||
"kind": 0
|
||||
},
|
||||
"18": {
|
||||
"music_id": [ 30052, 18032, 16020, 12004 ],
|
||||
"class_id": [ 3, 3, 3, 3 ],
|
||||
"kind": 0
|
||||
}
|
||||
},
|
||||
"1": {
|
||||
"15": {
|
||||
"music_id": [ 12002, 31063, 23046, 30020 ],
|
||||
"class_id": [ 3, 3, 3, 3 ],
|
||||
"kind": 0
|
||||
},
|
||||
"16": {
|
||||
"music_id": [ 26106, 14021, 29052, 23075 ],
|
||||
"class_id": [ 3, 3, 3, 3 ],
|
||||
"kind": 0
|
||||
},
|
||||
"17": {
|
||||
"music_id": [ 29042, 26043, 17017, 28005 ],
|
||||
"class_id": [ 3, 3, 3, 3 ],
|
||||
"kind": 0
|
||||
},
|
||||
"18": {
|
||||
"music_id": [ 25007, 29017, 19002, 9028 ],
|
||||
"class_id": [ 3, 3, 3, 3 ],
|
||||
"kind": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,82 +0,0 @@
|
|||
{
|
||||
"26": {
|
||||
"26002": { "kind": 0 },
|
||||
"26006": { "kind": 0 },
|
||||
"26022": { "kind": 0 },
|
||||
"26045": { "kind": 0 }
|
||||
},
|
||||
"27": {
|
||||
"27070": { "kind": 0 },
|
||||
"27071": { "kind": 0 },
|
||||
"27073": { "kind": 0 }
|
||||
},
|
||||
"28": {
|
||||
"28001": { "kind": 0 },
|
||||
"28036": { "kind": 0 },
|
||||
"28038": { "kind": 0 },
|
||||
"28072": { "kind": 0 },
|
||||
"28074": { "kind": 0 }
|
||||
},
|
||||
"29": {
|
||||
"29071": { "kind": 0 },
|
||||
"29072": { "kind": 0 },
|
||||
"29075": { "kind": 0 },
|
||||
"29081": { "kind": 0 },
|
||||
"29082": { "kind": 0 },
|
||||
"29085": { "kind": 0 },
|
||||
"29101": { "kind": 0 },
|
||||
"29102": { "kind": 0 },
|
||||
"29103": { "kind": 0 }
|
||||
},
|
||||
"30": {
|
||||
"30038": { "kind": 0 },
|
||||
"30082": { "kind": 0 },
|
||||
"30083": { "kind": 0 },
|
||||
"30084": { "kind": 0 },
|
||||
"30085": { "kind": 0 },
|
||||
"30101": { "kind": 0 },
|
||||
"30102": { "kind": 0 },
|
||||
"30104": { "kind": 0 },
|
||||
"30105": { "kind": 0 }
|
||||
},
|
||||
"31": {
|
||||
"31021": { "kind": 0 },
|
||||
"31022": { "kind": 0 },
|
||||
"31023": { "kind": 0 },
|
||||
"31024": { "kind": 0 },
|
||||
"31025": { "kind": 0 },
|
||||
"31065": { "kind": 0 },
|
||||
"31066": { "kind": 0 },
|
||||
"31097": { "kind": 0 },
|
||||
"31098": { "kind": 0 },
|
||||
"31099": { "kind": 0 },
|
||||
"31100": { "kind": 0 },
|
||||
"31101": { "kind": 0 },
|
||||
"31102": { "kind": 0 },
|
||||
"31110": { "kind": 0 },
|
||||
"31112": { "kind": 0 },
|
||||
"31113": { "kind": 0 }
|
||||
},
|
||||
"32": {
|
||||
"32022": { "kind": 0 },
|
||||
"32049": { "kind": 0 },
|
||||
"32078": { "kind": 0 },
|
||||
"32079": { "kind": 0 },
|
||||
"32080": { "kind": 0 },
|
||||
"32081": { "kind": 0 },
|
||||
"32082": { "kind": 0 },
|
||||
"32083": { "kind": 0 },
|
||||
"32084": { "kind": 0 },
|
||||
"32085": { "kind": 0 },
|
||||
"32096": { "kind": 0 },
|
||||
"32097": { "kind": 0 },
|
||||
"32098": { "kind": 0 },
|
||||
"32019": { "kind": 0 },
|
||||
"32101": { "kind": 0 },
|
||||
"32102": { "kind": 0 },
|
||||
"32103": { "kind": 0 },
|
||||
"32104": { "kind": 0 },
|
||||
"32110": { "kind": 0 },
|
||||
"32111": { "kind": 0 }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,177 +0,0 @@
|
|||
import { IIDX_CPUS } from "../models/arena";
|
||||
import { GetVersion } from "../util";
|
||||
|
||||
export const gssysteminfo: EPR = async (info, data, send) => {
|
||||
const version = GetVersion(info);
|
||||
if (version < 24) return send.success();
|
||||
|
||||
let result: any = {
|
||||
arena_schedule: {
|
||||
phase: K.ITEM("u8", U.GetConfig("ArenaPhase")),
|
||||
start: K.ITEM("u32", 1605784800),
|
||||
end: K.ITEM("u32", 4102326000)
|
||||
},
|
||||
arena_music_difficult: [],
|
||||
maching_class_range: [],
|
||||
arena_cpu_define: [],
|
||||
}
|
||||
|
||||
// following datas are made up needs to figure out correct way to do it //
|
||||
let music_open = JSON.parse(await IO.ReadFile("data/music_open.json", "utf-8"));
|
||||
if (!_.isNil(music_open[version])) {
|
||||
result = Object.assign(result, { music_open: [] });
|
||||
|
||||
Object.keys(music_open).forEach(v => {
|
||||
Object.keys(music_open[v]).forEach(m => {
|
||||
if (Number(v) > version) return;
|
||||
|
||||
result.music_open.push({
|
||||
music_id: K.ITEM("s32", Number(m)),
|
||||
kind: K.ITEM("s32", music_open[v][m].kind),
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
switch (version) {
|
||||
case 32:
|
||||
result.arena_schedule.phase = K.ITEM("u8", 3);
|
||||
result.arena_schedult = Object.assign(result.arena_schedule, { season: K.ITEM("u8", 0) }); // arena season for online //
|
||||
|
||||
case 31:
|
||||
result.arena_schedult = Object.assign(result.arena_schedule, { rule_type: K.ITEM("u8", 0) }); // arena rule for online //
|
||||
|
||||
result = Object.assign(result, { grade_course: [] });
|
||||
|
||||
// following datas are made up needs to figure out correct way to do it //
|
||||
let grade = JSON.parse(await IO.ReadFile("data/grade.json", "utf-8"));
|
||||
if (!_.isNil(grade[version])) {
|
||||
Object.keys(grade[version]).forEach(s => {
|
||||
Object.keys(grade[version][s]).forEach(c => {
|
||||
result.grade_course.push({
|
||||
play_style: K.ITEM("s32", Number(s)),
|
||||
grade_id: K.ITEM("s32", Number(c)),
|
||||
is_valid: K.ITEM("bool", true),
|
||||
music_id_0: K.ITEM("s32", grade[version][s][c].music_id[0]),
|
||||
class_id_0: K.ITEM("s32", grade[version][s][c].class_id[0]),
|
||||
music_id_1: K.ITEM("s32", grade[version][s][c].music_id[1]),
|
||||
class_id_1: K.ITEM("s32", grade[version][s][c].class_id[1]),
|
||||
music_id_2: K.ITEM("s32", grade[version][s][c].music_id[2]),
|
||||
class_id_2: K.ITEM("s32", grade[version][s][c].class_id[2]),
|
||||
music_id_3: K.ITEM("s32", grade[version][s][c].music_id[3]),
|
||||
class_id_3: K.ITEM("s32", grade[version][s][c].class_id[3]),
|
||||
index: K.ITEM("s32", result.grade_course.length),
|
||||
cube_num: K.ITEM("s32", 0),
|
||||
kind: K.ITEM("s32", grade[version][s][c].kind),
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// arena_music_difficult //
|
||||
for (let s = 0; s < 2; ++s) {
|
||||
for (let c = 0; c < 20; ++c) {
|
||||
result.arena_music_difficult.push({
|
||||
play_style: K.ITEM("s32", s),
|
||||
arena_class: K.ITEM("s32", c),
|
||||
low_difficult: K.ITEM("s32", 1),
|
||||
high_difficult: K.ITEM("s32", 12),
|
||||
is_leggendaria: K.ITEM("bool", 1),
|
||||
force_music_list_id: K.ITEM("s32", 0),
|
||||
});
|
||||
|
||||
result.maching_class_range.push({
|
||||
play_style: K.ITEM("s32", s),
|
||||
matching_class: K.ITEM("s32", c),
|
||||
low_arena_class: K.ITEM("s32", 1),
|
||||
high_arena_class: K.ITEM("s32", 20),
|
||||
});
|
||||
|
||||
result.arena_cpu_define.push({
|
||||
play_style: K.ITEM("s32", s),
|
||||
arena_class: K.ITEM("s32", c),
|
||||
grade_id: K.ITEM("s32", IIDX_CPUS[s][c][0]),
|
||||
low_music_difficult: K.ITEM("s32", IIDX_CPUS[s][c][1]),
|
||||
high_music_difficult: K.ITEM("s32", IIDX_CPUS[s][c][2]),
|
||||
is_leggendaria: K.ITEM("bool", IIDX_CPUS[s][c][3]),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
switch (version) {
|
||||
case 29:
|
||||
result = Object.assign(result, {
|
||||
CommonBossPhase: K.ATTR({ val: String(3) }),
|
||||
Event1InternalPhase: K.ATTR({ val: String(U.GetConfig("ch_event")) }),
|
||||
ExtraBossEventPhase: K.ATTR({ val: String(U.GetConfig("ch_extraboss")) }),
|
||||
isNewSongAnother12OpenFlg: K.ATTR({ val: String(Number(U.GetConfig("NewSongAnother12"))) }),
|
||||
gradeOpenPhase: K.ATTR({ val: String(U.GetConfig("Grade")) }),
|
||||
isEiseiOpenFlg: K.ATTR({ val: String(Number(U.GetConfig("Eisei"))) }),
|
||||
WorldTourismOpenList: K.ATTR({ val: String(-1) }),
|
||||
BPLBattleOpenPhase: K.ATTR({ val: String(2) }),
|
||||
});
|
||||
break;
|
||||
case 30:
|
||||
result = Object.assign(result, {
|
||||
CommonBossPhase: K.ATTR({ val: String(3) }),
|
||||
Event1InternalPhase: K.ATTR({ val: String(U.GetConfig("rs_event")) }),
|
||||
ExtraBossEventPhase: K.ATTR({ val: String(U.GetConfig("rs_extraboss")) }),
|
||||
isNewSongAnother12OpenFlg: K.ATTR({ val: String(Number(U.GetConfig("NewSongAnother12"))) }),
|
||||
gradeOpenPhase: K.ATTR({ val: String(U.GetConfig("Grade")) }),
|
||||
isEiseiOpenFlg: K.ATTR({ val: String(Number(U.GetConfig("Eisei"))) }),
|
||||
WorldTourismOpenList: K.ATTR({ val: String(-1) }),
|
||||
BPLBattleOpenPhase: K.ATTR({ val: String(2) }),
|
||||
})
|
||||
break;
|
||||
case 31:
|
||||
let totalMetron = 0;
|
||||
let eventData = await DB.Find(null, {
|
||||
collection: "event_1",
|
||||
version: version,
|
||||
event_data: "myepo_map",
|
||||
});
|
||||
|
||||
if (!_.isNil(eventData)) {
|
||||
eventData.forEach((res: any) => {
|
||||
totalMetron += Number(res.metron_total_get);
|
||||
});
|
||||
}
|
||||
|
||||
Object.assign(result, {
|
||||
CommonBossPhase: K.ATTR({ val: String(3) }),
|
||||
Event1Value: K.ATTR({ val: String(U.GetConfig("ep_event")) }),
|
||||
Event1Phase: K.ATTR({ val: String(U.GetConfig("ep_event1")) }),
|
||||
Event2Phase: K.ATTR({ val: String(U.GetConfig("ep_event2")) }),
|
||||
ExtraBossEventPhase: K.ATTR({ val: String(U.GetConfig("ep_extraboss")) }),
|
||||
isNewSongAnother12OpenFlg: K.ATTR({ val: String(Number(U.GetConfig("NewSongAnother12"))) }),
|
||||
isKiwamiOpenFlg: K.ATTR({ val: String(Number(U.GetConfig("Eisei"))) }),
|
||||
WorldTourismOpenList: K.ATTR({ val: String(-1) }),
|
||||
BPLBattleOpenPhase: K.ATTR({ val: String(2) }),
|
||||
UnlockLeggendaria: K.ATTR({ val: String(1) }),
|
||||
BPLSerialCodePhase: K.ATTR({ val: String(0) }),
|
||||
Event1AllPlayerTotalGetMetron: K.ATTR({ val: String(totalMetron) }), // total amount of all users metron //
|
||||
});
|
||||
break;
|
||||
case 32:
|
||||
result = Object.assign(result, {
|
||||
Event1Value: K.ATTR({ val: String(U.GetConfig("pc_event")) }), // TEST //
|
||||
Event1Phase: K.ATTR({ val: String(U.GetConfig("pc_event1")) }), // TEST //
|
||||
Event2Phase: K.ATTR({ val: String(U.GetConfig("pc_event2")) }), // TEST //
|
||||
ExtraBossEventPhase: K.ATTR({ val: String(U.GetConfig("pc_extraboss")) }), // TEST //
|
||||
isNewSongAnother12OpenFlg: K.ATTR({ val: String(Number(U.GetConfig("NewSongAnother12"))) }),
|
||||
isKiwamiOpenFlg: K.ATTR({ val: String(Number(U.GetConfig("Eisei"))) }),
|
||||
WorldTourismOpenList: K.ATTR({ val: String(-1) }),
|
||||
OldBPLBattleOpenPhase: K.ATTR({ val: String(3) }),
|
||||
});
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return send.object(result);
|
||||
};
|
||||
|
|
@ -1,208 +0,0 @@
|
|||
import { pcdata } from "../models/pcdata";
|
||||
import { grade } from "../models/grade";
|
||||
import { IDtoRef, GetVersion } from "../util";
|
||||
import { eisei_grade } from "../models/lightning";
|
||||
import { badge } from "../models/badge";
|
||||
|
||||
export const graderaised: EPR = async (info, data, send) => {
|
||||
const version = GetVersion(info);
|
||||
const iidxid = Number($(data).attr().iidxid);
|
||||
const refid = await IDtoRef(iidxid);
|
||||
const gid = Number($(data).attr().gid);
|
||||
const gtype = Number($(data).attr().gtype);
|
||||
|
||||
let cflg = Number($(data).attr().cflg);
|
||||
let achi = Number($(data).attr().achi);
|
||||
|
||||
let pcdata = await DB.FindOne<pcdata>(refid, { collection: "pcdata", version: version });
|
||||
let grade = await DB.FindOne<grade>(refid, {
|
||||
collection: "grade",
|
||||
version: version,
|
||||
style: gtype,
|
||||
gradeId: gid,
|
||||
});
|
||||
|
||||
if (version >= 23) cflg = Number($(data).attr().cstage);
|
||||
|
||||
const isTDJ = !_.isNil($(data).element("lightning_play_data")); // lightning model //
|
||||
const hasEiseiData = (!_.isNil($(data).element("eisei_data")) || !_.isNil($(data).element("eisei_grade_data")) || !_.isNil($(data).element("kiwami_data")));
|
||||
if (isTDJ && hasEiseiData) {
|
||||
let eisei_clear_type: number;
|
||||
let eisei_grade_id: number;
|
||||
let eisei_grade_type: number;
|
||||
let eisei_stage_num: number;
|
||||
let eisei_option: number;
|
||||
|
||||
let eisei_past_achievement: number[];
|
||||
let eisei_past_selected_course: number[];
|
||||
let eisei_max_past_achievement: number[];
|
||||
let eisei_max_past_selected_course: number[];
|
||||
|
||||
switch (version) {
|
||||
case 27:
|
||||
eisei_clear_type = Number($(data).attr("eisei_data").clear_type);
|
||||
eisei_grade_id = Number($(data).attr("eisei_data").grade_id);
|
||||
eisei_grade_type = Number($(data).attr("eisei_data").grade_type);
|
||||
eisei_stage_num = Number($(data).attr("eisei_data").stage_num);
|
||||
|
||||
eisei_past_achievement = $(data).element("eisei_data").numbers("past_achievement");
|
||||
eisei_max_past_achievement = $(data).element("eisei_data").numbers("max_past_achievement");
|
||||
break;
|
||||
case 30:
|
||||
eisei_clear_type = Number($(data).element("eisei_data").attr().clear_type);
|
||||
eisei_grade_id = Number($(data).element("eisei_data").attr().grade_id);
|
||||
eisei_grade_type = Number($(data).element("eisei_data").attr().grade_type);
|
||||
eisei_stage_num = Number($(data).element("eisei_data").attr().stage_num);
|
||||
eisei_option = Number($(data).element("eisei_data").attr().option);
|
||||
|
||||
eisei_past_achievement = $(data).element("eisei_data").numbers("past_achievement");
|
||||
eisei_past_selected_course = $(data).element("eisei_data").numbers("past_selected_course");
|
||||
eisei_max_past_achievement = $(data).element("eisei_data").numbers("max_past_achievement");
|
||||
eisei_max_past_selected_course = $(data).element("eisei_data").numbers("max_past_selected_course");
|
||||
break;
|
||||
case 31:
|
||||
case 32:
|
||||
eisei_clear_type = Number($(data).attr("kiwami_data").clear_type);
|
||||
eisei_grade_id = Number($(data).attr("kiwami_data").grade_id);
|
||||
eisei_grade_type = Number($(data).attr("kiwami_data").grade_type);
|
||||
eisei_stage_num = Number($(data).attr("kiwami_data").stage_num);
|
||||
eisei_option = Number($(data).attr("kiwami_data").option);
|
||||
|
||||
eisei_past_achievement = $(data).element("kiwami_data").numbers("past_achievement");
|
||||
eisei_past_selected_course = $(data).element("kiwami_data").numbers("past_selected_course");
|
||||
eisei_max_past_achievement = $(data).element("kiwami_data").numbers("max_past_achievement");
|
||||
eisei_max_past_selected_course = $(data).element("kiwami_data").numbers("max_past_selected_course");
|
||||
break;
|
||||
|
||||
default:
|
||||
eisei_clear_type = Number($(data).attr("eisei_grade_data").clear_type);
|
||||
eisei_grade_id = Number($(data).attr("eisei_grade_data").grade_id);
|
||||
eisei_grade_type = Number($(data).attr("eisei_grade_data").grade_type);
|
||||
eisei_stage_num = Number($(data).attr("eisei_grade_data").stage_num);
|
||||
|
||||
eisei_past_achievement = $(data).element("eisei_grade_data").numbers("past_achievement");
|
||||
eisei_past_selected_course = $(data).element("eisei_grade_data").numbers("past_selected_course");
|
||||
eisei_max_past_achievement = $(data).element("eisei_grade_data").numbers("max_past_achievement");
|
||||
eisei_max_past_selected_course = $(data).element("eisei_grade_data").numbers("max_past_selected_course");
|
||||
break;
|
||||
}
|
||||
|
||||
await DB.Upsert<eisei_grade>(
|
||||
refid,
|
||||
{
|
||||
collection: "eisei_grade",
|
||||
version: version,
|
||||
grade_type: eisei_grade_type,
|
||||
grade_id: eisei_grade_id,
|
||||
},
|
||||
{
|
||||
$set: {
|
||||
clear_type: eisei_clear_type,
|
||||
stage_num: eisei_stage_num,
|
||||
option: eisei_option,
|
||||
|
||||
past_achievement: eisei_past_achievement,
|
||||
past_selected_course: eisei_past_selected_course,
|
||||
max_past_achievement: eisei_max_past_achievement,
|
||||
max_past_selected_course: eisei_max_past_selected_course,
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
return send.object(
|
||||
K.ATTR({
|
||||
pnum: "1", // This isn't visible to user and seems leftover //
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
let updatePcdata = false;
|
||||
let updateGrade = false;
|
||||
if (_.isNil(pcdata)) return send.deny();
|
||||
if (_.isNil(grade)) {
|
||||
if (cflg == 4) {
|
||||
if (gtype == 0) pcdata.sgid = Math.max(gid, pcdata.sgid);
|
||||
else pcdata.dgid = Math.max(gid, pcdata.dgid);
|
||||
|
||||
updatePcdata = true;
|
||||
}
|
||||
|
||||
updateGrade = true;
|
||||
} else {
|
||||
if (cflg >= grade.maxStage || achi >= grade.archive) {
|
||||
cflg = Math.max(cflg, grade.maxStage);
|
||||
achi = Math.max(achi, grade.archive);
|
||||
|
||||
updateGrade = true;
|
||||
}
|
||||
|
||||
if (cflg == 4) {
|
||||
if (gtype == 0) pcdata.sgid = Math.max(gid, pcdata.sgid);
|
||||
else pcdata.dgid = Math.max(gid, pcdata.dgid);
|
||||
|
||||
updatePcdata = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (updatePcdata) {
|
||||
await DB.Upsert<pcdata>(
|
||||
refid,
|
||||
{
|
||||
collection: "pcdata",
|
||||
version: version,
|
||||
},
|
||||
{
|
||||
$set: pcdata
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
if (updateGrade) {
|
||||
await DB.Upsert<grade>(
|
||||
refid,
|
||||
{
|
||||
collection: "grade",
|
||||
version: version,
|
||||
style: gtype,
|
||||
gradeId: gid,
|
||||
},
|
||||
{
|
||||
$set: {
|
||||
maxStage: cflg,
|
||||
archive: achi,
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
if (!_.isNil($(data).element("badge"))) {
|
||||
await DB.Upsert<badge>(
|
||||
refid,
|
||||
{
|
||||
collection: "badge",
|
||||
version: version,
|
||||
category_name: "grade",
|
||||
flg_id: Number($(data).attr("badge").badge_flg_id),
|
||||
},
|
||||
{
|
||||
$set: {
|
||||
flg: Number($(data).attr("badge").badge_flg),
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
let gradeUser = await DB.Find<grade>(null, {
|
||||
collection: "grade",
|
||||
version: version,
|
||||
style: gtype,
|
||||
gradeId: gid,
|
||||
maxStage: 4,
|
||||
});
|
||||
|
||||
return send.object(
|
||||
K.ATTR({
|
||||
pnum: String(gradeUser.length),
|
||||
})
|
||||
);
|
||||
};
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -1,173 +0,0 @@
|
|||
import { expert, ranking } from "../models/ranking";
|
||||
import { profile } from "../models/profile";
|
||||
import { GetVersion, IDtoRef } from "../util";
|
||||
|
||||
export const rankingentry: EPR = async (info, data, send) => {
|
||||
// pside //
|
||||
const version = GetVersion(info);
|
||||
const refid = await IDtoRef(Number($(data).attr().iidxid));
|
||||
|
||||
const coid = Number($(data).attr().coid);
|
||||
const clid = Number($(data).attr().clid);
|
||||
|
||||
const opname = $(data).attr().opname;
|
||||
const oppid = Number($(data).attr().oppid);
|
||||
const pgnum = Number($(data).attr().pgnum);
|
||||
const gnum = Number($(data).attr().gnum);
|
||||
const opt = Number($(data).attr().opt);
|
||||
const opt2 = Number($(data).attr().opt2);
|
||||
const clr = Number($(data).attr().clr);
|
||||
|
||||
const exscore = (pgnum * 2 + gnum);
|
||||
const cstage = Number($(data).attr().cstage);
|
||||
|
||||
const expert_data = await DB.FindOne<expert>(refid, {
|
||||
collection: "expert",
|
||||
version: version,
|
||||
coid: coid,
|
||||
});
|
||||
|
||||
let pgArray = Array<number>(6).fill(0); // PGREAT //
|
||||
let gArray = Array<number>(6).fill(0); // GREAT //
|
||||
let cArray = Array<number>(6).fill(0); // CLEAR FLAGS //
|
||||
let optArray = Array<number>(6).fill(0); // USED OPTION (SP/DP) //
|
||||
let opt2Array = Array<number>(6).fill(0); // USED OPTION (DP) //
|
||||
let esArray = Array<number>(6).fill(0); // EXSCORE //
|
||||
if (_.isNil(expert_data)) {
|
||||
cArray[clid] = clr;
|
||||
pgArray[clid] = pgnum;
|
||||
gArray[clid] = gnum;
|
||||
optArray[clid] = opt;
|
||||
opt2Array[clid] = opt2;
|
||||
esArray[clid] = exscore;
|
||||
}
|
||||
else {
|
||||
cArray = expert_data.cArray;
|
||||
pgArray = expert_data.pgArray;
|
||||
gArray = expert_data.gArray;
|
||||
optArray = expert_data.optArray;
|
||||
opt2Array = expert_data.opt2Array;
|
||||
esArray = expert_data.esArray;
|
||||
|
||||
const pExscore = esArray[clid];
|
||||
if (exscore > pExscore) {
|
||||
pgArray[clid] = pgnum;
|
||||
gArray[clid] = gnum;
|
||||
optArray[clid] = opt;
|
||||
opt2Array[clid] = opt2;
|
||||
esArray[clid] = exscore;
|
||||
}
|
||||
|
||||
cArray[clid] = Math.max(cArray[clid], clr);
|
||||
}
|
||||
|
||||
await DB.Upsert<expert>(
|
||||
refid,
|
||||
{
|
||||
collection: "expert",
|
||||
version: version,
|
||||
coid: coid,
|
||||
},
|
||||
{
|
||||
$set: {
|
||||
cArray,
|
||||
pgArray,
|
||||
gArray,
|
||||
optArray,
|
||||
opt2Array,
|
||||
esArray,
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
const profile = await DB.FindOne<profile>(refid, {
|
||||
collection: "profile",
|
||||
});
|
||||
const name = profile.name;
|
||||
await DB.Upsert<ranking>(
|
||||
{
|
||||
collection: "ranking",
|
||||
version: version,
|
||||
coid: coid,
|
||||
clid: clid,
|
||||
},
|
||||
{
|
||||
$set: {
|
||||
pgnum: pgnum,
|
||||
gnum: gnum,
|
||||
name: name,
|
||||
opname: opname,
|
||||
pid: oppid,
|
||||
udate: 0,
|
||||
|
||||
exscore: exscore,
|
||||
maxStage: cstage,
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
let expertUser = await DB.Find<ranking>({
|
||||
collection: "ranking",
|
||||
version: version,
|
||||
coid: coid,
|
||||
clid: clid,
|
||||
});
|
||||
expertUser.sort((a: ranking, b: ranking) => b.exscore - a.exscore);
|
||||
let rankPos = expertUser.findIndex((a: ranking) => a.name == name);
|
||||
|
||||
return send.object(K.ATTR({
|
||||
anum: String(expertUser.length),
|
||||
jun: String(rankPos + 1),
|
||||
}));
|
||||
};
|
||||
|
||||
export const rankingoentry: EPR = async (info, data, send) => {
|
||||
const version = GetVersion(info);
|
||||
const refid = await IDtoRef(Number($(data).attr().iidxid));
|
||||
|
||||
const coid = Number($(data).attr().coid);
|
||||
const clid = Number($(data).attr().clid);
|
||||
|
||||
const pgnum = Number($(data).attr().pgnum);
|
||||
const gnum = Number($(data).attr().gnum);
|
||||
const opt = Number($(data).attr().opt);
|
||||
const opt2 = Number($(data).attr().opt2);
|
||||
const clr = Number($(data).attr().clr);
|
||||
|
||||
const exscore = (pgnum * 2 + gnum);
|
||||
|
||||
// TODO:: figure out what this does //
|
||||
|
||||
return send.success();
|
||||
};
|
||||
|
||||
export const rankinggetranker: EPR = async (info, data, send) => {
|
||||
const version = GetVersion(info);
|
||||
const ranking = await DB.Find<ranking>({
|
||||
collection: "ranking",
|
||||
version: version,
|
||||
coid: Number($(data).attr().coid),
|
||||
clid: Number($(data).attr().clid),
|
||||
});
|
||||
let result = {
|
||||
ranker: [],
|
||||
}
|
||||
|
||||
if (_.isNil(ranking)) return send.success();
|
||||
|
||||
ranking.sort((a: ranking, b: ranking) => b.exscore - a.exscore);
|
||||
ranking.forEach((res) => {
|
||||
result.ranker.push(
|
||||
K.ATTR({
|
||||
gnum: String(res.gnum),
|
||||
pgnum: String(res.pgnum),
|
||||
name: res.name,
|
||||
opname: res.opname,
|
||||
pid: String(res.pid),
|
||||
udate: String(res.udate),
|
||||
})
|
||||
);
|
||||
});
|
||||
|
||||
return send.object(result);
|
||||
};
|
||||
|
|
@ -1,89 +0,0 @@
|
|||
import { convention_data, shop_data } from "../models/shop";
|
||||
import { GetVersion } from "../util";
|
||||
|
||||
export const shopgetname: EPR = async (info, data, send) => {
|
||||
const shop_data = await DB.FindOne<shop_data>({
|
||||
collection: "shop_data",
|
||||
});
|
||||
|
||||
if (_.isNil(shop_data)) {
|
||||
await DB.Insert<shop_data>({
|
||||
collection: "shop_data",
|
||||
|
||||
opname: "CORE",
|
||||
pid: 53,
|
||||
cls_opt: 0,
|
||||
});
|
||||
|
||||
return send.object(
|
||||
K.ATTR({
|
||||
opname: "CORE",
|
||||
pid: "53",
|
||||
cls_opt: "0",
|
||||
hr: "0",
|
||||
mi: "0",
|
||||
}),
|
||||
{ encoding: "shift_jis" }
|
||||
);
|
||||
}
|
||||
|
||||
return send.object(
|
||||
K.ATTR({
|
||||
opname: shop_data.opname,
|
||||
pid: String(shop_data.pid),
|
||||
cls_opt: String(shop_data.cls_opt),
|
||||
hr: "0",
|
||||
mi: "0",
|
||||
}),
|
||||
{ encoding: "shift_jis" }
|
||||
);
|
||||
};
|
||||
|
||||
export const shopsavename: EPR = async (info, data, send) => {
|
||||
// removed saving code as opname attribute being sent as shift_jis but KDataReader read as utf-8 //
|
||||
return send.success();
|
||||
};
|
||||
|
||||
export const shopgetconvention: EPR = async (info, data, send) => {
|
||||
const version = GetVersion(info);
|
||||
|
||||
const convention_data = await DB.FindOne<convention_data>({
|
||||
collection: "shop_convention",
|
||||
version: version,
|
||||
});
|
||||
if (_.isNil(convention_data)) return send.deny();
|
||||
|
||||
return send.object(
|
||||
K.ATTR({
|
||||
music_0: String(convention_data.music_0),
|
||||
music_1: String(convention_data.music_1),
|
||||
music_2: String(convention_data.music_2),
|
||||
music_3: String(convention_data.music_3),
|
||||
},
|
||||
{
|
||||
valid: K.ITEM("bool", convention_data.valid),
|
||||
})
|
||||
);
|
||||
};
|
||||
|
||||
export const shopsetconvention: EPR = async (info, data, send) => {
|
||||
const version = GetVersion(info);
|
||||
|
||||
await DB.Upsert<convention_data>(
|
||||
{
|
||||
collection: "shop_convention",
|
||||
version: version,
|
||||
},
|
||||
{
|
||||
$set: {
|
||||
music_0: $(data).number("music_0"),
|
||||
music_1: $(data).number("music_1"),
|
||||
music_2: $(data).number("music_2"),
|
||||
music_3: $(data).number("music_3"),
|
||||
valid: $(data).bool("valid"),
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
return send.success();
|
||||
};
|
||||
|
|
@ -1,429 +0,0 @@
|
|||
import { profile } from "../models/profile";
|
||||
import { rival } from "../models/rival";
|
||||
import { custom } from "../models/custom";
|
||||
import { score, old_score } from "../models/score";
|
||||
import { lightning_custom } from "../models/lightning";
|
||||
|
||||
export const updateRivalSettings = async (data) => {
|
||||
let update_array = [];
|
||||
|
||||
if (!(_.isEmpty(data.sp_rival1))) {
|
||||
let update_data = {
|
||||
play_style: 1,
|
||||
index: 0,
|
||||
rival_refid: data.sp_rival1,
|
||||
};
|
||||
|
||||
update_array.push(update_data);
|
||||
} else {
|
||||
await DB.Remove<rival>(data.refid,
|
||||
{
|
||||
collection: "rival",
|
||||
play_style: 1,
|
||||
index: 0,
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
if (!(_.isEmpty(data.sp_rival2))) {
|
||||
let update_data = {
|
||||
play_style: 1,
|
||||
index: 1,
|
||||
rival_refid: data.sp_rival2,
|
||||
};
|
||||
|
||||
update_array.push(update_data);
|
||||
} else {
|
||||
await DB.Remove<rival>(data.refid,
|
||||
{
|
||||
collection: "rival",
|
||||
play_style: 1,
|
||||
index: 1,
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
if (!(_.isEmpty(data.sp_rival3))) {
|
||||
let update_data = {
|
||||
play_style: 1,
|
||||
index: 2,
|
||||
rival_refid: data.sp_rival3,
|
||||
};
|
||||
|
||||
update_array.push(update_data);
|
||||
} else {
|
||||
await DB.Remove<rival>(data.refid,
|
||||
{
|
||||
collection: "rival",
|
||||
play_style: 1,
|
||||
index: 2,
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
if (!(_.isEmpty(data.sp_rival4))) {
|
||||
let update_data = {
|
||||
play_style: 1,
|
||||
index: 3,
|
||||
rival_refid: data.sp_rival4,
|
||||
};
|
||||
|
||||
update_array.push(update_data);
|
||||
} else {
|
||||
await DB.Remove<rival>(data.refid,
|
||||
{
|
||||
collection: "rival",
|
||||
play_style: 1,
|
||||
index: 3,
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
if (!(_.isEmpty(data.sp_rival5))) {
|
||||
let update_data = {
|
||||
play_style: 1,
|
||||
index: 4,
|
||||
rival_refid: data.sp_rival5,
|
||||
};
|
||||
|
||||
update_array.push(update_data);
|
||||
} else {
|
||||
await DB.Remove<rival>(data.refid,
|
||||
{
|
||||
collection: "rival",
|
||||
play_style: 1,
|
||||
index: 4,
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
if (!(_.isEmpty(data.dp_rival1))) {
|
||||
let update_data = {
|
||||
play_style: 2,
|
||||
index: 0,
|
||||
rival_refid: data.dp_rival1,
|
||||
};
|
||||
|
||||
update_array.push(update_data);
|
||||
} else {
|
||||
await DB.Remove<rival>(data.refid,
|
||||
{
|
||||
collection: "rival",
|
||||
play_style: 2,
|
||||
index: 0,
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
if (!(_.isEmpty(data.dp_rival2))) {
|
||||
let update_data = {
|
||||
play_style: 2,
|
||||
index: 1,
|
||||
rival_refid: data.dp_rival2,
|
||||
};
|
||||
|
||||
update_array.push(update_data);
|
||||
} else {
|
||||
await DB.Remove<rival>(data.refid,
|
||||
{
|
||||
collection: "rival",
|
||||
play_style: 2,
|
||||
index: 1,
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
if (!(_.isEmpty(data.dp_rival3))) {
|
||||
let update_data = {
|
||||
play_style: 2,
|
||||
index: 2,
|
||||
rival_refid: data.dp_rival3,
|
||||
};
|
||||
|
||||
update_array.push(update_data);
|
||||
} else {
|
||||
await DB.Remove<rival>(data.refid,
|
||||
{
|
||||
collection: "rival",
|
||||
play_style: 2,
|
||||
index: 2,
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
if (!(_.isEmpty(data.dp_rival4))) {
|
||||
let update_data = {
|
||||
play_style: 2,
|
||||
index: 3,
|
||||
rival_refid: data.dp_rival4,
|
||||
};
|
||||
|
||||
update_array.push(update_data);
|
||||
} else {
|
||||
await DB.Remove<rival>(data.refid,
|
||||
{
|
||||
collection: "rival",
|
||||
play_style: 2,
|
||||
index: 3,
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
if (!(_.isEmpty(data.dp_rival5))) {
|
||||
let update_data = {
|
||||
play_style: 2,
|
||||
index: 4,
|
||||
rival_refid: data.dp_rival5,
|
||||
};
|
||||
|
||||
update_array.push(update_data);
|
||||
} else {
|
||||
await DB.Remove<rival>(data.refid,
|
||||
{
|
||||
collection: "rival",
|
||||
play_style: 2,
|
||||
index: 4,
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
for (let i = 0; i < update_array.length; i++) {
|
||||
await DB.Upsert<rival>(data.refid, {
|
||||
collection: "rival",
|
||||
play_style: update_array[i].play_style,
|
||||
index: update_array[i].index,
|
||||
}, {
|
||||
$set: {
|
||||
rival_refid: update_array[i].rival_refid,
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
};
|
||||
|
||||
export const updateCustomSettings = async (data) => {
|
||||
const profile = await DB.FindOne<profile>(data.refid, {
|
||||
collection: "profile",
|
||||
});
|
||||
|
||||
let customize = {
|
||||
frame: Number(data.frame),
|
||||
turntable: Number(data.turntable),
|
||||
note_burst: Number(data.note_burst),
|
||||
menu_music: Number(data.menu_music),
|
||||
lane_cover: Number(data.lane_cover),
|
||||
category_vox: Number(data.category_vox),
|
||||
note_skin: Number(data.note_skin),
|
||||
full_combo_splash: Number(data.full_combo_splash),
|
||||
disable_musicpreview: StoB(data.disable_musicpreview),
|
||||
|
||||
note_beam: Number(data.note_beam),
|
||||
judge_font: Number(data.judge_font),
|
||||
pacemaker_cover: Number(data.pacemaker_cover),
|
||||
vefx_lock: StoB(data.vefx_lock),
|
||||
effect: Number(data.effect),
|
||||
bomb_size: Number(data.bomb_size),
|
||||
disable_hcn_color: StoB(data.disable_hcn_color),
|
||||
first_note_preview: Number(data.first_note_preview),
|
||||
|
||||
rank_folder: StoB(data.rank_folder),
|
||||
clear_folder: StoB(data.clear_folder),
|
||||
diff_folder: StoB(data.diff_folder),
|
||||
alpha_folder: StoB(data.alpha_folder),
|
||||
rival_folder: StoB(data.rival_folder),
|
||||
rival_battle_folder: StoB(data.rival_battle_folder),
|
||||
rival_info: StoB(data.rival_info),
|
||||
hide_playcount: StoB(data.hide_playcount),
|
||||
disable_graph_cutin: StoB(data.disable_graph_cutin),
|
||||
classic_hispeed: StoB(data.classic_hispeed),
|
||||
rival_played_folder: StoB(data.rival_played_folder),
|
||||
hide_iidxid: StoB(data.hide_iidxid),
|
||||
disable_beginner_option: StoB(data.disable_beginner_option),
|
||||
|
||||
qpro_head: Number(data.qpro_head),
|
||||
qpro_hair: Number(data.qpro_hair),
|
||||
qpro_face: Number(data.qpro_face),
|
||||
qpro_hand: Number(data.qpro_hand),
|
||||
qpro_body: Number(data.qpro_body),
|
||||
qpro_back: Number(data.qpro_back),
|
||||
}
|
||||
|
||||
await DB.Upsert<custom>(data.refid, {
|
||||
collection: "custom",
|
||||
version: Number(data.version)
|
||||
},
|
||||
{
|
||||
$set: customize
|
||||
});
|
||||
|
||||
if (!_.isEmpty(data.name) && data.name != profile.name) {
|
||||
// TODO:: check name is in valid format //
|
||||
await DB.Upsert<profile>(data.refid, {
|
||||
collection: "profile",
|
||||
}, {
|
||||
$set: {
|
||||
name: data.name
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (data.version > 27) {
|
||||
await DB.Upsert<lightning_custom>(data.refid, {
|
||||
collection: "lightning_custom",
|
||||
version: Number(data.version)
|
||||
},
|
||||
{
|
||||
$set: {
|
||||
premium_skin: Number(data.lm_skin),
|
||||
premium_bg: Number(data.lm_bg),
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
export const importScoreData = async (data, send: WebUISend) => {
|
||||
if (_.isEmpty(data.data)) {
|
||||
console.error("[Score Importer] Supplied data is empty");
|
||||
return send.error(400, "Empty data");
|
||||
}
|
||||
|
||||
let content = null;
|
||||
let version = 0;
|
||||
let count = 0;
|
||||
try {
|
||||
content = JSON.parse(data.data);
|
||||
version = content.version;
|
||||
count = content.count;
|
||||
}
|
||||
catch {
|
||||
console.error("[Score Importer] Invaild data has been supplied");
|
||||
return send.error(400, "Invalid data");
|
||||
}
|
||||
|
||||
switch (version) {
|
||||
case 1:
|
||||
let sd_ver1: old_score[] = content.data;
|
||||
for (let a = 0; a < count; a++) {
|
||||
let result = {
|
||||
pgArray: Array<number>(10).fill(0),
|
||||
gArray: Array<number>(10).fill(0),
|
||||
mArray: Array<number>(10).fill(-1),
|
||||
cArray: Array<number>(10).fill(0),
|
||||
rArray: Array<number>(10).fill(-1),
|
||||
esArray: Array<number>(10).fill(0),
|
||||
|
||||
optArray: Array<number>(10).fill(0),
|
||||
opt2Array: Array<number>(10).fill(0),
|
||||
}
|
||||
|
||||
if (!_.isNil(sd_ver1[a].spmArray)) {
|
||||
for (let b = 0; b < 5; b++) {
|
||||
result.cArray[b] = sd_ver1[a].spmArray[2 + b];
|
||||
result.esArray[b] = sd_ver1[a].spmArray[7 + b];
|
||||
if (sd_ver1[a].spmArray[12 + b] != -1) result.mArray[b] = sd_ver1[a].spmArray[12 + b];
|
||||
}
|
||||
}
|
||||
|
||||
if (!_.isNil(sd_ver1[a].dpmArray)) {
|
||||
for (let b = 5; b < 10; b++) {
|
||||
result.cArray[b] = sd_ver1[a].dpmArray[2 + (b - 5)];
|
||||
result.esArray[b] = sd_ver1[a].dpmArray[7 + (b - 5)];
|
||||
if (sd_ver1[a].dpmArray[12 + (b - 5)] != -1) result.mArray[b] = sd_ver1[a].dpmArray[12 + (b - 5)];
|
||||
}
|
||||
}
|
||||
|
||||
if (!_.isNil(sd_ver1[a].optArray)) {
|
||||
result.optArray = sd_ver1[a].optArray;
|
||||
}
|
||||
|
||||
if (!_.isNil(sd_ver1[a].opt2Array)) {
|
||||
result.opt2Array = sd_ver1[a].opt2Array;
|
||||
}
|
||||
|
||||
for (let b = 0; b < 10; b++) {
|
||||
if (_.isNil(sd_ver1[a][b])) continue;
|
||||
result[b] = sd_ver1[a][b];
|
||||
|
||||
if (!_.isNil(sd_ver1[a][b + 10])) {
|
||||
result[b + 10] = sd_ver1[a][b + 10];
|
||||
}
|
||||
}
|
||||
|
||||
await DB.Upsert<score>(data.refid,
|
||||
{
|
||||
collection: "score",
|
||||
mid: sd_ver1[a].music_id
|
||||
},
|
||||
{
|
||||
$set: {
|
||||
...result
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
let sd_ver2: score[] = content.data;
|
||||
for (let a = 0; a < count; a++) {
|
||||
let result = {
|
||||
pgArray: sd_ver2[a].pgArray,
|
||||
gArray: sd_ver2[a].gArray,
|
||||
mArray: sd_ver2[a].mArray,
|
||||
cArray: sd_ver2[a].cArray,
|
||||
rArray: sd_ver2[a].rArray,
|
||||
esArray: sd_ver2[a].esArray,
|
||||
|
||||
optArray: sd_ver2[a].optArray,
|
||||
opt2Array: sd_ver2[a].opt2Array,
|
||||
};
|
||||
|
||||
for (let b = 0; b < 10; b++) {
|
||||
if (_.isNil(sd_ver2[a][b])) continue;
|
||||
result[b] = sd_ver2[a][b];
|
||||
|
||||
if (!_.isNil(sd_ver2[a][b + 10])) {
|
||||
result[b + 10] = sd_ver2[a][b + 10];
|
||||
}
|
||||
}
|
||||
|
||||
await DB.Upsert<score>(data.refid,
|
||||
{
|
||||
collection: "score",
|
||||
mid: sd_ver2[a].mid
|
||||
},
|
||||
{
|
||||
$set: {
|
||||
...result,
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
console.error("[Score Importer] Unregistered score data version");
|
||||
return send.error(400, "Invalid data version");
|
||||
}
|
||||
}
|
||||
|
||||
export const exportScoreData = async (data, send: WebUISend) => {
|
||||
const score = await DB.Find<score>(data.refid, {
|
||||
collection: "score"
|
||||
});
|
||||
|
||||
if (score == null) return send.error(400, "No data");
|
||||
|
||||
let result = {
|
||||
version: 2,
|
||||
count: score.length,
|
||||
data: {
|
||||
...score,
|
||||
}
|
||||
}
|
||||
|
||||
send.json(result);
|
||||
}
|
||||
|
||||
function StoB(value: string) {
|
||||
return value == "on" ? true : false;
|
||||
};
|
||||
|
|
@ -1,598 +0,0 @@
|
|||
import { pccommon, pcreg, pcget, pcgetname, pctakeover, pcvisit, pcsave, pcoldget, pcgetlanegacha, pcdrawlanegacha, pcshopregister } from "./handlers/pc";
|
||||
import { shopgetname, shopsavename, shopgetconvention, shopsetconvention } from "./handlers/shop";
|
||||
import { musicreg, musicgetrank, musicappoint, musicarenacpu, musiccrate, musicbreg, musicgetralive } from "./handlers/music";
|
||||
import { graderaised } from "./handlers/grade";
|
||||
import { gssysteminfo } from "./handlers/gamesystem";
|
||||
import { updateRivalSettings, updateCustomSettings, importScoreData, exportScoreData } from "./handlers/webui";
|
||||
import { GetVersion } from "./util";
|
||||
import { rankingentry, rankinggetranker, rankingoentry } from "./handlers/ranking";
|
||||
|
||||
export function register() {
|
||||
if (CORE_VERSION_MAJOR <= 1 && CORE_VERSION_MINOR < 31) {
|
||||
console.error("The current version of Asphyxia Core is not supported. Requires version '1.31' or later.");
|
||||
return;
|
||||
}
|
||||
|
||||
R.Contributor("duel0213");
|
||||
|
||||
R.GameCode("GLD");
|
||||
R.GameCode("HDD");
|
||||
R.GameCode("I00");
|
||||
R.GameCode("JDJ");
|
||||
R.GameCode("JDZ");
|
||||
R.GameCode("KDZ");
|
||||
R.GameCode("LDJ");
|
||||
|
||||
// common //
|
||||
R.Config("BeatPhase", {
|
||||
name: "Beat #",
|
||||
desc: "1 / 2 / 3 / FREE", // This can be event phase on old versions //
|
||||
type: "integer",
|
||||
default: 3, // BEAT FREE //
|
||||
});
|
||||
// ~ Resort Anthem (common) / /
|
||||
R.Config("cmd_gmbl", {
|
||||
name: "G.JUDGE",
|
||||
desc: "Enable G.JUDGE Command (~ Resort Anthem)",
|
||||
type: "boolean",
|
||||
default: true,
|
||||
});
|
||||
R.Config("cmd_gmbla", {
|
||||
name: "G.JUDGE-A",
|
||||
desc: "Enable G.JUDGE-A Command (~ Resort Anthem)",
|
||||
type: "boolean",
|
||||
default: true,
|
||||
});
|
||||
R.Config("cmd_regl", {
|
||||
name: "REGUL-SPEED",
|
||||
desc: "Enable REGUL-SPEED Command (~ Resort Anthem)",
|
||||
type: "boolean",
|
||||
default: true,
|
||||
});
|
||||
R.Config("cmd_rndp", {
|
||||
name: "RANDOM+",
|
||||
desc: "Enable RANDOM+ Command (~ Resort Anthem)",
|
||||
type: "boolean",
|
||||
default: true,
|
||||
});
|
||||
R.Config("cmd_hrnd", {
|
||||
name: "H-RANDOM",
|
||||
desc: "Enable H-RANDOM Command (~ Resort Anthem)",
|
||||
type: "boolean",
|
||||
default: true,
|
||||
});
|
||||
R.Config("cmd_alls", {
|
||||
name: "ALL-SCRATCH",
|
||||
desc: "Enable ALL-SCRATCH Command (~ Resort Anthem)",
|
||||
type: "boolean",
|
||||
default: true,
|
||||
});
|
||||
// SPADA ~ (common) //
|
||||
R.Config("NewSongAnother12", {
|
||||
name: "New Song Another",
|
||||
desc: "Enables ANOTHER difficulty of current version's new songs that has Level 12",
|
||||
type: "boolean",
|
||||
default: true,
|
||||
});
|
||||
// PENDUAL ~ (common) //
|
||||
R.Config("ExpertPhase", {
|
||||
name: "Expert Phase",
|
||||
type: "integer",
|
||||
default: 2,
|
||||
});
|
||||
R.Config("ExpertRandomPhase", {
|
||||
name: "Expert Random Phase",
|
||||
type: "integer",
|
||||
default: 2,
|
||||
});
|
||||
// HEROIC VERSE ~ (common) //
|
||||
R.Config("ArenaPhase", {
|
||||
name: "ARENA Phase",
|
||||
type: "integer",
|
||||
default: 2, // ADVERTISE //
|
||||
});
|
||||
// BISTROVER ~ (common) //
|
||||
R.Config("MovieUpload", {
|
||||
name: "Movie Upload URL",
|
||||
type: "string",
|
||||
desc: "API address for play video uploading feature (JSON)",
|
||||
default: "http://localhost/"
|
||||
});
|
||||
R.Config("Eisei", {
|
||||
name: "Eisei Grade Courses",
|
||||
desc: "Enable EISEI/KIWAMI Grade Courses",
|
||||
type: "boolean",
|
||||
default: true,
|
||||
});
|
||||
// CastHour ~ RESIDENT (common) //
|
||||
R.Config("Grade", {
|
||||
name: "Grade Open Phase",
|
||||
desc: "RED / KAIDEN",
|
||||
type: "integer",
|
||||
default: 2,
|
||||
})
|
||||
|
||||
// SIRIUS //
|
||||
R.Config("sr_league", {
|
||||
name: "League Phase (SR)",
|
||||
type: "integer",
|
||||
default: 0,
|
||||
});
|
||||
|
||||
// Resort Anthem //
|
||||
R.Config("ra_league", {
|
||||
name: "League Phase (RA)",
|
||||
type: "integer",
|
||||
default: 0,
|
||||
});
|
||||
R.Config("ra_story", {
|
||||
name: "Story Phase (RA)",
|
||||
type: "integer",
|
||||
default: 0,
|
||||
});
|
||||
R.Config("ra_event", {
|
||||
name: "Tour Phase (RA)",
|
||||
type: "integer",
|
||||
default: 3,
|
||||
});
|
||||
R.Config("ra_lincle", {
|
||||
name: "Lincle LINK Phase (RA)",
|
||||
type: "integer",
|
||||
default: 1,
|
||||
});
|
||||
|
||||
// Lincle //
|
||||
R.Config("lc_lincle", {
|
||||
name: "Lincle LINK Phase (LC)",
|
||||
type: "integer",
|
||||
default: 2,
|
||||
});
|
||||
R.Config("lc_boss", {
|
||||
name: "Lincle Kingdom Phase",
|
||||
type: "integer",
|
||||
default: 2,
|
||||
});
|
||||
|
||||
// tricoro //
|
||||
R.Config("tr_limit", {
|
||||
name: "Limit Burst Phase (TR)",
|
||||
type: "integer",
|
||||
default: 24, // TODO:: verify //
|
||||
});
|
||||
R.Config("tr_boss", {
|
||||
name: "Event Phase (TR)",
|
||||
desc: "RED / BLUE / YELLOW",
|
||||
type: "integer",
|
||||
default: 3,
|
||||
});
|
||||
R.Config("tr_red", {
|
||||
name: "RED Phase",
|
||||
desc: "LEGEND CROSS Phase",
|
||||
type: "integer",
|
||||
default: 3,
|
||||
});
|
||||
R.Config("tr_yellow", {
|
||||
name: "YELLOW Phase",
|
||||
desc: "ぼくらの宇宙戦争 Phase",
|
||||
type: "integer",
|
||||
default: 3,
|
||||
});
|
||||
R.Config("tr_medal", {
|
||||
name: "Medal Phase (TR)",
|
||||
type: "integer",
|
||||
default: 3,
|
||||
});
|
||||
R.Config("tr_cafe", {
|
||||
name: "Café de Tran",
|
||||
desc: "Enable Café de Tran Event (tricoro)",
|
||||
type: "boolean",
|
||||
default: true,
|
||||
});
|
||||
R.Config("tr_tripark", {
|
||||
name: "Everyone's SPACEWAR!!",
|
||||
desc: "Enable クプロ・ミミニャミ・パステルくんのみんなで宇宙戦争!! Event (tricoro)",
|
||||
type: "boolean",
|
||||
default: true,
|
||||
});
|
||||
|
||||
// SPADA //
|
||||
R.Config("sp_limit", {
|
||||
name: "Limit Burst Phase (SP)",
|
||||
type: "integer",
|
||||
default: 24,
|
||||
});
|
||||
R.Config("sp_boss", {
|
||||
name: "Event Phase (SP)",
|
||||
desc: "Spada†leggendaria Phase",
|
||||
type: "integer",
|
||||
default: 3,
|
||||
});
|
||||
R.Config("sp_boss1", {
|
||||
name: "Qprogue Phase (SP)",
|
||||
type: "integer",
|
||||
default: 4,
|
||||
});
|
||||
R.Config("sp_cafe", {
|
||||
name: "Café de Tran",
|
||||
desc: "Enable Café de Tran Event (SPADA)",
|
||||
type: "boolean",
|
||||
default: true,
|
||||
});
|
||||
R.Config("sp_tripark", {
|
||||
name: "Everyone's SPACEWAR!!",
|
||||
desc: "Enable クプロ・ミミニャミ・パステルくんのみんなで宇宙戦争!! Event (SPADA)",
|
||||
type: "boolean",
|
||||
default: true,
|
||||
});
|
||||
R.Config("sp_triparkskip", {
|
||||
name: "Everyone's SPACEWAR!! Skip",
|
||||
desc: "Skips クプロ・ミミニャミ・パステルくんのみんなで宇宙戦争!! Event Scenes",
|
||||
type: "integer",
|
||||
default: 2,
|
||||
});
|
||||
R.Config("sp_superstar", {
|
||||
name: "SUPER STAR -MITSURU-",
|
||||
desc: "SUPER STAR 満 -MITSURU- 完全復活祭 Phase",
|
||||
type: "integer",
|
||||
default: 2,
|
||||
});
|
||||
|
||||
// PENDUAL //
|
||||
R.Config("pd_preplay", {
|
||||
name: "SUPER FUTURE 2323 Phase",
|
||||
type: "integer",
|
||||
default: 2,
|
||||
});
|
||||
R.Config("pd_tohoremix", {
|
||||
name: "BEMANI X TOHO",
|
||||
desc: "BEMANI×TOHO REITAISAI 2015 project Phase",
|
||||
type: "integer",
|
||||
default: 2,
|
||||
});
|
||||
R.Config("pd_limit", {
|
||||
name: "Chrono Chaser Phase",
|
||||
type: "integer",
|
||||
default: 9,
|
||||
});
|
||||
R.Config("pd_boss", {
|
||||
name: "Event Phase (PD)",
|
||||
desc: "Chrono Seeker / Qpronicle Chord / PENDUAL TALISMAN",
|
||||
type: "integer",
|
||||
default: 3,
|
||||
});
|
||||
R.Config("pd_chronodiver", {
|
||||
name: "Chrono Seeker",
|
||||
type: "integer",
|
||||
default: 3,
|
||||
});
|
||||
R.Config("pd_qproniclechord", {
|
||||
name: "Qpronicle Chord",
|
||||
type: "integer",
|
||||
default: 2,
|
||||
});
|
||||
R.Config("pd_cccollabo", {
|
||||
name: "Coca-Cola×BEMANI",
|
||||
desc: "Coca-Cola×BEMANI 店舗限定ロケテスト Phase",
|
||||
type: "integer",
|
||||
default: 3,
|
||||
});
|
||||
R.Config("pd_timephase", {
|
||||
name: "Time Phase",
|
||||
type: "integer",
|
||||
desc: "Default / Present / Future",
|
||||
default: 0,
|
||||
});
|
||||
|
||||
// copula //
|
||||
R.Config("cp_boss", {
|
||||
name: "Event Phase (CP)",
|
||||
desc: "開通!とことこライン / Mystery Line",
|
||||
type: "integer",
|
||||
default: 2,
|
||||
});
|
||||
R.Config("cp_event1", {
|
||||
name: "開通!とことこライン",
|
||||
desc: "開通!とことこライン Phase",
|
||||
type: "integer",
|
||||
default: 1,
|
||||
});
|
||||
R.Config("cp_event2", {
|
||||
name: "Mystery Line",
|
||||
desc: "Mystery Line Phase",
|
||||
type: "integer",
|
||||
default: 2,
|
||||
});
|
||||
R.Config("cp_extraboss",
|
||||
{
|
||||
name: "Extra Boss Phase (CP)",
|
||||
desc: "Extra Boss Phase",
|
||||
type: "integer",
|
||||
default: 30,
|
||||
});
|
||||
R.Config("cp_bemanisummer", {
|
||||
name: "BEMANI Summer 2016",
|
||||
desc: "NEW Generation 夏の流星フェスタ2016 Phase",
|
||||
type: "integer",
|
||||
default: 2,
|
||||
});
|
||||
|
||||
// SINOBUZ //
|
||||
R.Config("sb_boss", {
|
||||
name: "Event Phase (SB)",
|
||||
desc: "攻城シノバズ伝 / 忍々七鍵伝",
|
||||
type: "integer",
|
||||
default: 2,
|
||||
});
|
||||
R.Config("sb_event1", {
|
||||
name: "攻城シノバズ伝",
|
||||
desc: "攻城シノバズ伝 Phase",
|
||||
type: "integer",
|
||||
default: 2,
|
||||
});
|
||||
R.Config("sb_event2", {
|
||||
name: "忍々七鍵伝",
|
||||
desc: "忍々七鍵伝 Phase",
|
||||
type: "integer",
|
||||
default: 1,
|
||||
});
|
||||
R.Config("sb_extraboss",
|
||||
{
|
||||
name: "BUZRA ARTS",
|
||||
desc: "BUZRA ARTS Phase",
|
||||
type: "integer",
|
||||
default: 35,
|
||||
});
|
||||
|
||||
// CANNON BALLERS //
|
||||
R.Config("cb_boss", {
|
||||
name: "Event Phase (SB)",
|
||||
desc: "激走!キャノンレーサー",
|
||||
type: "integer",
|
||||
default: 1,
|
||||
});
|
||||
R.Config("cb_event1", {
|
||||
name: "激走!キャノンレーサー",
|
||||
desc: "激走!キャノンレーサー Phase",
|
||||
type: "integer",
|
||||
default: 3,
|
||||
});
|
||||
R.Config("cb_extraboss",
|
||||
{
|
||||
name: "IIDX AIR RACE",
|
||||
desc: "IIDX AIR RACE Phase",
|
||||
type: "integer",
|
||||
default: 35,
|
||||
});
|
||||
|
||||
// Rootage //
|
||||
R.Config("rt_boss", {
|
||||
name: "Event Phase (RT)",
|
||||
desc: "蜃気楼の図書館 / DELABITY LABORATORY",
|
||||
type: "integer",
|
||||
default: 2,
|
||||
});
|
||||
R.Config("rt_event1", {
|
||||
name: "蜃気楼の図書館",
|
||||
desc: "蜃気楼の図書館 Phase",
|
||||
type: "integer",
|
||||
default: 3,
|
||||
});
|
||||
R.Config("rt_event2", {
|
||||
name: "DELABITY LABORATORY",
|
||||
desc: "DELABITY LABORATORY Phase",
|
||||
type: "integer",
|
||||
default: 2,
|
||||
});
|
||||
R.Config("rt_extraboss",
|
||||
{
|
||||
name: "ARC SCORE",
|
||||
desc: "ARC SCORE Phase",
|
||||
type: "integer",
|
||||
default: 3,
|
||||
});
|
||||
|
||||
// HEROIC VERSE //
|
||||
R.Config("hv_boss", {
|
||||
name: "Event Phase (HV)",
|
||||
desc: "HEROIC WORKOUT!!",
|
||||
type: "integer",
|
||||
default: 1,
|
||||
});
|
||||
R.Config("hv_event", {
|
||||
name: "HEROIC WORKOUT!!",
|
||||
desc: "HEROIC WORKOUT!! Phase",
|
||||
type: "integer",
|
||||
default: 4,
|
||||
});
|
||||
R.Config("hv_extraboss",
|
||||
{
|
||||
name: "SHADOW REBELLION",
|
||||
desc: "SHADOW REBELLION Phase",
|
||||
type: "integer",
|
||||
default: 1,
|
||||
});
|
||||
|
||||
// BISTROVER //
|
||||
R.Config("bo_boss", {
|
||||
name: "Event Phase (BO)",
|
||||
desc: "召しませ!BISTROVER",
|
||||
type: "integer",
|
||||
default: 1,
|
||||
});
|
||||
R.Config("bo_extraboss", {
|
||||
name: "BISTRO LANDING",
|
||||
desc: "BISTRO LANDING Phase",
|
||||
type: "integer",
|
||||
default: 1,
|
||||
});
|
||||
R.Config("bo_event", {
|
||||
name: "召しませ!BISTROVER",
|
||||
desc: "召しませ!BISTROVER Phase",
|
||||
type: "integer",
|
||||
default: 1,
|
||||
});
|
||||
|
||||
// CastHour //
|
||||
R.Config("ch_event", {
|
||||
name: "CastHour Space",
|
||||
desc: "CastHour Space Phase",
|
||||
type: "integer",
|
||||
default: 5,
|
||||
});
|
||||
R.Config("ch_extraboss", {
|
||||
name: "Extra Boss Phase (CH)",
|
||||
type: "integer",
|
||||
default: 3,
|
||||
});
|
||||
|
||||
// RESIDENT //
|
||||
R.Config("rs_event", {
|
||||
name: "RESIDENT PARTY",
|
||||
desc: "RESIDENT PARTY Phase",
|
||||
type: "integer",
|
||||
default: 5,
|
||||
});
|
||||
R.Config("rs_extraboss", {
|
||||
name: "Extra Boss Phase (RS)",
|
||||
type: "integer",
|
||||
default: 3,
|
||||
});
|
||||
|
||||
// EPOLIS //
|
||||
R.Config("ep_event", {
|
||||
name: "Event Phase (EP)",
|
||||
desc: "MY POLIS DESIGNER / EPOLIS RESTORATION",
|
||||
type: "integer",
|
||||
default: 2,
|
||||
});
|
||||
R.Config("ep_event1", {
|
||||
name: "MY POLIS DESIGNER",
|
||||
desc: "MY POLIS DESIGNER Phase",
|
||||
type: "integer",
|
||||
default: 3,
|
||||
});
|
||||
R.Config("ep_event2", {
|
||||
name: "EPOLIS RESTORATION",
|
||||
desc: "EPOLIS RESTORATION Phase",
|
||||
type: "integer",
|
||||
default: 3,
|
||||
});
|
||||
R.Config("ep_extraboss", {
|
||||
name: "EPOLIS SINGULARITY",
|
||||
desc: "EPOLIS SINGULARITY Phase",
|
||||
type: "integer",
|
||||
default: 3,
|
||||
});
|
||||
|
||||
// Pinky Crush //
|
||||
R.Config("pc_event", {
|
||||
name: "Event Phase (PC)",
|
||||
desc: "ピンキージャンプアップ! / ピンキーアンダーグラウンド",
|
||||
type: "integer",
|
||||
default: 2,
|
||||
});
|
||||
R.Config("pc_event1", {
|
||||
name: "ピンキージャンプアップ!",
|
||||
desc: "ピンキージャンプアップ! Phase",
|
||||
type: "integer",
|
||||
default: 3,
|
||||
});
|
||||
R.Config("pc_event2", {
|
||||
name: "ピンキーアンダーグラウンド",
|
||||
desc: "ピンキーアンダーグラウンド Phase",
|
||||
type: "integer",
|
||||
default: 3,
|
||||
});
|
||||
R.Config("pc_extraboss", {
|
||||
name: "Extra Boss Phase (PC)",
|
||||
type: "integer",
|
||||
default: 3,
|
||||
});
|
||||
|
||||
// TODO:: Make a list of customize items //
|
||||
R.WebUIEvent("iidxGetProfile", async (data, send: WebUISend) => {
|
||||
const pcdata = await DB.FindOne(data.refid, {
|
||||
collection: "pcdata",
|
||||
version: Number(data.version),
|
||||
});
|
||||
|
||||
return send.json({
|
||||
pcdata,
|
||||
});
|
||||
});
|
||||
R.WebUIEvent("iidxGetSetting", async (data, send: WebUISend) => {
|
||||
const custom = await DB.FindOne(data.refid, {
|
||||
collection: "custom",
|
||||
version: Number(data.version),
|
||||
});
|
||||
|
||||
const lm_custom = await DB.FindOne(data.refid, {
|
||||
collection: "lightning_custom",
|
||||
version: Number(data.version),
|
||||
});
|
||||
|
||||
return send.json({
|
||||
custom,
|
||||
lm_custom,
|
||||
});
|
||||
});
|
||||
R.WebUIEvent("iidxUpdateRival", updateRivalSettings);
|
||||
R.WebUIEvent("iidxUpdateCustom", updateCustomSettings);
|
||||
R.WebUIEvent("iidxImportScoreData", importScoreData);
|
||||
R.WebUIEvent("iidxExportScoreData", exportScoreData);
|
||||
|
||||
const MultiRoute = (method: string, handler: EPR | boolean) => {
|
||||
R.Route(`${method}`, handler);
|
||||
R.Route(`IIDX21${method}`, handler);
|
||||
R.Route(`IIDX22${method}`, handler);
|
||||
R.Route(`IIDX23${method}`, handler);
|
||||
R.Route(`IIDX24${method}`, handler);
|
||||
R.Route(`IIDX25${method}`, handler);
|
||||
R.Route(`IIDX26${method}`, handler);
|
||||
R.Route(`IIDX27${method}`, handler);
|
||||
R.Route(`IIDX28${method}`, handler);
|
||||
R.Route(`IIDX29${method}`, handler);
|
||||
R.Route(`IIDX30${method}`, handler);
|
||||
R.Route(`IIDX31${method}`, handler);
|
||||
R.Route(`IIDX32${method}`, handler);
|
||||
};
|
||||
|
||||
MultiRoute("pc.common", pccommon);
|
||||
MultiRoute("pc.reg", pcreg);
|
||||
MultiRoute("pc.get", pcget);
|
||||
MultiRoute("pc.getname", pcgetname);
|
||||
MultiRoute("pc.oldget", pcoldget);
|
||||
MultiRoute("pc.takeover", pctakeover);
|
||||
MultiRoute("pc.visit", pcvisit);
|
||||
MultiRoute("pc.save", pcsave);
|
||||
MultiRoute("pc.shopregister", pcshopregister);
|
||||
MultiRoute("pc.getLaneGachaTicket", pcgetlanegacha);
|
||||
MultiRoute("pc.drawLaneGacha", pcdrawlanegacha);
|
||||
MultiRoute("pc.consumeLaneGachaTicket", true);
|
||||
|
||||
MultiRoute("shop.getname", shopgetname);
|
||||
MultiRoute("shop.savename", shopsavename);
|
||||
MultiRoute("shop.getconvention", shopgetconvention);
|
||||
MultiRoute("shop.setconvention", shopsetconvention);
|
||||
|
||||
MultiRoute("music.crate", musiccrate);
|
||||
MultiRoute("music.getrank", musicgetrank);
|
||||
MultiRoute("music.getralive", musicgetralive);
|
||||
MultiRoute("music.appoint", musicappoint);
|
||||
MultiRoute("music.reg", musicreg);
|
||||
MultiRoute("music.breg", musicbreg);
|
||||
MultiRoute("music.arenaCPU", musicarenacpu);
|
||||
|
||||
MultiRoute("grade.raised", graderaised);
|
||||
|
||||
MultiRoute("ranking.entry", rankingentry);
|
||||
MultiRoute("ranking.oentry", rankingoentry);
|
||||
MultiRoute("ranking.getranker", rankinggetranker);
|
||||
|
||||
MultiRoute("gameSystem.systemInfo", gssysteminfo);
|
||||
|
||||
R.Unhandled((req: EamuseInfo, data: any, send: EamuseSend) => {
|
||||
console.warn(`Unhandled Request : [${GetVersion(req)}], ${req.module}.${req.method}, ${JSON.stringify(data)}`);
|
||||
return send.success();
|
||||
});
|
||||
}
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
export interface activity {
|
||||
collection: "activity";
|
||||
version: number;
|
||||
|
||||
date: number;
|
||||
play_style: number;
|
||||
|
||||
music_num: number;
|
||||
play_time: number;
|
||||
keyboard_num: number;
|
||||
scratch_num: number;
|
||||
clear_update_num: number[];
|
||||
score_update_num: number[];
|
||||
}
|
||||
|
||||
export interface activity_mybest {
|
||||
collection: "activity_mybest";
|
||||
version: number;
|
||||
|
||||
play_style: number;
|
||||
play_side: number;
|
||||
music_id: number;
|
||||
note_id: number;
|
||||
|
||||
target_graph: number;
|
||||
target_score: number;
|
||||
pacemaker: number;
|
||||
best_clear: number;
|
||||
best_score: number;
|
||||
best_misscount: number;
|
||||
now_clear: number;
|
||||
now_score: number;
|
||||
now_misscount: number;
|
||||
now_pgreat: number;
|
||||
now_great: number;
|
||||
now_good: number;
|
||||
now_bad: number;
|
||||
now_poor: number;
|
||||
now_combo: number;
|
||||
now_fast: number;
|
||||
now_slow: number;
|
||||
option: number;
|
||||
option_2: number;
|
||||
ghost_gauge_data: string;
|
||||
gauge_type: number;
|
||||
result_type: number;
|
||||
is_special_result: number;
|
||||
|
||||
update_date: number;
|
||||
}
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
export const IIDX_CPUS = [
|
||||
[
|
||||
[6, 4, 5, 0],
|
||||
[7, 5, 6, 0],
|
||||
[8, 6, 6, 0],
|
||||
[9, 6, 7, 0],
|
||||
[10, 7, 7, 0],
|
||||
[10, 7, 8, 0],
|
||||
[11, 8, 8, 0],
|
||||
[11, 8, 9, 0],
|
||||
[12, 9, 9, 0],
|
||||
[12, 9, 10, 0],
|
||||
[13, 9, 10, 0],
|
||||
[13, 10, 10, 0],
|
||||
[14, 10, 11, 0],
|
||||
[14, 10, 11, 1],
|
||||
[15, 11, 11, 1],
|
||||
[15, 11, 12, 1],
|
||||
[16, 11, 12, 1],
|
||||
[16, 11, 12, 1],
|
||||
[17, 12, 12, 1],
|
||||
[18, 12, 12, 1],
|
||||
],
|
||||
[
|
||||
[6, 3, 5, 0],
|
||||
[7, 3, 5, 0],
|
||||
[8, 4, 5, 0],
|
||||
[8, 4, 5, 0],
|
||||
[9, 5, 6, 0],
|
||||
[9, 5, 6, 0],
|
||||
[10, 6, 6, 0],
|
||||
[10, 6, 7, 0],
|
||||
[11, 7, 7, 0],
|
||||
[11, 7, 8, 0],
|
||||
[12, 8, 8, 0],
|
||||
[12, 8, 9, 0],
|
||||
[13, 9, 9, 0],
|
||||
[13, 9, 10, 0],
|
||||
[14, 9, 10, 0],
|
||||
[15, 10, 10, 0],
|
||||
[15, 10, 11, 0],
|
||||
[16, 11, 11, 1],
|
||||
[17, 11, 12, 1],
|
||||
[18, 12, 12, 1],
|
||||
],
|
||||
];
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
export interface badge {
|
||||
collection: "badge";
|
||||
version: number;
|
||||
|
||||
category_name: string;
|
||||
flg_id: number;
|
||||
flg: number;
|
||||
}
|
||||
|
|
@ -1,117 +0,0 @@
|
|||
export interface custom {
|
||||
collection: "custom";
|
||||
|
||||
version: number;
|
||||
|
||||
// skin //
|
||||
frame: number;
|
||||
turntable: number;
|
||||
note_burst: number;
|
||||
menu_music: number;
|
||||
lane_cover: number;
|
||||
category_vox: number;
|
||||
note_skin: number;
|
||||
full_combo_splash: number;
|
||||
disable_musicpreview: boolean;
|
||||
|
||||
note_beam: number;
|
||||
judge_font: number;
|
||||
pacemaker_cover: number;
|
||||
vefx_lock: boolean;
|
||||
effect: number;
|
||||
bomb_size: number;
|
||||
disable_hcn_color: boolean;
|
||||
first_note_preview: number;
|
||||
|
||||
skin_customize_flg: number[];
|
||||
|
||||
note_size: number; // epolis //
|
||||
lift_cover: number;
|
||||
note_beam_size: number;
|
||||
|
||||
// appendsettings
|
||||
rank_folder: boolean;
|
||||
clear_folder: boolean;
|
||||
diff_folder: boolean;
|
||||
alpha_folder: boolean;
|
||||
rival_folder: boolean;
|
||||
rival_battle_folder: boolean;
|
||||
rival_info: boolean;
|
||||
hide_playcount: boolean;
|
||||
disable_graph_cutin: boolean;
|
||||
classic_hispeed: boolean;
|
||||
rival_played_folder: boolean;
|
||||
hide_iidxid: boolean;
|
||||
disable_beginner_option: boolean;
|
||||
|
||||
// qpro //
|
||||
qpro_head: number;
|
||||
qpro_hair: number;
|
||||
qpro_face: number;
|
||||
qpro_hand: number;
|
||||
qpro_body: number;
|
||||
qpro_back: number; // epolis //
|
||||
|
||||
// qpro_secret (heroic verse) //
|
||||
qpro_secret_head: string[];
|
||||
qpro_secret_hair: string[];
|
||||
qpro_secret_face: string[];
|
||||
qpro_secret_hand: string[];
|
||||
qpro_secret_body: string[];
|
||||
qpro_secret_back: string[]; // epolis //
|
||||
}
|
||||
|
||||
export const default_custom = {
|
||||
frame: 0,
|
||||
turntable: 0,
|
||||
note_burst: 0,
|
||||
menu_music: 0,
|
||||
lane_cover: 0,
|
||||
category_vox: 0,
|
||||
note_skin: 0,
|
||||
full_combo_splash: 0,
|
||||
disable_musicpreview: false,
|
||||
|
||||
note_beam: 0,
|
||||
judge_font: 0,
|
||||
pacemaker_cover: 0,
|
||||
vefx_lock: false,
|
||||
effect: 0,
|
||||
bomb_size: 0,
|
||||
disable_hcn_color: false,
|
||||
first_note_preview: 0,
|
||||
|
||||
skin_customize_flg: Array<number>(3).fill(-1),
|
||||
|
||||
note_size: 0,
|
||||
lift_cover: 0,
|
||||
note_beam_size: 0,
|
||||
|
||||
rank_folder: true,
|
||||
clear_folder: true,
|
||||
diff_folder: true,
|
||||
alpha_folder: true,
|
||||
rival_folder: true,
|
||||
rival_battle_folder: true,
|
||||
rival_info: true,
|
||||
hide_playcount: false,
|
||||
disable_graph_cutin: false,
|
||||
classic_hispeed: false,
|
||||
rival_played_folder: true,
|
||||
hide_iidxid: false,
|
||||
disable_beginner_option: false,
|
||||
|
||||
qpro_head: 0,
|
||||
qpro_hair: 0,
|
||||
qpro_face: 0,
|
||||
qpro_hand: 0,
|
||||
qpro_body: 0,
|
||||
qpro_back: 0,
|
||||
|
||||
qpro_secret_head: Array<string>(7).fill("-1"),
|
||||
qpro_secret_hair: Array<string>(7).fill("-1"),
|
||||
qpro_secret_face: Array<string>(7).fill("-1"),
|
||||
qpro_secret_hand: Array<string>(7).fill("-1"),
|
||||
qpro_secret_body: Array<string>(7).fill("-1"),
|
||||
qpro_secret_back: Array<string>(7).fill("-1"),
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
export interface blueboss {
|
||||
level: number;
|
||||
gauge: number;
|
||||
item: number;
|
||||
item_flg: number;
|
||||
row0: number;
|
||||
row1: number;
|
||||
column0: number;
|
||||
column1: number;
|
||||
general: number;
|
||||
first_flg: number;
|
||||
sector: number;
|
||||
durability: string;
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
export interface extra_boss {
|
||||
collection: "extra_boss";
|
||||
version: number;
|
||||
phase: number;
|
||||
|
||||
extra: number;
|
||||
extra_b: number;
|
||||
onemore: number;
|
||||
onemore_b: number;
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
export interface extra_favorite {
|
||||
collection: "extra_favorite";
|
||||
version: number;
|
||||
folder_id: number;
|
||||
|
||||
sp_mlist: string | Buffer;
|
||||
sp_clist: string | Buffer;
|
||||
dp_mlist: string | Buffer;
|
||||
dp_clist: string | Buffer;
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
export interface grade {
|
||||
collection: "grade";
|
||||
version: number;
|
||||
|
||||
style: number;
|
||||
gradeId: number;
|
||||
|
||||
maxStage: number;
|
||||
archive: number; // typo: achieve //
|
||||
}
|
||||
|
|
@ -1,171 +0,0 @@
|
|||
export interface lightning_settings {
|
||||
collection: "lightning_settings";
|
||||
version: number;
|
||||
|
||||
headphone_vol: number;
|
||||
|
||||
resistance_sp_left: number;
|
||||
resistance_sp_right: number;
|
||||
resistance_dp_left: number;
|
||||
resistance_dp_right: number;
|
||||
|
||||
slider: number[];
|
||||
light: number[];
|
||||
concentration: number;
|
||||
|
||||
keyboard_kind: number; // epolis //
|
||||
brightness: number;
|
||||
}
|
||||
|
||||
export interface lightning_playdata {
|
||||
collection: "lightning_playdata";
|
||||
|
||||
version: number;
|
||||
|
||||
sp_num: number;
|
||||
dp_num: number;
|
||||
}
|
||||
|
||||
export interface lightning_custom {
|
||||
collection: "lightning_custom";
|
||||
version: number;
|
||||
|
||||
premium_skin: number;
|
||||
premium_bg: number;
|
||||
}
|
||||
|
||||
export interface eisei_grade {
|
||||
collection: "eisei_grade";
|
||||
version: number;
|
||||
|
||||
clear_type: number;
|
||||
grade_id: number;
|
||||
grade_type: number;
|
||||
stage_num: number;
|
||||
option: number;
|
||||
|
||||
past_achievement: number[];
|
||||
past_selected_course: number[];
|
||||
max_past_achievement: number[];
|
||||
max_past_selected_course: number[];
|
||||
}
|
||||
|
||||
export interface eisei_grade_data {
|
||||
clear_type: number;
|
||||
grade_id: number;
|
||||
grade_type: number;
|
||||
stage_num: number;
|
||||
option: number;
|
||||
|
||||
past: number[];
|
||||
selected_course: number[];
|
||||
max_past: number[];
|
||||
max_selected_course: number[];
|
||||
}
|
||||
|
||||
export interface lightning_musicmemo {
|
||||
collection: "lightning_musicmemo";
|
||||
version: number;
|
||||
|
||||
music_idx: number;
|
||||
play_style: number;
|
||||
music_id: number;
|
||||
}
|
||||
|
||||
export interface musicmemo_data {
|
||||
music_idx: number;
|
||||
play_style: number;
|
||||
music_id: number;
|
||||
}
|
||||
|
||||
export interface lightning_musicmemo_new {
|
||||
collection: "lightning_musicmemo_new";
|
||||
version: number;
|
||||
|
||||
folder_idx: number;
|
||||
folder_name: string;
|
||||
play_style: number;
|
||||
music_ids: number[];
|
||||
}
|
||||
|
||||
export interface musicmemo_data_new {
|
||||
folder_idx: number;
|
||||
folder_name: string;
|
||||
play_style: number;
|
||||
music_ids: number[];
|
||||
}
|
||||
|
||||
export interface lightning_musicfilter {
|
||||
collection: "lightning_musicfilter";
|
||||
version: number;
|
||||
|
||||
play_style: number;
|
||||
folder_id: number;
|
||||
filter_id: number;
|
||||
is_valid: boolean;
|
||||
value0: number;
|
||||
value1: number;
|
||||
}
|
||||
|
||||
export interface lightning_musicfilter_sort {
|
||||
collection: "lightning_musicfilter_sort";
|
||||
version: number;
|
||||
|
||||
play_style: number;
|
||||
folder_id: number;
|
||||
sort: number;
|
||||
}
|
||||
|
||||
export interface musicfilter_data {
|
||||
play_style: number;
|
||||
folder_id: number;
|
||||
filter_id: number;
|
||||
is_valid: number;
|
||||
value0: number;
|
||||
value1: number;
|
||||
}
|
||||
|
||||
export interface musicfilter_sort_data {
|
||||
play_style: number;
|
||||
folder_id: number;
|
||||
sort: number;
|
||||
}
|
||||
|
||||
export const lm_playdata = {
|
||||
sp_num: 0,
|
||||
dp_num: 0,
|
||||
};
|
||||
|
||||
export const lm_settings = {
|
||||
headphone_vol: 10,
|
||||
|
||||
resistance_sp_left: 4,
|
||||
resistance_sp_right: 4,
|
||||
resistance_dp_left: 4,
|
||||
resistance_dp_right: 4,
|
||||
|
||||
slider: [7, 7, 7, 7, 7, 15, 15],
|
||||
light: [1, 1, 1, 1, 1, 1],
|
||||
concentration: 0,
|
||||
};
|
||||
|
||||
export const lm_settings_new = {
|
||||
headphone_vol: 10,
|
||||
|
||||
resistance_sp_left: 4,
|
||||
resistance_sp_right: 4,
|
||||
resistance_dp_left: 4,
|
||||
resistance_dp_right: 4,
|
||||
|
||||
slider: [7, 7, 7, 7, 7, 15, 15],
|
||||
light: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
|
||||
concentration: 0,
|
||||
|
||||
keyboard_kind: 10, // epolis //
|
||||
brightness: 2,
|
||||
}
|
||||
|
||||
export const lm_customdata = {
|
||||
premium_skin: 0, // Icons //
|
||||
premium_bg: 0, // Background (epolis) //
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,22 +0,0 @@
|
|||
export interface profile {
|
||||
collection: "profile";
|
||||
|
||||
refid: string;
|
||||
id: number;
|
||||
idstr: string;
|
||||
name: string;
|
||||
pid: number;
|
||||
|
||||
language: number;
|
||||
total_pc: number;
|
||||
total_kbd: number;
|
||||
total_scr: number;
|
||||
}
|
||||
|
||||
export const default_profile = {
|
||||
language: -1,
|
||||
|
||||
total_pc: 0,
|
||||
total_kbd: 0,
|
||||
total_scr: 0,
|
||||
}
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
export interface expert {
|
||||
collection: "expert";
|
||||
version: number;
|
||||
coid: number;
|
||||
|
||||
cArray: number[];
|
||||
pgArray: number[];
|
||||
gArray: number[];
|
||||
optArray: number[];
|
||||
opt2Array: number[];
|
||||
esArray: number[];
|
||||
}
|
||||
|
||||
export interface ranking {
|
||||
collection: "ranking";
|
||||
version: number;
|
||||
clid: number;
|
||||
coid: number;
|
||||
|
||||
gnum: number;
|
||||
pgnum: number;
|
||||
name: string;
|
||||
opname: string;
|
||||
pid: number;
|
||||
udate: number;
|
||||
|
||||
exscore: number; // <- for sort //
|
||||
maxStage: number;
|
||||
}
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
export interface rival {
|
||||
collection: "rival";
|
||||
|
||||
play_style: number;
|
||||
|
||||
index: number;
|
||||
rival_refid: string;
|
||||
};
|
||||
|
||||
export interface rival_data {
|
||||
play_style: number;
|
||||
index: number;
|
||||
|
||||
qprodata: number[];
|
||||
profile: (string | number)[];
|
||||
pcdata: number[];
|
||||
}
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
export interface score {
|
||||
collection: "score";
|
||||
|
||||
mid: number;
|
||||
|
||||
pgArray: number[];
|
||||
gArray: number[];
|
||||
mArray: number[];
|
||||
cArray: number[];
|
||||
rArray: number[];
|
||||
esArray: number[];
|
||||
|
||||
optArray: number[];
|
||||
opt2Array: number[];
|
||||
}
|
||||
|
||||
export interface score_top {
|
||||
collection: "score_top";
|
||||
|
||||
play_style: number;
|
||||
mid: number;
|
||||
|
||||
names: string[];
|
||||
scores: number[];
|
||||
clflgs: number[];
|
||||
}
|
||||
|
||||
export interface old_score {
|
||||
music_id: number;
|
||||
|
||||
spmArray: number[];
|
||||
dpmArray: number[];
|
||||
|
||||
optArray: number[];
|
||||
opt2Array: number[];
|
||||
|
||||
option_1: number;
|
||||
option_2: number;
|
||||
}
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
export interface shop_data {
|
||||
collection: "shop_data";
|
||||
|
||||
opname: string;
|
||||
pid: number;
|
||||
cls_opt: number;
|
||||
}
|
||||
|
||||
export interface convention_data {
|
||||
collection: "shop_convention";
|
||||
|
||||
version: number;
|
||||
|
||||
music_0: number;
|
||||
music_1: number;
|
||||
music_2: number;
|
||||
music_3: number;
|
||||
valid: boolean;
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
export interface tutorial {
|
||||
collection: "tutorial";
|
||||
version: number;
|
||||
tid: number;
|
||||
|
||||
clr: number;
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
export interface world_tourism {
|
||||
collection: "world_tourism";
|
||||
version: number;
|
||||
|
||||
tour_id: number;
|
||||
progress: number;
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
pc(status="0")
|
||||
pcdata(id=profile.id idstr=profile.idstr name=profile.name pid=profile.pid spnum=pcdata.spnum dpnum=pcdata.dpnum sach=pcdata.sach dach=pcdata.dach sflg0=pcdata.sflg0 sflg1=pcdata.sflg1 sflg2=pcdata.sflg2 gno=pcdata.gno sdhd=pcdata.sdhd sp_opt=pcdata.sp_opt dp_opt=pcdata.dp_opt dp_opt2=pcdata.dp_opt2 mcomb=pcdata.mcomb ncomb=pcdata.ncomb mode=pcdata.mode pmode=pcdata.pmode)
|
||||
grade(sgid=pcdata.sgid dgid=pcdata.dgid __type="str") #{gradeStr}
|
||||
ex(__type="str") #{exStr}
|
||||
skin(__type="str") #{skinStr}
|
||||
rlist
|
||||
- for (let rd of rArray)
|
||||
rival(rno=rd.index id=rd.profile[2] id_str=rd.profile[3] djname=rd.profile[0] pid=rd.profile[1] sg=rd.pcdata[0] dg=rd.pcdata[1] sa=rd.pcdata[2] da=rd.pcdata[3])
|
||||
gold(now_g=pcdata.gold_now all_g=pcdata.gold_all use_g=pcdata.gold_use)
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
pc(status="0")
|
||||
pcdata(id=profile.id idstr=profile.idstr name=profile.name pid=profile.pid spnum=pcdata.spnum dpnum=pcdata.dpnum sach=pcdata.sach dach=pcdata.dach sflg0=pcdata.sflg0 sflg1=pcdata.sflg1 sflg2=pcdata.sflg2 gno=pcdata.gno sdhd=pcdata.sdhd sp_opt=pcdata.sp_opt dp_opt=pcdata.dp_opt dp_opt2=pcdata.dp_opt2 mcomb=pcdata.mcomb ncomb=pcdata.ncomb mode=pcdata.mode pmode=pcdata.pmode)
|
||||
grade(sgid=pcdata.sgid dgid=pcdata.dgid __type="str") #{gradeStr}
|
||||
ex(__type="str") #{exStr}
|
||||
skin(__type="str") #{skinStr}
|
||||
rlist
|
||||
- for (let rd of rArray)
|
||||
rival(spdp=rd.play_style id=rd.profile[2] id_str=rd.profile[3] djname=rd.profile[0] pid=rd.profile[1] sg=rd.pcdata[0] dg=rd.pcdata[1] sa=rd.pcdata[2] da=rd.pcdata[3])
|
||||
visitor(anum="10" snum="10" pnum="10" vs_flg="1")
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
pc(status="0")
|
||||
pcdata(id=profile.id idstr=profile.idstr name=profile.name pid=profile.pid spnum=pcdata.spnum dpnum=pcdata.dpnum sach=pcdata.sach dach=pcdata.dach sflg0=pcdata.sflg0 sflg1=pcdata.sflg1 sflg2=pcdata.sflg2 gno=pcdata.gno sdhd=pcdata.sdhd sp_opt=pcdata.sp_opt dp_opt=pcdata.dp_opt dp_opt2=pcdata.dp_opt2 mcomb=pcdata.mcomb ncomb=pcdata.ncomb mode=pcdata.mode pmode=pcdata.pmode lift_len=pcdata.liflen)
|
||||
grade(sgid=pcdata.sgid dgid=pcdata.dgid)
|
||||
- for (let d of dArray)
|
||||
g(__type="u8" __count="4") #{d[0]} #{d[1]} #{d[2]} #{d[3]}
|
||||
ex
|
||||
- for (let e of eArray)
|
||||
e(__type="u32" __count="5") #{e[0]} #{e[1]} #{e[2]} #{e[3]} #{e[4]}
|
||||
skin(__type="u16" __count="12") #{custom.frame} #{custom.turntable} #{custom.note_burst} #{custom.menu_music} #{appendsettings} #{custom.lane_cover} 0 #{custom.category_vox} 0 0 0 0
|
||||
rlist
|
||||
- for (let rd of rArray)
|
||||
rival(spdp=rd.play_style id=rd.profile[2] id_str=rd.profile[3] djname=rd.profile[0] pid=rd.profile[1] sg=rd.pcdata[0] dg=rd.pcdata[1] sa=rd.pcdata[2] da=rd.pcdata[3])
|
||||
visitor(anum="10" snum="10" pnum="10" vs_flg="1")
|
||||
fcombo(__type="s16" __count="2") #{pcdata.fcombo[0]} #{pcdata.fcombo[1]}
|
||||
jewel(rate="100")
|
||||
jnum(__type="s64") #{pcdata.jewel_num}
|
||||
bjnum(__type="s32" __count="18") #{pcdata.jewel_bnum[0]} #{pcdata.jewel_bnum[1]} #{pcdata.jewel_bnum[2]} #{pcdata.jewel_bnum[3]} #{pcdata.jewel_bnum[4]} #{pcdata.jewel_bnum[5]} #{pcdata.jewel_bnum[6]} #{pcdata.jewel_bnum[7]} #{pcdata.jewel_bnum[8]} #{pcdata.jewel_bnum[9]} #{pcdata.jewel_bnum[10]} #{pcdata.jewel_bnum[11]} #{pcdata.jewel_bnum[12]} #{pcdata.jewel_bnum[13]} #{pcdata.jewel_bnum[14]} #{pcdata.jewel_bnum[15]} #{pcdata.jewel_bnum[16]} #{pcdata.jewel_bnum[17]}
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
pc(status="0")
|
||||
pcdata(id=profile.id idstr=profile.idstr name=profile.name pid=profile.pid spnum=pcdata.spnum dpnum=pcdata.dpnum sach=pcdata.sach dach=pcdata.dach sflg0=pcdata.sflg0 sflg1=pcdata.sflg1 gno=pcdata.gno timing=pcdata.timing sdhd=pcdata.sdhd sp_opt=pcdata.sp_opt dp_opt=pcdata.dp_opt dp_opt2=pcdata.dp_opt2 mcomb=pcdata.mcomb ncomb=pcdata.ncomb mode=pcdata.mode pmode=pcdata.pmode liflen=pcdata.liflen)
|
||||
grade(sgid=pcdata.sgid dgid=pcdata.dgid)
|
||||
- for (let d of dArray)
|
||||
g(__type="u8" __count="4") #{d[0]} #{d[1]} #{d[2]} #{d[3]}
|
||||
ex
|
||||
- for (let e of eArray)
|
||||
e(__type="u32" __count="5") #{e[0]} #{e[1]} #{e[2]} #{e[3]} #{e[4]}
|
||||
skin(__type="u16" __count="12") #{custom.frame} #{custom.turntable} #{custom.note_burst} #{custom.menu_music} #{appendsettings} #{custom.lane_cover} 0 #{custom.category_vox} 0 0 0 0
|
||||
rlist
|
||||
- for (let rd of rArray)
|
||||
rival(spdp=rd.play_style id=rd.profile[2] id_str=rd.profile[3] djname=rd.profile[0] pid=rd.profile[1] sg=rd.pcdata[0] dg=rd.pcdata[1] sa=rd.pcdata[2] da=rd.pcdata[3])
|
||||
visitor(anum="10" snum="10" pnum="10" vs_flg="1")
|
||||
fcombo(__type="s16" __count="2") #{pcdata.fcombo[0]} #{pcdata.fcombo[1]}
|
||||
party
|
||||
fnum(__type="s32" __count="24") #{pcdata.party[0]} #{pcdata.party[1]} #{pcdata.party[2]} #{pcdata.party[3]} #{pcdata.party[4]} #{pcdata.party[5]} #{pcdata.party[6]} #{pcdata.party[7]} #{pcdata.party[8]} #{pcdata.party[9]} #{pcdata.party[10]} #{pcdata.party[11]} #{pcdata.party[12]} #{pcdata.party[13]} #{pcdata.party[14]} #{pcdata.party[15]} #{pcdata.party[16]} #{pcdata.party[17]} #{pcdata.party[18]} #{pcdata.party[19]} #{pcdata.party[20]} #{pcdata.party[21]} #{pcdata.party[22]} #{pcdata.party[23]}
|
||||
jubeat(jflg_0="-1" jflg_1="-1" jflg_2="-1" jflg_3="-1")
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
pc(status="0")
|
||||
pcdata(id=profile.id idstr=profile.idstr name=profile.name pid=profile.pid spnum=pcdata.spnum dpnum=pcdata.dpnum sach=pcdata.sach dach=pcdata.dach sflg0=pcdata.sflg0 sflg1=pcdata.sflg1 gno=pcdata.gno timing=pcdata.timing sdhd=pcdata.sdhd sp_opt=pcdata.sp_opt dp_opt=pcdata.dp_opt dp_opt2=pcdata.dp_opt2 mcomb=pcdata.mcomb ncomb=pcdata.ncomb mode=pcdata.mode pmode=pcdata.pmode liflen=pcdata.liflen)
|
||||
grade(sgid=pcdata.sgid dgid=pcdata.dgid)
|
||||
- for (let d of dArray)
|
||||
g(__type="u8" __count="4") #{d[0]} #{d[1]} #{d[2]} #{d[3]}
|
||||
ex
|
||||
skin(__type="u16" __count="12") #{custom.frame} #{custom.turntable} #{custom.note_burst} #{custom.menu_music} #{appendsettings} #{custom.lane_cover} 0 #{custom.category_vox} 0 0 0 0
|
||||
rlist
|
||||
- for (let rd of rArray)
|
||||
rival(spdp=rd.play_style id=rd.profile[2] id_str=rd.profile[3] djname=rd.profile[0] pid=rd.profile[1] sg=rd.pcdata[0] dg=rd.pcdata[1] sa=rd.pcdata[2] da=rd.pcdata[3])
|
||||
visitor(anum="10" snum="10" pnum="10" vs_flg="1")
|
||||
fcombo(__type="s16" __count="2") #{pcdata.fcombo[0]} #{pcdata.fcombo[1]}
|
||||
lincle(comflg="1" flg1="-1" flg2="-1" flg3="-1" flg4="-1" flg5="-1" flg6="-1" flg7="-1" refcomp="1")
|
||||
reflec(tf="1" br="1" ssc="1" sr="1" wu="1" sg="1" tb="1")
|
||||
jubeat(jflg_0="-1" jflg_1="-1" jflg_2="-1" jflg_3="-1")
|
||||
if event != null
|
||||
tour(pt=event.pt rsv=event.rsv r0=event.r0 r1=event.r1 r2=event.r2 r3=event.r3 r4=event.r4 r5=event.r5 r6=event.r6 r7=event.r7)
|
||||
cf(__type="bin") #{event.cf}
|
||||
pf(__type="bin") #{event.pf}
|
||||
mf(__type="bin") #{event.mf}
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
pc(status="0")
|
||||
pcdata(id=profile.id idstr=profile.idstr name=profile.name pid=profile.pid spnum=pcdata.spnum dpnum=pcdata.dpnum sach=pcdata.sach dach=pcdata.dach sflg0=pcdata.sflg0 sflg1=pcdata.sflg1 help=pcdata.help gno=pcdata.gno timing=pcdata.timing sdhd=pcdata.sdhd sdtype=pcdata.sdtype notes=pcdata.notes pase=pcdata.pase sp_opt=pcdata.sp_opt dp_opt=pcdata.dp_opt dp_opt2=pcdata.dp_opt2 mode=pcdata.mode pmode=pcdata.pmode liflen=pcdata.liflen)
|
||||
grade(sgid=pcdata.sgid dgid=pcdata.dgid)
|
||||
- for (let d of dArray)
|
||||
g(__type="u8" __count="4") #{d[0]} #{d[1]} #{d[2]} #{d[3]}
|
||||
ex
|
||||
skin(__type="s16" __count="14") #{custom.frame} #{custom.turntable} #{custom.note_burst} #{custom.menu_music} #{appendsettings} #{custom.lane_cover} 0 #{custom.category_vox} #{custom.note_skin} #{custom.full_combo_splash} 0 #{Number(custom.disable_musicpreview)} 0 0
|
||||
qprodata(__type="u32" __count="5") #{custom.qpro_head} #{custom.qpro_hair} #{custom.qpro_face} #{custom.qpro_hand} #{custom.qpro_body}
|
||||
rlist
|
||||
- for (let rd of rArray)
|
||||
rival(spdp=rd.play_style id=rd.profile[2] id_str=rd.profile[3] djname=rd.profile[0] pid=rd.profile[1] sg=rd.pcdata[0] dg=rd.pcdata[1] sa=rd.pcdata[2] da=rd.pcdata[3])
|
||||
qprodata(body=rd.qprodata[3] face=rd.qprodata[2] hair=rd.qprodata[0] hand=rd.qprodata[4] head=rd.qprodata[1])
|
||||
ocrs
|
||||
//-weekly(wid="-1" mid="-1")
|
||||
visitor(anum="10" snum="10" pnum="10" vs_flg="1")
|
||||
fcombo(__type="s16" __count="2") #{pcdata.fcombo[0]} #{pcdata.fcombo[1]}
|
||||
step(sp_ach=pcdata.st_sp_ach dp_ach=pcdata.st_dp_ach sp_dif=pcdata.st_sp_dif dp_dif=pcdata.st_dp_dif)
|
||||
lincle(comflg="1" flg1="-1" flg2="-1" flg3="-1" flg4="-1" flg5="-1" flg6="-1" flg7="-1")
|
||||
reflec(tf="1" br="1" ssc="1" sr="1" wu="1" sg="1" tb="1")
|
||||
jubeat(point="0" bonus="0" jbonus=pcdata.jpoint open="1")
|
||||
if event != null
|
||||
kingdom(level=event.level exp=event.exp deller=event.deller place=event.place tower=event.tower boss=event.boss combo=event.combo jewel=event.jewel generic=event.generic)
|
||||
cf(__type="bin") #{event.cf}
|
||||
qcf(__type="bin") #{event.qcf}
|
||||
piece(__type="bin") #{event.piece}
|
||||
history
|
||||
type(__type="u8" __count="30") #{pcdata.type[0]} #{pcdata.type[1]} #{pcdata.type[2]} #{pcdata.type[3]} #{pcdata.type[4]} #{pcdata.type[5]} #{pcdata.type[6]} #{pcdata.type[7]} #{pcdata.type[8]} #{pcdata.type[9]} #{pcdata.type[10]} #{pcdata.type[11]} #{pcdata.type[12]} #{pcdata.type[13]} #{pcdata.type[14]} #{pcdata.type[15]} #{pcdata.type[16]} #{pcdata.type[17]} #{pcdata.type[18]} #{pcdata.type[19]} #{pcdata.type[20]} #{pcdata.type[21]} #{pcdata.type[22]} #{pcdata.type[23]} #{pcdata.type[24]} #{pcdata.type[25]} #{pcdata.type[26]} #{pcdata.type[27]} #{pcdata.type[28]} #{pcdata.type[29]}
|
||||
time(__type="time" __count="30") #{pcdata.time[0]} #{pcdata.time[1]} #{pcdata.time[2]} #{pcdata.time[3]} #{pcdata.time[4]} #{pcdata.time[5]} #{pcdata.time[6]} #{pcdata.time[7]} #{pcdata.time[8]} #{pcdata.time[9]} #{pcdata.time[10]} #{pcdata.time[11]} #{pcdata.time[12]} #{pcdata.time[13]} #{pcdata.time[14]} #{pcdata.time[15]} #{pcdata.time[16]} #{pcdata.time[17]} #{pcdata.time[18]} #{pcdata.time[19]} #{pcdata.time[20]} #{pcdata.time[21]} #{pcdata.time[22]} #{pcdata.time[23]} #{pcdata.time[24]} #{pcdata.time[25]} #{pcdata.time[26]} #{pcdata.time[27]} #{pcdata.time[28]} #{pcdata.time[29]}
|
||||
param0(__type="s32" __count="30") #{pcdata.p0[0]} #{pcdata.p0[1]} #{pcdata.p0[2]} #{pcdata.p0[3]} #{pcdata.p0[4]} #{pcdata.p0[5]} #{pcdata.p0[6]} #{pcdata.p0[7]} #{pcdata.p0[8]} #{pcdata.p0[9]} #{pcdata.p0[10]} #{pcdata.p0[11]} #{pcdata.p0[12]} #{pcdata.p0[13]} #{pcdata.p0[14]} #{pcdata.p0[15]} #{pcdata.p0[16]} #{pcdata.p0[17]} #{pcdata.p0[18]} #{pcdata.p0[19]} #{pcdata.p0[20]} #{pcdata.p0[21]} #{pcdata.p0[22]} #{pcdata.p0[23]} #{pcdata.p0[24]} #{pcdata.p0[25]} #{pcdata.p0[26]} #{pcdata.p0[27]} #{pcdata.p0[28]} #{pcdata.p0[29]}
|
||||
param1(__type="s32" __count="30") #{pcdata.p1[0]} #{pcdata.p1[1]} #{pcdata.p1[2]} #{pcdata.p1[3]} #{pcdata.p1[4]} #{pcdata.p1[5]} #{pcdata.p1[6]} #{pcdata.p1[7]} #{pcdata.p1[8]} #{pcdata.p1[9]} #{pcdata.p1[10]} #{pcdata.p1[11]} #{pcdata.p1[12]} #{pcdata.p1[13]} #{pcdata.p1[14]} #{pcdata.p1[15]} #{pcdata.p1[16]} #{pcdata.p1[17]} #{pcdata.p1[18]} #{pcdata.p1[19]} #{pcdata.p1[20]} #{pcdata.p1[21]} #{pcdata.p1[22]} #{pcdata.p1[23]} #{pcdata.p1[24]} #{pcdata.p1[25]} #{pcdata.p1[26]} #{pcdata.p1[27]} #{pcdata.p1[28]} #{pcdata.p1[29]}
|
||||
param2(__type="s32" __count="30") #{pcdata.p2[0]} #{pcdata.p2[1]} #{pcdata.p2[2]} #{pcdata.p2[3]} #{pcdata.p2[4]} #{pcdata.p2[5]} #{pcdata.p2[6]} #{pcdata.p2[7]} #{pcdata.p2[8]} #{pcdata.p2[9]} #{pcdata.p2[10]} #{pcdata.p2[11]} #{pcdata.p2[12]} #{pcdata.p2[13]} #{pcdata.p2[14]} #{pcdata.p2[15]} #{pcdata.p2[16]} #{pcdata.p2[17]} #{pcdata.p2[18]} #{pcdata.p2[19]} #{pcdata.p2[20]} #{pcdata.p2[21]} #{pcdata.p2[22]} #{pcdata.p2[23]} #{pcdata.p2[24]} #{pcdata.p2[25]} #{pcdata.p2[26]} #{pcdata.p2[27]} #{pcdata.p2[28]} #{pcdata.p2[29]}
|
||||
param3(__type="s32" __count="30") #{pcdata.p3[0]} #{pcdata.p3[1]} #{pcdata.p3[2]} #{pcdata.p3[3]} #{pcdata.p3[4]} #{pcdata.p3[5]} #{pcdata.p3[6]} #{pcdata.p3[7]} #{pcdata.p3[8]} #{pcdata.p3[9]} #{pcdata.p3[10]} #{pcdata.p3[11]} #{pcdata.p3[12]} #{pcdata.p3[13]} #{pcdata.p3[14]} #{pcdata.p3[15]} #{pcdata.p3[16]} #{pcdata.p3[17]} #{pcdata.p3[18]} #{pcdata.p3[19]} #{pcdata.p3[20]} #{pcdata.p3[21]} #{pcdata.p3[22]} #{pcdata.p3[23]} #{pcdata.p3[24]} #{pcdata.p3[25]} #{pcdata.p3[26]} #{pcdata.p3[27]} #{pcdata.p3[28]} #{pcdata.p3[29]}
|
||||
param4(__type="s32" __count="30") #{pcdata.p4[0]} #{pcdata.p4[1]} #{pcdata.p4[2]} #{pcdata.p4[3]} #{pcdata.p4[4]} #{pcdata.p4[5]} #{pcdata.p4[6]} #{pcdata.p4[7]} #{pcdata.p4[8]} #{pcdata.p4[9]} #{pcdata.p4[10]} #{pcdata.p4[11]} #{pcdata.p4[12]} #{pcdata.p4[13]} #{pcdata.p4[14]} #{pcdata.p4[15]} #{pcdata.p4[16]} #{pcdata.p4[17]} #{pcdata.p4[18]} #{pcdata.p4[19]} #{pcdata.p4[20]} #{pcdata.p4[21]} #{pcdata.p4[22]} #{pcdata.p4[23]} #{pcdata.p4[24]} #{pcdata.p4[25]} #{pcdata.p4[26]} #{pcdata.p4[27]} #{pcdata.p4[28]} #{pcdata.p4[29]}
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
IIDX21pc(status="0")
|
||||
pcdata(id=profile.id idstr=profile.idstr name=profile.name pid=profile.pid spnum=pcdata.spnum dpnum=pcdata.dpnum sach=pcdata.sach dach=pcdata.dach mode=pcdata.mode pmode=pcdata.pmode rtype=pcdata.rtype sp_opt=pcdata.sp_opt dp_opt=pcdata.dp_opt dp_opt2=pcdata.dp_opt2 gpos=pcdata.gpos s_sorttype=pcdata.s_sorttype d_sorttype=pcdata.d_sorttype s_pace=pcdata.s_pace d_pace=pcdata.d_pace s_gno=pcdata.s_gno d_gno=pcdata.d_gno s_gtype=pcdata.s_gtype d_gtype=pcdata.d_gtype s_sdlen=pcdata.s_sdlen d_sdlen=pcdata.d_sdlen s_sdtype=pcdata.s_sdtype d_sdtype=pcdata.d_sdtype s_timing=pcdata.s_timing d_timing=pcdata.d_timing s_notes=pcdata.s_notes d_notes=pcdata.d_notes s_judge=pcdata.s_judge d_judge=pcdata.d_judge s_judgeAdj=pcdata.s_judgeAdj d_judgeAdj=pcdata.d_judgeAdj s_hispeed=pcdata.s_hispeed d_hispeed=pcdata.d_hispeed s_liflen=pcdata.s_liflen d_liflen=pcdata.d_liflen s_disp_judge=pcdata.s_disp_judge d_disp_judge=pcdata.d_disp_judge s_opstyle=pcdata.s_opstyle d_opstyle=pcdata.d_opstyle)
|
||||
spdp_rival(flg="-1")
|
||||
bind_eaappli
|
||||
secret
|
||||
flg1(__type="s64" __count="2") -1 -1
|
||||
flg2(__type="s64" __count="2") -1 -1
|
||||
flg3(__type="s64" __count="2") -1 -1
|
||||
if pcdata.sp_mlist != null
|
||||
favorite
|
||||
sp_mlist(__type="bin") #{pcdata.sp_mlist}
|
||||
sp_clist(__type="bin") #{pcdata.sp_clist}
|
||||
dp_mlist(__type="bin") #{pcdata.dp_mlist}
|
||||
dp_clist(__type="bin") #{pcdata.dp_clist}
|
||||
qpro_secret
|
||||
head(__type="s64" __count="3") -1 -1 -1
|
||||
hair(__type="s64" __count="3") -1 -1 -1
|
||||
face(__type="s64" __count="3") -1 -1 -1
|
||||
body(__type="s64" __count="3") -1 -1 -1
|
||||
hand(__type="s64" __count="3") -1 -1 -1
|
||||
grade(sgid=pcdata.sgid dgid=pcdata.dgid)
|
||||
- for (let d of dArray)
|
||||
g(__type="u8" __count="4") #{d[0]} #{d[1]} #{d[2]} #{d[3]}
|
||||
skin(__type="s16" __count="14") #{custom.frame} #{custom.turntable} #{custom.note_burst} #{custom.menu_music} #{appendsettings} #{custom.lane_cover} 0 #{custom.category_vox} #{custom.note_skin} #{custom.full_combo_splash} 0 #{Number(custom.disable_musicpreview)} 0 0
|
||||
qprodata(__type="u32" __count="5") #{custom.qpro_head} #{custom.qpro_hair} #{custom.qpro_face} #{custom.qpro_hand} #{custom.qpro_body}
|
||||
rlist
|
||||
- for (let rd of rArray)
|
||||
rival(spdp=rd.play_style id=rd.profile[2] id_str=rd.profile[3] djname=rd.profile[0] pid=rd.profile[1] sg=rd.pcdata[0] dg=rd.pcdata[1] sa=rd.pcdata[2] da=rd.pcdata[3])
|
||||
stepdata(step_sach=rd.pcdata[4] step_dach=rd.pcdata[5])
|
||||
qprodata(body=rd.qprodata[3] face=rd.qprodata[2] hair=rd.qprodata[0] hand=rd.qprodata[4] head=rd.qprodata[1])
|
||||
shop(name=shop_data.opname)
|
||||
join_shop(joinflg="1" join_cflg="1" join_id="ea" join_name=shop_data.opname)
|
||||
visitor(anum="10" snum="10" pnum="10" vs_flg="1")
|
||||
if pcdata.st_album != null
|
||||
step(damage=pcdata.st_damage defeat=pcdata.st_defeat progress=pcdata.st_progress round=pcdata.st_round sp_mission=pcdata.st_sp_mission dp_mission=pcdata.st_dp_mission sp_level=pcdata.st_sp_level dp_level=pcdata.st_dp_level sp_mplay=pcdata.st_sp_mplay dp_mplay=pcdata.st_dp_mplay last_select=pcdata.st_last_select)
|
||||
album(__type="bin") #{pcdata.st_album}
|
||||
//-step_assist(iidx_id iidx_id_str name hair head face body hand)
|
||||
achievements(pack=pcdata.achi_pack pack_comp=pcdata.achi_packcomp last_weekly=pcdata.achi_lastweekly weekly_num=pcdata.achi_weeklynum visit_flg=pcdata.achi_visitflg rival_crush=pcdata.achi_rivalcrush)
|
||||
trophy(__type="s64" __count="10") #{pcdata.achi_trophy[0]} #{pcdata.achi_trophy[1]} #{pcdata.achi_trophy[2]} #{pcdata.achi_trophy[3]} #{pcdata.achi_trophy[4]} #{pcdata.achi_trophy[5]} #{pcdata.achi_trophy[6]} #{pcdata.achi_trophy[7]} #{pcdata.achi_trophy[8]} #{pcdata.achi_trophy[9]}
|
||||
if link5 != null
|
||||
link5(qpro=link5.qpro glass=link5.glass treasure="0" beautiful=link5.beautiful quaver=link5.quaver castle=link5.castle flip=link5.flip titans=link5.titans exusia=link5.exusia waxing=link5.waxing sampling=link5.sampling beachside=link5.beachside cuvelia=link5.cuvelia reunion=link5.reunion bad=link5.bad turii=link5.turii anisakis=link5.anisakis second=link5.second whydidyou=link5.whydidyou china=link5.china fallen=link5.fallen broken=link5.broken summer=link5.summer sakura=link5.sakura wuv=link5.wuv survival=link5.survival thunder=link5.thunder qproflg="0" glassflg="0" reflec_data="0")
|
||||
//-cafe(food pastry rainbow beastie astraia beachimp holysnow trueblue ledvsscu service is_first)
|
||||
gakuen(music_list="-1")
|
||||
baseball(music_list="-1")
|
||||
if tricolettepark != null
|
||||
tricolettepark(open_music=tricolettepark.open_music boss0_damage=tricolettepark.boss0_damage boss1_damage=tricolettepark.boss1_damage boss2_damage=tricolettepark.boss2_damage boss3_damage=tricolettepark.boss3_damage boss0_stun=tricolettepark.boss0_stun boss1_stun=tricolettepark.boss1_stun boss2_stun=tricolettepark.boss2_stun boss3_stun=tricolettepark.boss3_stun magic_gauge="0" party="0" is_union="0" attack_rate="1")
|
||||
pyramid(music_list="-1" item_list="-1" statue_0="0" statue_1="0" statue_2="0")
|
||||
deller(deller=pcdata.deller rate="1")
|
||||
orb_data(rest_orb=pcdata.orb)
|
||||
if boss1 != null
|
||||
boss1(stamina=boss1.stamina attack=boss1.attack item_flg=boss1.item_flg item_flg2=boss1.item_flg2 pick=boss1.pick row0=boss1.row0 row1=boss1.row1 row2=boss1.row2 row3=boss1.row3 column0=boss1.column0 column1=boss1.column1 column2=boss1.column2 column3=boss1.column3 map=boss1.map job=boss1.job general=boss1.general battle=boss1.battle boss0_n=boss1.boss0_n boss0_h=boss1.boss0_h boss0_a=boss1.boss0_a boss1_n=boss1.boss1_n boss1_h=boss1.boss1_h boss1_a=boss1.boss1_a boss2_n=boss1.boss2_n boss2_h=boss1.boss2_h boss2_a=boss1.boss2_a item1="0" item2="0" item3="0" boss_scene=boss1.boss_scene boss0_damage=boss1.boss0_damage boss1_damage=boss1.boss1_damage boss2_damage=boss1.boss2_damage boss3_damage=boss1.boss3_damage boss4_damage=boss1.boss4_damage boss5_damage=boss1.boss5_damage boss6_damage=boss1.boss6_damage)
|
||||
durability(__type="bin") #{boss1.durability}
|
||||
level(__type="s32" __count="28") #{boss1.level[0]} #{boss1.level[1]} #{boss1.level[2]} #{boss1.level[3]} #{boss1.level[4]} #{boss1.level[5]} #{boss1.level[6]}
|
||||
//-boss1_phase4(map_clear_flg)
|
||||
new_durability
|
||||
//-superstar(achieve_flg)
|
||||
|
|
@ -1,67 +0,0 @@
|
|||
IIDX22pc(status="0")
|
||||
pcdata(id=profile.id idstr=profile.idstr name=profile.name pid=profile.pid spnum=pcdata.spnum dpnum=pcdata.dpnum sach=pcdata.sach dach=pcdata.dach mode=pcdata.mode pmode=pcdata.pmode rtype=pcdata.rtype sp_opt=pcdata.sp_opt dp_opt=pcdata.dp_opt dp_opt2=pcdata.dp_opt2 gpos=pcdata.gpos s_sorttype=pcdata.s_sorttype d_sorttype=pcdata.d_sorttype s_pace=pcdata.s_pace d_pace=pcdata.d_pace s_gno=pcdata.s_gno d_gno=pcdata.d_gno s_gtype=pcdata.s_gtype d_gtype=pcdata.d_gtype s_sdlen=pcdata.s_sdlen d_sdlen=pcdata.d_sdlen s_sdtype=pcdata.s_sdtype d_sdtype=pcdata.d_sdtype s_timing=pcdata.s_timing d_timing=pcdata.d_timing s_notes=pcdata.s_notes d_notes=pcdata.d_notes s_judge=pcdata.s_judge d_judge=pcdata.d_judge s_judgeAdj=pcdata.s_judgeAdj d_judgeAdj=pcdata.d_judgeAdj s_hispeed=pcdata.s_hispeed d_hispeed=pcdata.d_hispeed s_liflen=pcdata.s_liflen d_liflen=pcdata.d_liflen s_disp_judge=pcdata.s_disp_judge d_disp_judge=pcdata.d_disp_judge s_opstyle=pcdata.s_opstyle d_opstyle=pcdata.d_opstyle s_exscore=pcdata.s_exscore d_exscore=pcdata.d_exscore s_largejudge=pcdata.s_largejudge d_largejudge=pcdata.d_largejudge)
|
||||
spdp_rival(flg="-1")
|
||||
bind_eaappli
|
||||
secret
|
||||
flg1(__type="s64" __count="3") -1 -1 -1
|
||||
flg2(__type="s64" __count="3") -1 -1 -1
|
||||
flg3(__type="s64" __count="3") -1 -1 -1
|
||||
if pcdata.sp_mlist != null
|
||||
favorite
|
||||
sp_mlist(__type="bin") #{pcdata.sp_mlist}
|
||||
sp_clist(__type="bin") #{pcdata.sp_clist}
|
||||
dp_mlist(__type="bin") #{pcdata.dp_mlist}
|
||||
dp_clist(__type="bin") #{pcdata.dp_clist}
|
||||
qpro_secret
|
||||
head(__type="s64" __count="4") -1 -1 -1 -1
|
||||
hair(__type="s64" __count="4") -1 -1 -1 -1
|
||||
face(__type="s64" __count="4") -1 -1 -1 -1
|
||||
body(__type="s64" __count="4") -1 -1 -1 -1
|
||||
hand(__type="s64" __count="4") -1 -1 -1 -1
|
||||
grade(sgid=pcdata.sgid dgid=pcdata.dgid)
|
||||
- for (let d of dArray)
|
||||
g(__type="u8" __count="4") #{d[0]} #{d[1]} #{d[2]} #{d[3]}
|
||||
skin(__type="s16" __count="14") #{custom.frame} #{custom.turntable} #{custom.note_burst} #{custom.menu_music} #{appendsettings} #{custom.lane_cover} 0 #{custom.category_vox} #{custom.note_skin} #{custom.full_combo_splash} 0 #{Number(custom.disable_musicpreview)} 0 0
|
||||
qprodata(__type="u32" __count="5") #{custom.qpro_head} #{custom.qpro_hair} #{custom.qpro_face} #{custom.qpro_hand} #{custom.qpro_body}
|
||||
rlist
|
||||
- for (let rd of rArray)
|
||||
rival(spdp=rd.play_style id=rd.profile[2] id_str=rd.profile[3] djname=rd.profile[0] pid=rd.profile[1] sg=rd.pcdata[0] dg=rd.pcdata[1] sa=rd.pcdata[2] da=rd.pcdata[3])
|
||||
stepdata(step_sach=rd.pcdata[4] step_dach=rd.pcdata[5])
|
||||
qprodata(body=rd.qprodata[3] face=rd.qprodata[2] hair=rd.qprodata[0] hand=rd.qprodata[4] head=rd.qprodata[1])
|
||||
shop(name=shop_data.opname)
|
||||
join_shop(joinflg="1" join_cflg="1" join_id="ea" join_name=shop_data.opname)
|
||||
visitor(anum="10" snum="10" pnum="10" vs_flg="1")
|
||||
if pcdata.st_album != null
|
||||
step(damage=pcdata.st_damage defeat=pcdata.st_defeat progress=pcdata.st_progress round=pcdata.st_round sp_mission=pcdata.st_sp_mission dp_mission=pcdata.st_dp_mission sp_level=pcdata.st_sp_level dp_level=pcdata.st_dp_level sp_mplay=pcdata.st_sp_mplay dp_mplay=pcdata.st_dp_mplay age_list=pcdata.st_age_list is_secret=pcdata.st_is_secret is_present=pcdata.st_is_present is_future=pcdata.st_is_future)
|
||||
album(__type="bin") #{pcdata.st_album}
|
||||
//-step_assist(iidx_id iidx_id_str name hair head face body hand)
|
||||
if chrono_diver != null
|
||||
chrono_diver(play_count=chrono_diver.play_count present_unlock=chrono_diver.present_unlock future_unlock=chrono_diver.future_unlock success_count_0_n=chrono_diver.success_count_0_n success_count_0_h=chrono_diver.success_count_0_h success_count_0_a=chrono_diver.success_count_0_a success_count_1_n=chrono_diver.success_count_1_n success_count_1_h=chrono_diver.success_count_1_h success_count_1_a=chrono_diver.success_count_1_a success_count_2_n=chrono_diver.success_count_2_n success_count_2_h=chrono_diver.success_count_2_h success_count_2_a=chrono_diver.success_count_2_a success_count_3_n=chrono_diver.success_count_3_n success_count_3_h=chrono_diver.success_count_3_h success_count_3_a=chrono_diver.success_count_3_a story_list=chrono_diver.story_list)
|
||||
if qpronicle_chord != null
|
||||
qpronicle_chord(is_first_select_map=qpronicle_chord.is_first_select_map last_select_map=qpronicle_chord.last_select_map story_view_list=qpronicle_chord.story_view_list is_login_bonus=qpronicle_chord.is_use_login_bonus patona_leader=qpronicle_chord.patona_leader patona_sub_1=qpronicle_chord.patona_sub_1 patona_sub_2=qpronicle_chord.patona_sub_2 rare_enemy_damage1=qpronicle_chord.rare_enemy_damage1 rare_enemy_damage2=qpronicle_chord.rare_enemy_damage2 rare_enemy_damage3=qpronicle_chord.rare_enemy_damage3 rare_enemy_damage4=qpronicle_chord.rare_enemy_damage4 rare_enemy_damage5=qpronicle_chord.rare_enemy_damage5)
|
||||
- for (let evt of qpronicle_chord_sub)
|
||||
patona_data(patona_no=evt.patona_id level=evt.level exp=evt.exp affection=evt.affection dissatisfaction=evt.dissatisfaction)
|
||||
if qpronicle_phase3 != null
|
||||
qpronicle_phase3(stairs_num=qpronicle_phase3.stairs_num flame_list=qpronicle_phase3.flame_list lane_list=qpronicle_phase3.lane_list map0_select=qpronicle_phase3.map0_select map1_select=qpronicle_phase3.map1_select map2_select=qpronicle_phase3.map2_select map3_select=qpronicle_phase3.map3_select map4_select=qpronicle_phase3.map4_select map5_select=qpronicle_phase3.map5_select map6_select=qpronicle_phase3.map6_select is_love_scene_skip="1")
|
||||
qpronicle_love(music_list="-1")
|
||||
boss_event_3(music_list="-1" bonus_point=pendual_talis.point)
|
||||
//-chaser(phase attack exist_age summon_gate success failed damage_point boss_hp)
|
||||
ues_music(__type="u32" __count="40")
|
||||
achievements(pack=pcdata.achi_pack pack_comp=pcdata.achi_packcomp last_weekly=pcdata.achi_lastweekly weekly_num=pcdata.achi_weeklynum visit_flg=pcdata.achi_visitflg rival_crush=pcdata.achi_rivalcrush)
|
||||
trophy(__type="s64" __count="10") #{pcdata.achi_trophy[0]} #{pcdata.achi_trophy[1]} #{pcdata.achi_trophy[2]} #{pcdata.achi_trophy[3]} #{pcdata.achi_trophy[4]} #{pcdata.achi_trophy[5]} #{pcdata.achi_trophy[6]} #{pcdata.achi_trophy[7]} #{pcdata.achi_trophy[8]} #{pcdata.achi_trophy[9]}
|
||||
old_linked_event(gakuen_list="-1" baseball_list="-1" tricolette_list="-1" cafedetran_list="-1")
|
||||
pyramid(music_list="-1" item_list="-1" statue_0="0" statue_1="0" statue_2="0")
|
||||
reflec_collabo(collabo_phase="2" phase1_iidx_play="10" phase2_iidx_play="10" phase1_reflec_play="10" phase2_reflec_play="10" phase1_music_list="-1" phase2_music_list="-1" phase1_iidx_item="-1" phase2_iidx_item="-1" phase1_reflec_item="-1" phase2_reflec_item="-1")
|
||||
destiny_catharsis(music_bit="-1")
|
||||
bemani_summer_collabo(music_bit="-1")
|
||||
deller(deller=pcdata.deller rate="1")
|
||||
orb_data(rest_orb=pcdata.orb)
|
||||
time_sandglass(item_num="10")
|
||||
present_time_sandglass(item_num="10")
|
||||
sound_holic(music_list="-1" announce_list="-1")
|
||||
cc_collabo_music(music_list="-1")
|
||||
cc_collabo_data(customize_list="-1" new_get_customize="1" new_open_music="1" new_consume_drink="1")
|
||||
beatstream_collabo(music_list="-1")
|
||||
konami_stytle
|
||||
is_skip(__type="bool") 1
|
||||
floor_infection(music_list="-1")
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user