From 844dd6c4d121761781efd72945421c98c470cfc8 Mon Sep 17 00:00:00 2001 From: duel0213 Date: Wed, 9 Oct 2024 11:23:39 +0900 Subject: [PATCH] IIDX: Initial support added for EPOLIS IIDX: Bug fixes and Enhancements --- iidx@asphyxia/README.md | 23 +- iidx@asphyxia/data/grade.json | 40 + iidx@asphyxia/data/music_open.json | 60 + iidx@asphyxia/handlers/gamesystem.ts | 75 + iidx@asphyxia/handlers/grade.ts | 73 +- iidx@asphyxia/handlers/music.ts | 3 +- iidx@asphyxia/handlers/pc.ts | 1551 +++++++++++++------ iidx@asphyxia/handlers/webui.ts | 47 +- iidx@asphyxia/index.ts | 67 +- iidx@asphyxia/models/custom.ts | 12 + iidx@asphyxia/models/lightning.ts | 44 +- iidx@asphyxia/models/pcdata.ts | 136 +- iidx@asphyxia/models/score.ts | 2 +- iidx@asphyxia/pug/KDZ/pcget.pug | 2 +- iidx@asphyxia/pug/LDJ/21pcget.pug | 2 +- iidx@asphyxia/pug/LDJ/22pcget.pug | 2 +- iidx@asphyxia/pug/LDJ/23pcget.pug | 2 +- iidx@asphyxia/pug/LDJ/24pcget.pug | 2 +- iidx@asphyxia/pug/LDJ/25pcget.pug | 2 +- iidx@asphyxia/pug/LDJ/26pcget.pug | 2 +- iidx@asphyxia/pug/LDJ/27pcget.pug | 2 +- iidx@asphyxia/pug/LDJ/28pcget.pug | 4 +- iidx@asphyxia/pug/LDJ/29pcget.pug | 4 +- iidx@asphyxia/pug/LDJ/30pcget.pug | 5 +- iidx@asphyxia/pug/LDJ/31pcget.pug | 108 ++ iidx@asphyxia/pug/LDJ/pcget.pug | 2 +- iidx@asphyxia/util.ts | 39 +- iidx@asphyxia/webui/asset/js/detail.js | 31 + iidx@asphyxia/webui/asset/js/setting.js | 80 + iidx@asphyxia/webui/profile_-----detail.pug | 18 +- iidx@asphyxia/webui/profile_----setting.pug | 118 +- iidx@asphyxia/webui/profile_---rival.pug | 2 +- iidx@asphyxia/webui/profile_-data.pug | 4 +- 33 files changed, 1966 insertions(+), 598 deletions(-) create mode 100644 iidx@asphyxia/data/grade.json create mode 100644 iidx@asphyxia/data/music_open.json create mode 100644 iidx@asphyxia/pug/LDJ/31pcget.pug create mode 100644 iidx@asphyxia/webui/asset/js/detail.js create mode 100644 iidx@asphyxia/webui/asset/js/setting.js diff --git a/iidx@asphyxia/README.md b/iidx@asphyxia/README.md index 6ca9104..94b850f 100644 --- a/iidx@asphyxia/README.md +++ b/iidx@asphyxia/README.md @@ -1,6 +1,6 @@ # beatmaniaIIDX -Plugin Version: **v0.1.15** +Plugin Version: **v0.1.16** --- @@ -22,6 +22,7 @@ Supported Versions - beatmaniaIIDX 28 BISTROVER (2021091500) - beatmaniaIIDX 29 CastHour (2022082400) - beatmaniaIIDX 30 RESIDENT (2023090500) + - beatmaniaIIDX 31 EPOLIS (2024082600) --- @@ -29,10 +30,11 @@ Features - STEP UP (Partial) - SKILL ANALYZER - EVENT (Partial) - - ARENA (Partial) + - ARENA (LOCAL only) - RANDOME LANE TICKET - FAVORITE/SONG SELECTION NOTES (Partial) - EXTRA FAVORITE does not support yet + - ORIGINAL FILTER --- @@ -40,9 +42,11 @@ 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 due to missing license element (needs to be verified) - - Badges aren't saving in RESIDENT ~ (needs to figure out name to id) + - Some of badges aren't saving in RESIDENT ~ (needs to figure out name to id) + - QPRO may have wrong item if you equipped item from STEP UP result (this probably caused by qpro\_secret\_flg being -1) --- @@ -136,10 +140,17 @@ Changelogs - 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 + - 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 pacemaker isn't working as intended due to malformed ghost data on music.appoint response (~ DJ TROOPERS) - Fixed where unable to login after first-play (SPADA, SINOBUZ, Rootage) - 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 doesn't get saved in WebUI \ No newline at end of file + - 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 + - Fixed where lightning settings doesn't get saved on logout + - Fixed where Disable Music Preview, Disable HCN Color, VEFX Lock settings doesn't reflect + - WebUI is now display values of corresponding version diff --git a/iidx@asphyxia/data/grade.json b/iidx@asphyxia/data/grade.json new file mode 100644 index 0000000..e1d24e3 --- /dev/null +++ b/iidx@asphyxia/data/grade.json @@ -0,0 +1,40 @@ +{ + "31": { + "0": { + "15": { + "music_id": [ 25090, 23068, 19004, 29045 ], + "class_id": [ 3, 3, 3, 3 ] + }, + "16": { + "music_id": [ 23005, 27078, 22065, 27060 ], + "class_id": [ 3, 3, 3, 3 ] + }, + "17": { + "music_id": [ 29007, 26108, 19002, 18004 ], + "class_id": [ 3, 3, 3, 3 ] + }, + "18": { + "music_id": [ 25007, 18032, 16020, 12004 ], + "class_id": [ 3, 3, 3, 3 ] + } + }, + "1": { + "15": { + "music_id": [ 15032, 29033, 27092, 30020 ], + "class_id": [ 3, 3, 3, 3 ] + }, + "16": { + "music_id": [ 10028, 26070, 28091, 23075 ], + "class_id": [ 3, 3, 3, 3 ] + }, + "17": { + "music_id": [ 26012, 28002, 17017, 28005 ], + "class_id": [ 3, 3, 3, 3 ] + }, + "18": { + "music_id": [ 28008, 15001, 19002, 9028 ], + "class_id": [ 3, 3, 3, 3 ] + } + } + } +} diff --git a/iidx@asphyxia/data/music_open.json b/iidx@asphyxia/data/music_open.json new file mode 100644 index 0000000..130943f --- /dev/null +++ b/iidx@asphyxia/data/music_open.json @@ -0,0 +1,60 @@ +{ + "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 } + } +} diff --git a/iidx@asphyxia/handlers/gamesystem.ts b/iidx@asphyxia/handlers/gamesystem.ts index 4e5bf7b..ceb0694 100644 --- a/iidx@asphyxia/handlers/gamesystem.ts +++ b/iidx@asphyxia/handlers/gamesystem.ts @@ -16,6 +16,64 @@ export const gssysteminfo: EPR = async (info, data, send) => { 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")); + if (!_.isNil(music_open[version])) { + result = { + ...result, + music_open: [], + } + + Object.keys(music_open).forEach(v => { + Object.keys(music_open[v]).forEach(m => { + if (parseInt(v) > version) return; + + result.music_open.push({ + music_id: K.ITEM("s32", parseInt(m)), + kind: K.ITEM("s32", music_open[v][m].kind), + }); + }); + }); + } + + if (version >= 31) { + result.arena_schedule = { + ...result.arena_schedule, + rule_type: K.ITEM("u8", 0), + } + + result = { + ...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")); + 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", parseInt(s)), + grade_id: K.ITEM("s32", parseInt(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", 0), + }); + }); + }); + } + } + + // arena_music_difficult // for (let s = 0; s < 2; ++s) { for (let c = 0; c < 20; ++c) { result.arena_music_difficult.push({ @@ -72,6 +130,23 @@ export const gssysteminfo: EPR = async (info, data, send) => { BPLBattleOpenPhase: K.ATTR({ val: String(2) }), } break; + case 31: + result = { + ...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(2500) }), + } + break; default: break; diff --git a/iidx@asphyxia/handlers/grade.ts b/iidx@asphyxia/handlers/grade.ts index 563f97d..7ec26e1 100644 --- a/iidx@asphyxia/handlers/grade.ts +++ b/iidx@asphyxia/handlers/grade.ts @@ -24,8 +24,8 @@ export const graderaised: EPR = async (info, data, send) => { if (version >= 23) cflg = parseInt($(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"))));; + 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; @@ -38,35 +38,52 @@ export const graderaised: EPR = async (info, data, send) => { let eisei_max_past_achievement: number[]; let eisei_max_past_selected_course: number[]; - if (version == 27) { - eisei_clear_type = parseInt($(data).attr("eisei_data").clear_type); - eisei_grade_id = parseInt($(data).attr("eisei_data").grade_id); - eisei_grade_type = parseInt($(data).attr("eisei_data").grade_type); - eisei_stage_num = parseInt($(data).attr("eisei_data").stage_num); + switch (version) { + case 27: + eisei_clear_type = parseInt($(data).attr("eisei_data").clear_type); + eisei_grade_id = parseInt($(data).attr("eisei_data").grade_id); + eisei_grade_type = parseInt($(data).attr("eisei_data").grade_type); + eisei_stage_num = parseInt($(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"); - } if (version >= 30) { - eisei_clear_type = parseInt($(data).element("eisei_data").attr().clear_type); - eisei_grade_id = parseInt($(data).element("eisei_data").attr().grade_id); - eisei_grade_type = parseInt($(data).element("eisei_data").attr().grade_type); - eisei_stage_num = parseInt($(data).element("eisei_data").attr().stage_num); - eisei_option = parseInt($(data).element("eisei_data").attr().option); + 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 = parseInt($(data).element("eisei_data").attr().clear_type); + eisei_grade_id = parseInt($(data).element("eisei_data").attr().grade_id); + eisei_grade_type = parseInt($(data).element("eisei_data").attr().grade_type); + eisei_stage_num = parseInt($(data).element("eisei_data").attr().stage_num); + eisei_option = parseInt($(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"); - } else { - eisei_clear_type = parseInt($(data).attr("eisei_grade_data").clear_type); - eisei_grade_id = parseInt($(data).attr("eisei_grade_data").grade_id); - eisei_grade_type = parseInt($(data).attr("eisei_grade_data").grade_type); - eisei_stage_num = parseInt($(data).attr("eisei_grade_data").stage_num); + 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: + eisei_clear_type = parseInt($(data).attr("kiwami_data").clear_type); + eisei_grade_id = parseInt($(data).attr("kiwami_data").grade_id); + eisei_grade_type = parseInt($(data).attr("kiwami_data").grade_type); + eisei_stage_num = parseInt($(data).attr("kiwami_data").stage_num); + eisei_option = parseInt($(data).attr("kiwami_data").option); - 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"); + 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 = parseInt($(data).attr("eisei_grade_data").clear_type); + eisei_grade_id = parseInt($(data).attr("eisei_grade_data").grade_id); + eisei_grade_type = parseInt($(data).attr("eisei_grade_data").grade_type); + eisei_stage_num = parseInt($(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( diff --git a/iidx@asphyxia/handlers/music.ts b/iidx@asphyxia/handlers/music.ts index 4c8bc07..3515c56 100644 --- a/iidx@asphyxia/handlers/music.ts +++ b/iidx@asphyxia/handlers/music.ts @@ -568,7 +568,8 @@ export const musicreg: EPR = async (info, data, send) => { scores[tmp_clid] = exscore; clflgs[tmp_clid] = cflg; } - } else { + } + else { names = score_top.names; scores = score_top.scores; clflgs = score_top.clflgs; diff --git a/iidx@asphyxia/handlers/pc.ts b/iidx@asphyxia/handlers/pc.ts index 48dc19d..bbfefbf 100644 --- a/iidx@asphyxia/handlers/pc.ts +++ b/iidx@asphyxia/handlers/pc.ts @@ -1,8 +1,8 @@ -import { pcdata, KDZ_pcdata, IIDX27_pcdata, IIDX28_pcdata, IIDX29_pcdata, IIDX30_pcdata, JDZ_pcdata, LDJ_pcdata, IIDX21_pcdata, IIDX22_pcdata, IIDX23_pcdata, IIDX24_pcdata, IIDX25_pcdata, IIDX26_pcdata, JDJ_pcdata, HDD_pcdata, I00_pcdata, GLD_pcdata } from "../models/pcdata"; +import { pcdata, KDZ_pcdata, IIDX27_pcdata, IIDX28_pcdata, IIDX29_pcdata, IIDX30_pcdata, JDZ_pcdata, LDJ_pcdata, IIDX21_pcdata, IIDX22_pcdata, IIDX23_pcdata, IIDX24_pcdata, IIDX25_pcdata, IIDX26_pcdata, JDJ_pcdata, HDD_pcdata, I00_pcdata, GLD_pcdata, IIDX31_pcdata } from "../models/pcdata"; import { grade } from "../models/grade"; import { custom, default_custom } from "../models/custom"; import { IDtoCode, IDtoRef, Base64toNumArray, GetVersion, ReftoProfile, ReftoPcdata, ReftoQPRO, appendSettingConverter, NumArrayToString, NumArraytoHex, NumArraytoBase64 } from "../util"; -import { eisei_grade, eisei_grade_data, lightning_musicmemo, lightning_musicmemo_new, lightning_playdata, lightning_settings, lm_playdata, lm_settings, lm_settings_new, musicmemo_data, musicmemo_data_new } from "../models/lightning"; +import { eisei_grade, eisei_grade_data, lightning_custom, lightning_musicfilter, lightning_musicmemo, lightning_musicmemo_new, lightning_playdata, lightning_settings, lm_customdata, lm_playdata, lm_settings, lm_settings_new, musicfilter_data, musicmemo_data, musicmemo_data_new } from "../models/lightning"; import { profile, default_profile } from "../models/profile"; import { rival, rival_data } from "../models/rival"; import { world_tourism } from "../models/worldtourism"; @@ -228,6 +228,8 @@ export const pccommon: EPR = async (info, data, send) => { deller_bonus: K.ATTR({ open: String(1) }), newsong_another: K.ATTR({ open: String(Number(U.GetConfig("NewSongAnother12"))) }), expert_secret_full_open: {}, + eaorder_phase: K.ATTR({ phase: String(2) }), // TODO:: figure out what this does // + common_evnet: K.ATTR({ flg: String(-1) }), // TODO:: figure out what this does // system_voice_phase: K.ATTR({ phase: String(_.random(0, 8)) }), extra_boss_event: K.ATTR({ phase: String(U.GetConfig("hv_extraboss")) }), event1_phase: K.ATTR({ phase: String(U.GetConfig("hv_event")) }), @@ -251,6 +253,8 @@ export const pccommon: EPR = async (info, data, send) => { deller_bonus: K.ATTR({ open: String(1) }), newsong_another: K.ATTR({ open: String(Number(U.GetConfig("NewSongAnother12"))) }), expert_secret_full_open: {}, + eaorder_phase: K.ATTR({ phase: String(2) }), // TODO:: figure out what this does // + common_evnet: K.ATTR({ flg: String(-1) }), // TODO:: figure out what this does // system_voice_phase: K.ATTR({ phase: String(_.random(0, 8)) }), extra_boss_event: K.ATTR({ phase: String(U.GetConfig("bo_extraboss")) }), event1_phase: K.ATTR({ phase: String(U.GetConfig("bo_event")) }), @@ -276,6 +280,8 @@ export const pccommon: EPR = async (info, data, send) => { deller_bonus: K.ATTR({ open: String(1) }), newsong_another: K.ATTR({ open: String(Number(U.GetConfig("NewSongAnother12"))) }), // TODO:: verify // expert_secret_full_open: {}, + eaorder_phase: K.ATTR({ phase: String(2) }), // TODO:: figure out what this does // + common_evnet: K.ATTR({ flg: String(-1) }), // TODO:: figure out what this does // system_voice_phase: K.ATTR({ phase: String(_.random(0, 8)) }), extra_boss_event: K.ATTR({ phase: String(1) }), // TODO:: verify // event1_phase: K.ATTR({ phase: String(4) }), // TODO:: verify // @@ -298,17 +304,39 @@ export const pccommon: EPR = async (info, data, send) => { movie_upload: K.ATTR({ url: String(U.GetConfig("MovieUpload")) }), vip_pass_black: {}, deller_bonus: K.ATTR({ open: String(1) }), - newsong_another: K.ATTR({ open: String(Number(U.GetConfig("NewSongAnother12"))) }), + common_evnet: K.ATTR({ flg: String(-1) }), // TODO:: figure out what this does // system_voice_phase: K.ATTR({ phase: String(_.random(0, 8)) }), premium_area_news: K.ATTR({ open: String(1) }), premium_area_qpro: K.ATTR({ open: String(1) }), play_video: {}, + music_retry: {}, display_asio_logo: {}, lane_gacha: {}, tourism_booster: {}, ameto_event: {}, } break; + case 31: + result = { + ...result, + movie_agreement: K.ATTR({ version: String(1) }), + license: { + string: K.ITEM("bin", [0x00]), // TODO:: figure out what this does (alloc size: 600) // + }, + movie_upload: K.ATTR({ url: String(U.GetConfig("MovieUpload")) }), + vip_pass_black: {}, + deller_bonus: K.ATTR({ open: String(1) }), + common_evnet: K.ATTR({ flg: String(-1) }), + system_voice_phase: K.ATTR({ phase: String(_.random(0, 8)) }), + premium_area_news: K.ATTR({ open: String(1) }), + premium_area_qpro: K.ATTR({ open: String(1) }), + play_video: {}, + music_retry: {}, + display_asio_logo: {}, + lane_gacha: {}, + tourism_booster: {}, + } + break; default: return send.deny(); @@ -326,6 +354,7 @@ export const pcreg: EPR = async (info, data, send) => { let pcdata: object; let lightning_settings: object; let lightning_playdata: object; + let lightning_custom: object; switch (version) { case 14: pcdata = GLD_pcdata; @@ -375,16 +404,25 @@ export const pcreg: EPR = async (info, data, send) => { pcdata = IIDX28_pcdata; lightning_playdata = lm_playdata; lightning_settings = lm_settings; + lightning_custom = lm_customdata; break; case 29: pcdata = IIDX29_pcdata; lightning_playdata = lm_playdata; lightning_settings = lm_settings_new; + lightning_custom = lm_customdata; break; case 30: pcdata = IIDX30_pcdata; lightning_playdata = lm_playdata; lightning_settings = lm_settings_new; + lightning_custom = lm_customdata; + break; + case 31: + pcdata = IIDX31_pcdata; + lightning_playdata = lm_playdata; + lightning_settings = lm_settings_new; + lightning_custom = lm_customdata; break; default: @@ -451,6 +489,17 @@ export const pcreg: EPR = async (info, data, send) => { $set: lightning_playdata, } ); + + await DB.Upsert( + refid, + { + collection: "lightning_custom", + version: version, + }, + { + $set: lightning_custom, + } + ); } return send.object( @@ -480,6 +529,8 @@ export const pcget: EPR = async (info, data, send) => { const lm_eisei_grade = await DB.Find(refid, { collection: "eisei_grade", version: version }); const lm_music_memo = await DB.Find(refid, { collection: "lightning_musicmemo", version: version }); const lm_music_memo_new = await DB.Find(refid, { collection: "lightning_musicmemo_new", version: version }); + const lm_music_filter = await DB.Find(refid, { collection: "lightning_musicfilter", version: version }); + let lm_custom: any = await DB.FindOne(refid, { collection: "lightning_custom", version: version }); if (_.isNil(pcdata)) return send.deny(); @@ -500,6 +551,21 @@ export const pcget: EPR = async (info, data, send) => { custom.disable_beginner_option = false; } + // migration // + if (version >= 28 && _.isNil(lm_custom)) { + await DB.Upsert(refid, + { + collection: "lightning_custom", + version: version, + }, + { + $set: lm_customdata, + } + ); + + lm_custom = lm_customdata; + } + const appendsettings = appendSettingConverter( custom.rank_folder, custom.clear_folder, @@ -515,7 +581,7 @@ export const pcget: EPR = async (info, data, send) => { custom.hide_iidxid, custom.disable_beginner_option, ); - let dArray = [], eArray = [], rArray = [], mArray = [], bArray = []; + let dArray = [], eArray = [], rArray = [], mArray = [], bArray = [], fArray = []; grade.forEach((res: grade) => { dArray.push([res.style, res.gradeId, res.maxStage, res.archive]); @@ -762,89 +828,114 @@ export const pcget: EPR = async (info, data, send) => { mirage_lib_sub = [], delabity_lab = null, delabity_lab_sub = [], + epo_res = null, + epo_res_sub = [], event_1 = null, event_1s = null, - evtArray = [], evtArray2 = []; + evtArray = [], evtArray2 = [], evtArray3 = []; - if (version == 21) { - if (!_.isNil(pcdata.st_album)) pcdata.st_album = NumArraytoHex(Base64toNumArray(pcdata.st_album)); + switch (version) { + case 21: + if (!_.isNil(pcdata.st_album)) pcdata.st_album = NumArraytoHex(Base64toNumArray(pcdata.st_album)); - link5 = await DB.FindOne(refid, { collection: "event_1", version: 20, event_name: "link5" }); - tricolettepark = await DB.FindOne(refid, { collection: "event_1", version: 20, event_name: "tricolettepark" }); + link5 = await DB.FindOne(refid, { collection: "event_1", version: 20, event_name: "link5" }); + tricolettepark = await DB.FindOne(refid, { collection: "event_1", version: 20, event_name: "tricolettepark" }); - boss1 = await DB.FindOne(refid, { collection: "event_1", version: version, event_name: "boss1" }); - if (!_.isNil(boss1)) boss1.durability = NumArraytoHex(Base64toNumArray(boss1.durability)); - } - else if (version == 22) { - if (!_.isNil(pcdata.st_album)) pcdata.st_album = NumArraytoHex(Base64toNumArray(pcdata.st_album)); + boss1 = await DB.FindOne(refid, { collection: "event_1", version: version, event_name: "boss1" }); + if (!_.isNil(boss1)) boss1.durability = NumArraytoHex(Base64toNumArray(boss1.durability)); + break; + case 22: + if (!_.isNil(pcdata.st_album)) pcdata.st_album = NumArraytoHex(Base64toNumArray(pcdata.st_album)); - chrono_diver = await DB.FindOne(refid, { collection: "event_1", version: version, event_name: "chrono_diver" }); - pendual_talis = await DB.FindOne(refid, { collection: "event_1", version: version, event_name: "boss_event_3" }); - if (_.isNil(pendual_talis)) pendual_talis = { point: 0 }; - else if (pendual_talis.point == "null" || _.isNil(pendual_talis.point)) pendual_talis = { point: 0 }; + chrono_diver = await DB.FindOne(refid, { collection: "event_1", version: version, event_name: "chrono_diver" }); + pendual_talis = await DB.FindOne(refid, { collection: "event_1", version: version, event_name: "boss_event_3" }); + if (_.isNil(pendual_talis)) pendual_talis = { point: 0 }; + else if (pendual_talis.point == "null" || _.isNil(pendual_talis.point)) pendual_talis = { point: 0 }; - qpronicle_chord = await DB.FindOne(refid, { collection: "event_1", version: version, event_name: "qpronicle_chord" }); - qpronicle_chord_sub = await DB.Find(refid, { collection: "event_1_sub", version: version, event_name: "qpronicle_chord" }); - qpronicle_phase3 = await DB.FindOne(refid, { collection: "event_1", version: version, event_name: "qpronicle_phase3" }); - } - else if (version == 23) { - if (!_.isNil(pcdata.st_tokimeki)) pcdata.st_tokimeki = NumArraytoHex(Base64toNumArray(pcdata.st_tokimeki)); + qpronicle_chord = await DB.FindOne(refid, { collection: "event_1", version: version, event_name: "qpronicle_chord" }); + qpronicle_chord_sub = await DB.Find(refid, { collection: "event_1_sub", version: version, event_name: "qpronicle_chord" }); + qpronicle_phase3 = await DB.FindOne(refid, { collection: "event_1", version: version, event_name: "qpronicle_phase3" }); + break; + case 23: + if (!_.isNil(pcdata.st_tokimeki)) pcdata.st_tokimeki = NumArraytoHex(Base64toNumArray(pcdata.st_tokimeki)); - open_tokotoko = await DB.FindOne(refid, { collection: "event_1", version: version, event_name: "event1_data" }); - mystery_line = await DB.FindOne(refid, { collection: "event_1", version: version, event_name: "event2_data" }); - mystery_line_sub = await DB.Find(refid, { collection: "event_1_sub", version: version, event_name: "event2_data" }); - } - else if (version == 24) { - siege_sinobuz = await DB.FindOne(refid, { collection: "event_1", version: version, event_name: "event1_data" }); - siege_sinobuz_sub = await DB.Find(refid, { collection: "event_1_sub", version: version, event_name: "event1_data" }); - siege_sinobuz_sub.forEach((res) => { - res.is_clear = Number(res.is_clear); - res.ninjyutsu = NumArraytoHex(Base64toNumArray(res.ninjyutsu)); - res.card_damage = NumArraytoHex(Base64toNumArray(res.card_damage)); - res.card_clear = NumArraytoHex(Base64toNumArray(res.card_clear)); - }); + open_tokotoko = await DB.FindOne(refid, { collection: "event_1", version: version, event_name: "event1_data" }); + mystery_line = await DB.FindOne(refid, { collection: "event_1", version: version, event_name: "event2_data" }); + mystery_line_sub = await DB.Find(refid, { collection: "event_1_sub", version: version, event_name: "event2_data" }); + break; + case 24: + siege_sinobuz = await DB.FindOne(refid, { collection: "event_1", version: version, event_name: "event1_data" }); + siege_sinobuz_sub = await DB.Find(refid, { collection: "event_1_sub", version: version, event_name: "event1_data" }); + siege_sinobuz_sub.forEach((res) => { + res.is_clear = Number(res.is_clear); + res.ninjyutsu = NumArraytoHex(Base64toNumArray(res.ninjyutsu)); + res.card_damage = NumArraytoHex(Base64toNumArray(res.card_damage)); + res.card_clear = NumArraytoHex(Base64toNumArray(res.card_clear)); + }); - ninja_shichikyoden = await DB.FindOne(refid, { collection: "event_1", version: version, event_name: "event2_data" }); - if (!_.isNil(ninja_shichikyoden)) - ninja_shichikyoden.last_select_dojo = NumArraytoHex(Base64toNumArray(ninja_shichikyoden.last_select_dojo)); - if (!_.isNil(ninja_shichikyoden)) - ninja_shichikyoden.enemy_damage = NumArraytoHex(Base64toNumArray(ninja_shichikyoden.enemy_damage)); - } - else if (version == 25) { - rush_cannonracer = await DB.FindOne(refid, { collection: "event_1", version: version, event_name: "event1_data" }); - rush_cannonracer_sub = await DB.Find(refid, { collection: "event_1_sub", version: version, event_name: "event1_data" }); - rush_cannonracer_sub.forEach((res) => { - res.is_clear = Number(res.is_clear); - }); - } - else if (version == 26) { - mirage_lib = await DB.FindOne(refid, { collection: "event_1", version: version, event_name: "event1_data" }); - if (!_.isNil(mirage_lib)) - mirage_lib.quiz_control_list = NumArraytoHex(Base64toNumArray(mirage_lib.quiz_control_list)); + ninja_shichikyoden = await DB.FindOne(refid, { collection: "event_1", version: version, event_name: "event2_data" }); + if (!_.isNil(ninja_shichikyoden)) + ninja_shichikyoden.last_select_dojo = NumArraytoHex(Base64toNumArray(ninja_shichikyoden.last_select_dojo)); + if (!_.isNil(ninja_shichikyoden)) + ninja_shichikyoden.enemy_damage = NumArraytoHex(Base64toNumArray(ninja_shichikyoden.enemy_damage)); + break; + case 25: + rush_cannonracer = await DB.FindOne(refid, { collection: "event_1", version: version, event_name: "event1_data" }); + rush_cannonracer_sub = await DB.Find(refid, { collection: "event_1_sub", version: version, event_name: "event1_data" }); + rush_cannonracer_sub.forEach((res) => { + res.is_clear = Number(res.is_clear); + }); + break; + case 26: + mirage_lib = await DB.FindOne(refid, { collection: "event_1", version: version, event_name: "event1_data" }); + if (!_.isNil(mirage_lib)) + mirage_lib.quiz_control_list = NumArraytoHex(Base64toNumArray(mirage_lib.quiz_control_list)); - mirage_lib_sub = await DB.Find(refid, { collection: "event_1_sub", version: version, event_name: "event1_data" }); - mirage_lib_sub.forEach((res) => { - res.map_route_damage = NumArraytoHex(Base64toNumArray(res.map_route_damage)); - }); + mirage_lib_sub = await DB.Find(refid, { collection: "event_1_sub", version: version, event_name: "event1_data" }); + mirage_lib_sub.forEach((res) => { + res.map_route_damage = NumArraytoHex(Base64toNumArray(res.map_route_damage)); + }); - delabity_lab = await DB.FindOne(refid, { collection: "event_1", version: version, event_name: "event2_data" }); - delabity_lab_sub = await DB.Find(refid, { collection: "event_1_sub", version: version, event_name: "event2_data" }); - } - else { - event_1 = await DB.Find(refid, { collection: "event_1", version: version }); - event_1s = await DB.Find(refid, { collection: "event_1_sub", version: version }); + delabity_lab = await DB.FindOne(refid, { collection: "event_1", version: version, event_name: "event2_data" }); + delabity_lab_sub = await DB.Find(refid, { collection: "event_1_sub", version: version, event_name: "event2_data" }); + break; + case 31: + let myepo_map = await DB.Find(refid, { collection: "event_1", version: version, event_data: "myepo_map" }); + let myepo_building = await DB.Find(refid, { collection: "event_1_sub", version: version, event_data: "myepo_building" }); + let myepo_shop = await DB.Find(refid, { collection: "event_1_sub", version: version, event_data: "myepo_shop" }); - if (event_1.length > 0) { - for (let evt of event_1) { - evtArray.push(evt); + myepo_map.forEach((res: any) => { + let data = { + ...res, + carryover_use: 0, + }; + + evtArray.push(data); + }); + + evtArray2 = myepo_building; + evtArray3 = myepo_shop; + + epo_res = await DB.FindOne(refid, { collection: "event_1", version: version, event_data: "epores" }); + epo_res_sub = await DB.Find(refid, { collection: "event_1_sub", version: version, event_data: "epores_system" }); + break; + + default: + event_1 = await DB.Find(refid, { collection: "event_1", version: version }); + event_1s = await DB.Find(refid, { collection: "event_1_sub", version: version }); + + if (event_1.length > 0) { + for (let evt of event_1) { + evtArray.push(evt); + } } - } - if (event_1s.length > 0) { - for (let evt of event_1s) { - evtArray2.push(evt); + if (event_1s.length > 0) { + for (let evt of event_1s) { + evtArray2.push(evt); + } } - } + break; } if (!_.isNil(pcdata.sp_mlist)) { @@ -854,155 +945,233 @@ export const pcget: EPR = async (info, data, send) => { pcdata.dp_clist = NumArraytoHex(Base64toNumArray(pcdata.dp_clist)); } - if (version >= 30 && lm_music_memo_new.length > 0) { - lm_music_memo_new.forEach((res) => { - let musicmemo_data: musicmemo_data_new = { - folder_idx: res.folder_idx, - folder_name: res.folder_name, - play_style: res.play_style, + if (version >= 30) { + if (lm_music_memo_new.length > 0) { + lm_music_memo_new.forEach((res) => { + let musicmemo_data: musicmemo_data_new = { + folder_idx: res.folder_idx, + folder_name: res.folder_name, + play_style: res.play_style, - music_ids: res.music_ids, - } + music_ids: res.music_ids, + } - mArray.push(musicmemo_data); - }); - mArray.sort((a: musicmemo_data_new, b: musicmemo_data_new): number => a.play_style - b.play_style || a.folder_idx - b.folder_idx); + mArray.push(musicmemo_data); + }); + mArray.sort((a: musicmemo_data_new, b: musicmemo_data_new): number => a.play_style - b.play_style || a.folder_idx - b.folder_idx); + } + + if (lm_music_filter.length > 0) { + lm_music_filter.forEach((res) => { + let musicfilter_data: musicfilter_data = { + play_style: res.play_style, + folder_id: res.folder_id, + filter_id: res.filter_id, + + is_valid: res.is_valid, + value0: res.value0, + value1: res.value1, + } + + fArray.push(musicfilter_data); + }); + fArray.sort((a: musicfilter_data, b: musicfilter_data): number => a.play_style - b.play_style || a.folder_id - b.folder_id); + } } - else if (version >= 27 && lm_music_memo.length > 0) { - lm_music_memo.forEach((res) => { - let musicmemo_data: musicmemo_data = { - music_idx: res.music_idx, - play_style: res.play_style, + else if (version >= 27) { + if (lm_music_memo.length > 0) { + lm_music_memo.forEach((res) => { + let musicmemo_data: musicmemo_data = { + music_idx: res.music_idx, + play_style: res.play_style, - music_id: res.music_id, - } + music_id: res.music_id, + } - mArray.push(musicmemo_data); - }); - mArray.sort((a: musicmemo_data, b: musicmemo_data): number => a.play_style - b.play_style || a.music_idx - b.music_idx); + mArray.push(musicmemo_data); + }); + mArray.sort((a: musicmemo_data, b: musicmemo_data): number => a.play_style - b.play_style || a.music_idx - b.music_idx); + } } - /*** TODO:: figure out how badges works - [save] - elements are below but get checks for id 0~12 - today_recommend (flg) - weekly_ranking (flg) - visitor (flg_id, flg) - notes_radar (flg_id, flg) [2] - world_tourism (flg) - event1 (flg_id, flg) [10] - arena (flg_id, flg) [2] - iidx_exam (flg) + /*** TODO:: figure out how badges works (following table is for EPOLIS) + [save] - element names are following below but get checks for id 0 ~ 16 + step_up [2] + today_recommend + weekly_ranking + visitor [2] + notes_radar [2] + tsujigiri + iidx_exam + world_tourism + event1 + arena [2] + event2 - [get] - category_id - up to 12 + [get] (starts from zero) + category_id - up to 16 badge_flg_id - - This can be up to 23 - - category_id: 0, 1 -> 23 - - category_id: 9 -> 9 - - category_id: 7, 10 -> 2 - badge_flg + - This can be up to 23 [category_id, badge_flg_id] + - 0 - 23 [djLevel] + - 1 - 23 [clear] + - 2 - 1 [grade] + - 3 - 1 [step_up] + - 4 - (none) + - 5 - (none) + - 6 - (none) + - 7 - 1 [visitor] + - 8 - 1 [notes_radar] + - 10 - (none) + - 11 - 1 + - 12 - (none) + - 13 - (none) [event] + - 14 - 1 + - 15 - (none) + - 16 - (none) [event2] + - 3001 - 9 + badge_flg (these are s64 - this may exceed max int value) + + - following codes are dummy code ***/ if (version >= 30 && badge.length > 0) { - let djLevel, clear, grade, visitor, notes_radar, event1; - djLevel = badge.filter((res) => res.category_name === "djLevel"); - djLevel.forEach((res) => { - bArray.push({ - id: 0, - flg_id: res.flg_id, - flg: res.flg, - }); - }); + let djLevel, clear, grade, step_up, visitor, notes_radar, event1, event2; + switch (version) { + case 30: + djLevel = badge.filter((res) => res.category_name === "djLevel"); + djLevel.forEach((res) => { + bArray.push({ + id: 0, + flg_id: res.flg_id, + flg: res.flg, + }); + }); - clear = badge.filter((res) => res.category_name === "clear"); - clear.forEach((res) => { - bArray.push({ - id: 1, - flg_id: res.flg_id, - flg: res.flg, - }); - }); - - grade = badge.filter((res) => res.category_name === "grade"); - grade.forEach((res) => { - bArray.push({ - id: 2, - flg_id: res.flg_id, - flg: res.flg, - }); - }); + clear = badge.filter((res) => res.category_name === "clear"); + clear.forEach((res) => { + bArray.push({ + id: 1, + flg_id: res.flg_id, + flg: res.flg, + }); + }); - // this keep sending back on save // - // possibly wrong category_id but at least doesn't show as new badges // - visitor = badge.filter((res) => res.category_name === "visitor"); - visitor.forEach((res) => { - bArray.push({ - id: 6, - flg_id: res.flg_id, - flg: res.flg, - }); - }); + grade = badge.filter((res) => res.category_name === "grade"); + grade.forEach((res) => { + bArray.push({ + id: 2, + flg_id: res.flg_id, + flg: res.flg, + }); + }); - notes_radar = badge.filter((res) => res.category_name === "notes_radar"); - notes_radar.forEach((res) => { - bArray.push({ - id: 7, - flg_id: res.flg_id, - flg: res.flg, - }); - }); + // this keep sending back on save // + // possibly wrong category_id but at least doesn't show as new badges // + visitor = badge.filter((res) => res.category_name === "visitor"); + visitor.forEach((res) => { + bArray.push({ + id: 6, + flg_id: res.flg_id, + flg: res.flg, + }); + }); - event1 = badge.filter((res) => res.category_name === "event1"); - event1.forEach((res) => { - bArray.push({ - id: 9, - flg_id: res.flg_id, - flg: res.flg, - }); - }); - } + notes_radar = badge.filter((res) => res.category_name === "notes_radar"); + notes_radar.forEach((res) => { + bArray.push({ + id: 7, + flg_id: res.flg_id, + flg: res.flg, + }); + }); - if (version == 24) { // migration // - if (_.isNil(pcdata.dr_sprank)) { - pcdata.dr_sprank = Array(15).fill(0); - pcdata.dr_sppoint = Array(15).fill(0); - pcdata.dr_dprank = Array(15).fill(0); - pcdata.dr_dppoint = Array(15).fill(0); + event1 = badge.filter((res) => res.category_name === "event1"); + event1.forEach((res) => { + bArray.push({ + id: 9, + flg_id: res.flg_id, + flg: res.flg, + }); + }); + break; + case 31: + djLevel = badge.filter((res) => res.category_name === "djLevel"); + djLevel.forEach((res) => { + bArray.push({ + id: 0, + flg_id: res.flg_id, + flg: res.flg, + }); + }); - await DB.Upsert( - refid, - { - collection: "pcdata", - version: version, - }, - { - $set: pcdata, - } - ); - } - } - if (version == 26) { // migration // - if (_.isNil(pcdata.eb_bossorb0)) { - pcdata.eb_bossorb0 = 0; - pcdata.eb_bossorb1 = 0; - pcdata.eb_bossorb2 = 0; - pcdata.eb_bossorb3 = 0; - pcdata.eb_bossorb4 = 0; - pcdata.eb_bossorb5 = 0; - pcdata.eb_bossorb6 = 0; - pcdata.eb_bossorb7 = 0; - pcdata.eb_bossorb8 = 0; + clear = badge.filter((res) => res.category_name === "clear"); + clear.forEach((res) => { + bArray.push({ + id: 1, + flg_id: res.flg_id, + flg: res.flg, + }); + }); - await DB.Upsert( - refid, - { - collection: "pcdata", - version: version, - }, - { - $set: pcdata, - } - ); + grade = badge.filter((res) => res.category_name === "grade"); + grade.forEach((res) => { + bArray.push({ + id: 2, + flg_id: res.flg_id, + flg: res.flg, + }); + }); + + step_up = badge.filter((res) => res.category_name === "step_up"); + step_up.forEach((res) => { + bArray.push({ + id: 3, + flg_id: res.flg_id, + flg: res.flg, + }); + }); + + // this keep sending back on save // + // possibly wrong category_id but at least doesn't show as new badges // + visitor = badge.filter((res) => res.category_name === "visitor"); + visitor.forEach((res) => { + bArray.push({ + id: 7, + flg_id: res.flg_id, + flg: res.flg, + }); + }); + + notes_radar = badge.filter((res) => res.category_name === "notes_radar"); + notes_radar.forEach((res) => { + bArray.push({ + id: 8, + flg_id: res.flg_id, + flg: res.flg, + }); + }); + + event1 = badge.filter((res) => res.category_name === "event1"); + event1.forEach((res) => { + bArray.push({ + id: 13, + flg_id: res.flg_id, + flg: res.flg, + }); + }); + + event2 = badge.filter((res) => res.category_name === "event2"); + event2.forEach((res) => { + bArray.push({ + id: 16, + flg_id: res.flg_id, + flg: res.flg, + }); + }); + break; + + default: + break; } } @@ -1011,14 +1180,17 @@ export const pcget: EPR = async (info, data, send) => { pcdata, lm_playdata, lm_settings, + lm_custom, mArray, dArray, eArray, + fArray, appendsettings, custom, rArray, evtArray, evtArray2, + evtArray3, boss1, link5, tricolettepark, @@ -1039,6 +1211,8 @@ export const pcget: EPR = async (info, data, send) => { mirage_lib_sub, delabity_lab, delabity_lab_sub, + epo_res, + epo_res_sub, wArray, bArray, shop_data, @@ -1081,6 +1255,7 @@ export const pctakeover: EPR = async (info, data, send) => { let pcdata: object; let lightning_settings: object; let lightning_playdata: object; + let lightning_custom: object; switch (version) { case 14: pcdata = GLD_pcdata; @@ -1130,16 +1305,25 @@ export const pctakeover: EPR = async (info, data, send) => { pcdata = IIDX28_pcdata; lightning_playdata = lm_playdata; lightning_settings = lm_settings; + lightning_custom = lm_customdata; break; case 29: pcdata = IIDX29_pcdata; lightning_playdata = lm_playdata; lightning_settings = lm_settings_new; + lightning_custom = lm_customdata; break; case 30: pcdata = IIDX30_pcdata; lightning_playdata = lm_playdata; lightning_settings = lm_settings_new; + lightning_custom = lm_customdata; + break; + case 31: + pcdata = IIDX31_pcdata; + lightning_playdata = lm_playdata; + lightning_settings = lm_settings_new; + lightning_custom = lm_customdata; break; default: @@ -1190,6 +1374,17 @@ export const pctakeover: EPR = async (info, data, send) => { $set: lightning_playdata, } ); + + await DB.Upsert( + refid, + { + collection: "lightning_custom", + version: version, + }, + { + $set: lightning_custom, + } + ); } return send.object( @@ -1230,10 +1425,15 @@ export const pcsave: EPR = async (info, data, send) => { const isTDJ = !(_.isNil($(data).element("lightning_play_data"))); const hasStepUpData = !(_.isNil($(data).element("step"))); const hasEventData = !(_.isNil($(data).element("event1"))) || !(_.isNil($(data).element("event_1"))); + const hasEvent2Data = !(_.isNil($(data).element("event2"))) || !(_.isNil($(data).element("event_2"))); const hasLanguageData = !(_.isNil($(data).element("language_setting"))); const hasWorldTourism = !(_.isNil($(data).element("world_tourism_data"))); + const hasTDJSettings = !(_.isNil($(data).element("lightning_setting"))); const hasMusicMemo = !(_.isNil($(data).element("music_memo"))); const hasTowerData = !(_.isNil($(data).element("tower_data"))); + const hasSkinData = !(_.isNil($(data).element("skin_equip"))); + const hasTDJSkinData = !(_.isNil($(data).element("tdjskin_equip"))); + const hasMusicFilter = !(_.isNil($(data).element("music_filter"))); const hasBadgeData = !(_.isNil($(data).element("badge"))); if (cltype == 0) pcdata.spnum += 1; @@ -1243,14 +1443,29 @@ export const pcsave: EPR = async (info, data, send) => { if (cltype == 0) lm_playdata.sp_num += 1; else lm_playdata.dp_num += 1; - lm_settings.headphone_vol = parseInt($(data).attr("lightning_setting").headphone_vol); - lm_settings.slider = $(data).element("lightning_setting").numbers("slider"); - lm_settings.resistance_sp_left = parseInt($(data).attr("lightning_setting").resistance_sp_left); - lm_settings.resistance_sp_right = parseInt($(data).attr("lightning_setting").resistance_sp_right); - lm_settings.resistance_dp_left = parseInt($(data).attr("lightning_setting").resistance_dp_left); - lm_settings.resistance_dp_right = parseInt($(data).attr("lightning_setting").resistance_dp_right); - lm_settings.light = $(data).element("lightning_setting").numbers("light"); - lm_settings.concentration = $(data).element("lightning_setting").number("concentration"); + if (hasTDJSettings) { + lm_settings.headphone_vol = parseInt($(data).attr("lightning_setting").headphone_vol); + lm_settings.slider = $(data).element("lightning_setting").numbers("slider"); + lm_settings.resistance_sp_left = parseInt($(data).attr("lightning_setting").resistance_sp_left); + lm_settings.resistance_sp_right = parseInt($(data).attr("lightning_setting").resistance_sp_right); + lm_settings.resistance_dp_left = parseInt($(data).attr("lightning_setting").resistance_dp_left); + lm_settings.resistance_dp_right = parseInt($(data).attr("lightning_setting").resistance_dp_right); + lm_settings.light = $(data).element("lightning_setting").numbers("light"); + lm_settings.concentration = $(data).element("lightning_setting").number("concentration"); + + await DB.Upsert( + refid, + { + collection: "lightning_settings", + version: version, + }, + { + $set: { + lm_settings, + } + } + ); + } } profile.total_pc += 1; @@ -2587,7 +2802,7 @@ export const pcsave: EPR = async (info, data, send) => { } // TODO:: fix event saving, these event savings hasn't fully tested // - if (!_.isNil($(data).element("event1"))) { + if (hasEventData) { let event_data = { last_select_map: parseInt($(data).attr("event1").last_select_map), hold_rice: parseInt($(data).attr("event1").hold_rice), @@ -2631,7 +2846,7 @@ export const pcsave: EPR = async (info, data, send) => { }); } - if (!_.isNil($(data).element("event2"))) { + if (hasEvent2Data) { let event_data = { play_num: parseInt($(data).attr("event2").play_num), chakra_point: parseInt($(data).attr("event2").chakra_point), @@ -2949,10 +3164,12 @@ export const pcsave: EPR = async (info, data, send) => { pcdata.dr_sppoint = $(data).element("dj_rank").numbers("point"); pcdata.dr_dprank = $(data).element("dj_rank.1").numbers("rank"); pcdata.dr_dppoint = $(data).element("dj_rank.1").numbers("point"); - } else if ($(data).attr("dj_rank").style == "0") { + } + else if ($(data).attr("dj_rank").style == "0") { pcdata.dr_sprank = $(data).element("dj_rank").numbers("rank"); pcdata.dr_sppoint = $(data).element("dj_rank").numbers("point"); - } else if ($(data).attr("dj_rank").style == "1") { + } + else if ($(data).attr("dj_rank").style == "1") { pcdata.dr_dprank = $(data).element("dj_rank").numbers("rank"); pcdata.dr_dppoint = $(data).element("dj_rank").numbers("point"); } @@ -2971,14 +3188,14 @@ export const pcsave: EPR = async (info, data, send) => { if (!_.isNil($(data).element("deller"))) pcdata.deller += parseInt($(data).attr("deller").deller); if (!_.isNil($(data).element("orb_data"))) { - pcdata.present_orb += parseInt($(data).attr("orb_data").present_orb); pcdata.orb += parseInt($(data).attr("orb_data").add_orb); + pcdata.present_orb += parseInt($(data).attr("orb_data").present_orb); } // skin_customize_flg (attr: skin_frame_flg, skin_bgm_flg) // // TODO:: fix event saving, these event savings hasn't fully tested // - if (!_.isNil($(data).element("event1"))) { + if (hasEventData) { pcdata.event_play_num += 1; let event_data = { @@ -3025,7 +3242,7 @@ export const pcsave: EPR = async (info, data, send) => { // skipping quiz_log as it doesn't display anywhere // } - if (!_.isNil($(data).element("event2"))) { + if (hasEvent2Data) { let event_data = { play_num: parseInt($(data).attr("event2").play_num), last_select_floor: parseInt($(data).attr("event2").last_select_floor), @@ -3162,6 +3379,10 @@ export const pcsave: EPR = async (info, data, send) => { pcdata.s_visualization = parseInt($(data).attr().s_visualization); pcdata.d_visualization = parseInt($(data).attr().d_visualization); } + if (version >= 31) { + pcdata.s_classic_hispeed = parseInt($(data).attr().s_classic_hispeed); + pcdata.d_classic_hispeed = parseInt($(data).attr().d_classic_hispeed); + } if (cltype == 0) { pcdata.s_liflen = parseInt($(data).attr().s_lift); @@ -3235,7 +3456,8 @@ export const pcsave: EPR = async (info, data, send) => { pcdata.achi_packcomp = parseInt($(data).attr("achievements").pack_comp); pcdata.achi_visitflg = parseInt($(data).attr("achievements").visit_flg); pcdata.achi_weeklynum = parseInt($(data).attr("achievements").weekly_num); - pcdata.achi_trophy = $(data).element("achievements").bigints("trophy").map(String); + if (!_.isNil($(data).element("achievements").bigints("trophy"))) // unavailable since epolis // + pcdata.achi_trophy = $(data).element("achievements").bigints("trophy").map(String); } if ($(data).attr("dj_rank.1").style == "1") { @@ -3262,9 +3484,16 @@ export const pcsave: EPR = async (info, data, send) => { if (!_.isNil($(data).element("deller"))) pcdata.deller += parseInt($(data).attr("deller").deller); if (!_.isNil($(data).element("orb_data"))) { - pcdata.present_orb += parseInt($(data).attr("orb_data").present_orb); - pcdata.orb += parseInt($(data).attr("orb_data").add_orb); - pcdata.orb += parseInt($(data).attr("orb_data").reward_orb); + if (version == 31) { + pcdata.orb += parseInt($(data).attr("orb_data").add_orb_normal); + pcdata.orb += parseInt($(data).attr("orb_data").add_orb_event); + pcdata.present_orb += parseInt($(data).attr("orb_data").rest_orb); + } + else { + pcdata.orb += parseInt($(data).attr("orb_data").add_orb); + pcdata.orb += parseInt($(data).attr("orb_data").reward_orb); + pcdata.present_orb += parseInt($(data).attr("orb_data").present_orb); + } } if (hasLanguageData) profile.language = parseInt($(data).attr("language_setting").language); @@ -3282,194 +3511,364 @@ export const pcsave: EPR = async (info, data, send) => { } if (hasEventData) { - if (version == 27) { - pcdata.event_play_num += 1; - pcdata.event_last_select_id = parseInt($(data).attr("event1").last_select_gym_id); + let event_data, event_sub_data; + switch (version) { + case 27: + pcdata.event_play_num += 1; + pcdata.event_last_select_id = parseInt($(data).attr("event1").last_select_gym_id); - $(data).element("event1").elements("gym_data").forEach((res) => { - let event_data = { - gym_id: res.attr().gym_id, - play_num: res.attr().play_num, - gauge_spirit: res.attr().gauge_spirit, - gauge_technique: res.attr().gauge_technique, - gauge_body: res.attr().gauge_body, - boss_attack_num: res.attr().boss_attack_num, - boss_damage: res.attr().boss_damage, - disp_lounge_list: res.attr().disp_lounge_list, - stb_type: res.attr().stb_type, - is_complete: res.number("is_complete"), - is_gauge_max: res.number("is_gauge_max"), - } - - DB.Upsert( - refid, - { - collection: "event_1", - version: version, - gym_id: event_data.gym_id - }, - { - $set: event_data, - }); - }); - } else if (version == 28) { - pcdata.event_play_num += 1; - pcdata.event_story_prog = parseInt($(data).attr("event_1").story_prog); - pcdata.event_last_select_id = parseInt($(data).attr("event_1").last_select_area_id); - pcdata.event_failed_num = parseInt($(data).attr("event_1").failed_num); - - $(data).element("event_1").elements("area_data").forEach((res) => { - let event_data = { - area_id: res.attr().area_id, - play_num: res.attr().play_num, - recipe_prog0: res.attr().recipe_prog0, - recipe_prog1: res.attr().recipe_prog1, - recipe_prog2: res.attr().recipe_prog2, - recipe_prog3: res.attr().recipe_prog3, - recipe_prog4: res.attr().recipe_prog4, - operation_num: res.attr().operation_num, - operation_prog: res.attr().operation_prog, - last_select_recipe: res.attr().last_select_recipe, - area_prog: res.attr().area_prog, - is_complete: res.number("is_complete"), - } - - DB.Upsert( - refid, - { - collection: "event_1", - version: version, - area_id: event_data.area_id - }, - { - $set: event_data, - }); - }); - } else if (version == 29) { - pcdata.event_play_num += 1; - pcdata.event_last_select_id = parseInt($(data).attr("event_1").last_select_platform_id); - pcdata.event_last_select_type = parseInt($(data).attr("event_1").last_select_platform_type); - - let event_data, event_sub_data; - $(data).element("event_1").elements("watch_data").forEach((res) => { - if (!(_.isNil(res.element("channel")))) { + $(data).element("event1").elements("gym_data").forEach((res) => { event_data = { - last_select_channel: res.attr().last_select_channel, - platform_id: res.attr().platform_id, - platform_prog: res.attr().platform_prog, + gym_id: res.attr().gym_id, play_num: res.attr().play_num, + gauge_spirit: res.attr().gauge_spirit, + gauge_technique: res.attr().gauge_technique, + gauge_body: res.attr().gauge_body, + boss_attack_num: res.attr().boss_attack_num, + boss_damage: res.attr().boss_damage, + disp_lounge_list: res.attr().disp_lounge_list, + stb_type: res.attr().stb_type, + is_complete: res.number("is_complete"), + is_gauge_max: res.number("is_gauge_max"), + } + + DB.Upsert( + refid, + { + collection: "event_1", + version: version, + gym_id: event_data.gym_id + }, + { + $set: event_data, + }); + }); + break; + case 28: + pcdata.event_play_num += 1; + pcdata.event_story_prog = parseInt($(data).attr("event_1").story_prog); + pcdata.event_last_select_id = parseInt($(data).attr("event_1").last_select_area_id); + pcdata.event_failed_num = parseInt($(data).attr("event_1").failed_num); + + $(data).element("event_1").elements("area_data").forEach((res) => { + event_data = { + area_id: res.attr().area_id, + play_num: res.attr().play_num, + recipe_prog0: res.attr().recipe_prog0, + recipe_prog1: res.attr().recipe_prog1, + recipe_prog2: res.attr().recipe_prog2, + recipe_prog3: res.attr().recipe_prog3, + recipe_prog4: res.attr().recipe_prog4, + operation_num: res.attr().operation_num, + operation_prog: res.attr().operation_prog, + last_select_recipe: res.attr().last_select_recipe, + area_prog: res.attr().area_prog, + is_complete: res.number("is_complete"), + } + + DB.Upsert( + refid, + { + collection: "event_1", + version: version, + area_id: event_data.area_id + }, + { + $set: event_data, + }); + }); + break; + case 29: + pcdata.event_play_num += 1; + pcdata.event_last_select_id = parseInt($(data).attr("event_1").last_select_platform_id); + pcdata.event_last_select_type = parseInt($(data).attr("event_1").last_select_platform_type); + + $(data).element("event_1").elements("watch_data").forEach((res) => { + if (!(_.isNil(res.element("channel")))) { + event_data = { + last_select_channel: res.attr().last_select_channel, + platform_id: res.attr().platform_id, + platform_prog: res.attr().platform_prog, + play_num: res.attr().play_num, + }; + + event_sub_data = { + platform_id: res.attr().platform_id, + channel_id: res.attr("channel").channel_id, + gauge: res.attr("channel").gauge, + channel_play_num: res.attr("channel").play_num, + is_complete: res.element("channel").number("is_complete"), + } + } else { + event_data = { + last_select_channel: res.attr().last_select_channel, + platform_id: res.attr().platform_id, + platform_prog: res.attr().platform_prog, + play_num: res.attr().play_num, + } + + event_sub_data = { + platform_id: res.attr().platform_id, + channel_id: 0, + gauge: 0, + channel_play_num: 0, + is_complete: 0, + } + } + + DB.Upsert(refid, + { + collection: "event_1", + version: version, + platform_id: event_data.platform_id + }, + { + $set: event_data, + } + ); + + DB.Upsert(refid, + { + collection: "event_1_sub", + version: version, + platform_id: event_sub_data.platform_id, + channel_id: event_sub_data.channel_id, + }, + { + $set: event_sub_data, + } + ); + }); + break; + case 30: + pcdata.event_play_num += 1; + pcdata.event_last_select_id = parseInt($(data).attr("event_1").last_select_flyer_id); + + $(data).element("event_1").elements("flyer_data").forEach((res) => { + if (!(_.isNil(res.element("genre_data")))) { + event_data = { + last_select_genre: res.attr().last_select_genre, + flyer_id: res.attr().flyer_id, + flyer_prog: res.attr().flyer_prog, + play_num: res.attr().play_num, + skill_param: res.attr().skill_param, + }; + + event_sub_data = { + flyer_id: res.attr().flyer_id, + genre_id: res.element("genre_data").attr().genre_id, + gauge: res.element("genre_data").attr().gauge, + genre_playnum: res.element("genre_data").attr().play_num, + is_complete: res.element("genre_data").number("is_complete"), + } + } else { + event_data = { + last_select_genre: res.attr().last_select_genre, + flyer_id: res.attr().flyer_id, + flyer_prog: res.attr().flyer_prog, + play_num: res.attr().play_num, + skill_param: res.attr().skill_param, + }; + + event_sub_data = { + flyer_id: res.attr().flyer_id, + genre_id: 0, + gauge: 0, + genre_playnum: 0, + is_complete: 0, + } + } + + DB.Upsert(refid, + { + collection: "event_1", + version: version, + flyer_id: event_data.flyer_id + }, + { + $set: event_data, + } + ); + + DB.Upsert(refid, + { + collection: "event_1_sub", + version: version, + flyer_id: event_sub_data.flyer_id, + genre_id: event_sub_data.genre_id, + }, + { + $set: event_sub_data, + } + ); + }); + break; + case 31: + pcdata.event_play_num += 1; + pcdata.event_last_select_id = parseInt($(data).attr("event_1").last_select_map_id); + pcdata.event_skip = false; + + if (!_.isNil($(data).element("event_1").element("is_skip"))) { + pcdata.event_skip = true; + } + + let mapArray = []; + $(data).element("event_1").elements("map_data").forEach((res) => { + let map_id = res.attr().map_id; + + let buildingArray = []; + res.elements("building_data").forEach((res) => { + let building_data = { + map_id, + + pos: res.attr().pos, + building: res.attr().building, + use_tile: res.attr().use_tile, + } + + buildingArray.push(building_data); + }); + + let shopArray = []; + res.elements("shop_data").forEach((res) => { + let shop_data = { + map_id, + + reward_id: res.attr().reward_id, + prog: res.attr().prog, + } + + shopArray.push(shop_data); + }); + + let musicArray = []; + res.elements("music").forEach((res) => { + let music_data = { + music_id: res.attr().music_id, + note_id: res.attr().note_id, + } + + musicArray.push(music_data); + }); // these are saved but will not used for now // + + let map_data = { + map_id, + + play_num: res.attr().play_num, + play_num_uc: res.attr().play_num_uc, + last_select_pos: res.attr().last_select_pos, + map_prog: res.attr().map_prog, + gauge: res.attr().gauge, + tile_num: res.attr().tile_num, + metron_total_get: res.attr().metron_total_get, + metron_total_use: res.attr().metron_total_use, + bank_date: res.attr().bank_date, + grade_bonus: res.attr().grade_bonus, + end_bonus: res.attr().end_bonus, + fbonus: res.attr().fbonus, }; - event_sub_data = { - platform_id: res.attr().platform_id, - channel_id: res.attr("channel").channel_id, - gauge: res.attr("channel").gauge, - channel_play_num: res.attr("channel").play_num, - is_complete: res.element("channel").number("is_complete"), - } - } else { - event_data = { - last_select_channel: res.attr().last_select_channel, - platform_id: res.attr().platform_id, - platform_prog: res.attr().platform_prog, - play_num: res.attr().play_num, - } + mapArray.push([map_data, buildingArray, shopArray, musicArray]); + }); - event_sub_data = { - platform_id: res.attr().platform_id, - channel_id: 0, - gauge: 0, - channel_play_num: 0, - is_complete: 0, - } - } + mapArray.forEach((res) => { + // map_data // + DB.Upsert(refid, { + collection: "event_1", + version: version, + event_data: "myepo_map", + map_id: res[0].map_id, + }, + { + $set: res[0], + }); - DB.Upsert(refid, + // building_data // + res[1].forEach((res) => { + DB.Upsert(refid, { + collection: "event_1_sub", + version: version, + event_data: "myepo_building", + map_id: res.map_id, + pos: res.pos, + }, + { + $set: res, + }); + }); + + // shop_data // + res[2].forEach((res) => { + DB.Upsert(refid, { + collection: "event_1_sub", + version: version, + event_data: "myepo_shop", + map_id: res.map_id, + reward_id: res.reward_id, + }, + { + $set: res, + }); + }); + + // music // + res[3].forEach((res) => { + DB.Upsert(refid, { + collection: "event_1_sub", + version: version, + event_data: "myepo_music", + }, + { + $set: res, + }); + }); + }); + break; + + default: + break; + } + } + + if (hasEvent2Data) { + switch (version) { + case 31: + // TODO:: figure out pack_id, pack_flg, play_pack, erosion_play_num, erosion5_clear12_num // + await DB.Upsert(refid, { collection: "event_1", version: version, - platform_id: event_data.platform_id + event_data: "epores", }, { - $set: event_data, + $set: { + event_play_num: $(data).attr("event_2").event_play_num, + after_play_num: $(data).attr("event_2").after_play_num, + last_select_system_id: $(data).attr("event_2").last_select_system_id, + gate_key: $(data).attr("event_2").gate_key, + after_gauge: $(data).attr("event_2").after_gauge, + last_select_erosion_level: $(data).attr("event_2").last_select_erosion_level, + } } ); - DB.Upsert(refid, - { + $(data).element("event_2").elements("system_data").forEach((res) => { + DB.Upsert(refid, { collection: "event_1_sub", version: version, - platform_id: event_sub_data.platform_id, - channel_id: event_sub_data.channel_id, + event_data: "epores_system", + system_id: res.attr().system_id, }, - { - $set: event_sub_data, - } - ); - }); - } else if (version == 30) { - pcdata.event_play_num += 1; - pcdata.event_last_select_id = parseInt($(data).attr("event_1").last_select_flyer_id); - - let event_data, event_sub_data; - $(data).element("event_1").elements("flyer_data").forEach((res) => { - if (!(_.isNil(res.element("genre_data")))) { - event_data = { - last_select_genre: res.attr().last_select_genre, - flyer_id: res.attr().flyer_id, - flyer_prog: res.attr().flyer_prog, - play_num: res.attr().play_num, - skill_param: res.attr().skill_param, - }; - - event_sub_data = { - flyer_id: res.attr().flyer_id, - genre_id: res.element("genre_data").attr().genre_id, - gauge: res.element("genre_data").attr().gauge, - genre_playnum: res.element("genre_data").attr().play_num, - is_complete: res.element("genre_data").number("is_complete"), - } - } else { - event_data = { - last_select_genre: res.attr().last_select_genre, - flyer_id: res.attr().flyer_id, - flyer_prog: res.attr().flyer_prog, - play_num: res.attr().play_num, - skill_param: res.attr().skill_param, - }; - - event_sub_data = { - flyer_id: res.attr().flyer_id, - genre_id: 0, - gauge: 0, - genre_playnum: 0, - is_complete: 0, - } - } - - DB.Upsert(refid, - { - collection: "event_1", - version: version, - flyer_id: event_data.flyer_id - }, - { - $set: event_data, - } - ); - - DB.Upsert(refid, - { - collection: "event_1_sub", - version: version, - flyer_id: event_sub_data.flyer_id, - genre_id: event_sub_data.genre_id, - }, - { - $set: event_sub_data, - } - ); - }); + { + $set: { + play_num: res.attr().play_num, + unlock_prog: res.attr().unlock_prog, + system_prog: res.attr().system_prog, + gauge: res.attr().gauge, + }, + }); + }); + break; } } @@ -3516,7 +3915,8 @@ export const pcsave: EPR = async (info, data, send) => { }, }); }); - } else if (version >= 27) { + } + else if (version >= 27) { $(data).element("music_memo").elements("music").forEach((res) => { DB.Upsert( refid, @@ -3545,92 +3945,217 @@ export const pcsave: EPR = async (info, data, send) => { let badge_data = []; let badge = $(data).element("badge"); - if (!(_.isNil(badge.element("today_recommend")))) { - let badgeInfo = { - category_id: "today_recommend", - flg_id: 0, - flg: parseInt(badge.element("today_recommend").attr().flg), - }; - - badge_data.push(badgeInfo); - } - - if (!(_.isNil(badge.element("weekly_ranking")))) { - let badgeInfo = { - category_id: "weekly_ranking", - flg_id: 0, - flg: parseInt(badge.element("weekly_ranking").attr().flg), - }; - - badge_data.push(badgeInfo); - } - - if (!(_.isNil(badge.element("visitor")))) { - badge.elements("visitor").forEach((res) => { + if (version == 30) { + if (!(_.isNil(badge.element("today_recommend")))) { let badgeInfo = { - category_id: "visitor", - flg_id: parseInt(res.attr().flg_id), - flg: parseInt(res.attr().flg), + category_id: "today_recommend", + flg_id: 0, + flg: parseInt(badge.element("today_recommend").attr().flg), }; badge_data.push(badgeInfo); - }); - } + } - if (!(_.isNil(badge.element("notes_radar")))) { - badge.elements("notes_radar").forEach((res) => { + if (!(_.isNil(badge.element("weekly_ranking")))) { let badgeInfo = { - category_id: "notes_radar", - flg_id: parseInt(res.attr().flg_id), - flg: parseInt(res.attr().flg), + category_id: "weekly_ranking", + flg_id: 0, + flg: parseInt(badge.element("weekly_ranking").attr().flg), }; badge_data.push(badgeInfo); - }); - } + } - if (!(_.isNil(badge.element("world_tourism")))) { - let badgeInfo = { - category_id: "world_tourism", - flg_id: 0, - flg: parseInt(badge.element("world_tourism").attr().flg), - }; + if (!(_.isNil(badge.element("visitor")))) { + badge.elements("visitor").forEach((res) => { + let badgeInfo = { + category_id: "visitor", + flg_id: parseInt(res.attr().flg_id), + flg: parseInt(res.attr().flg), + }; - badge_data.push(badgeInfo); - } + badge_data.push(badgeInfo); + }); + } - if (!(_.isNil(badge.element("event1")))) { - badge.elements("event1").forEach((res) => { + if (!(_.isNil(badge.element("notes_radar")))) { + badge.elements("notes_radar").forEach((res) => { + let badgeInfo = { + category_id: "notes_radar", + flg_id: parseInt(res.attr().flg_id), + flg: parseInt(res.attr().flg), + }; + + badge_data.push(badgeInfo); + }); + } + + if (!(_.isNil(badge.element("world_tourism")))) { let badgeInfo = { - category_id: "event1", - flg_id: parseInt(res.attr().flg_id), - flg: parseInt(res.attr().flg), + category_id: "world_tourism", + flg_id: 0, + flg: parseInt(badge.element("world_tourism").attr().flg), }; badge_data.push(badgeInfo); - }); - } + } - if (!(_.isNil(badge.element("arena")))) { - badge.elements("arena").forEach((res) => { + if (!(_.isNil(badge.element("event1")))) { + badge.elements("event1").forEach((res) => { + let badgeInfo = { + category_id: "event1", + flg_id: parseInt(res.attr().flg_id), + flg: parseInt(res.attr().flg), + }; + + badge_data.push(badgeInfo); + }); + } + + if (!(_.isNil(badge.element("arena")))) { + badge.elements("arena").forEach((res) => { + let badgeInfo = { + category_id: "arena", + flg_id: parseInt(res.attr().flg_id), + flg: parseInt(res.attr().flg), + }; + + badge_data.push(badgeInfo); + }); + } + + if (!(_.isNil(badge.element("iidx_exam")))) { let badgeInfo = { - category_id: "arena", - flg_id: parseInt(res.attr().flg_id), - flg: parseInt(res.attr().flg), + category_id: "iidx_exam", + flg_id: 0, + flg: parseInt(badge.element("iidx_exam").attr().flg), }; badge_data.push(badgeInfo); - }); + } } + else if (version == 31) { + if (!(_.isNil(badge.element("step_up")))) { + badge.elements("step_up").forEach((res) => { + let badgeInfo = { + category_id: "step_up", + flg_id: parseInt(res.attr().flg_id), + flg: parseInt(res.attr().flg), + }; - if (!(_.isNil(badge.element("iidx_exam")))) { - let badgeInfo = { - category_id: "iidx_exam", - flg_id: 0, - flg: parseInt(badge.element("iidx_exam").attr().flg), - }; + badge_data.push(badgeInfo); + }); + } - badge_data.push(badgeInfo); + if (!(_.isNil(badge.element("today_recommend")))) { + let badgeInfo = { + category_id: "today_recommend", + flg_id: 0, + flg: parseInt(badge.element("today_recommend").attr().flg), + }; + + badge_data.push(badgeInfo); + } + + if (!(_.isNil(badge.element("weekly_ranking")))) { + let badgeInfo = { + category_id: "weekly_ranking", + flg_id: 0, + flg: parseInt(badge.element("weekly_ranking").attr().flg), + }; + + badge_data.push(badgeInfo); + } + + if (!(_.isNil(badge.element("visitor")))) { + badge.elements("visitor").forEach((res) => { + let badgeInfo = { + category_id: "visitor", + flg_id: parseInt(res.attr().flg_id), + flg: parseInt(res.attr().flg), + }; + + badge_data.push(badgeInfo); + }); + } + + if (!(_.isNil(badge.element("notes_radar")))) { + badge.elements("notes_radar").forEach((res) => { + let badgeInfo = { + category_id: "notes_radar", + flg_id: parseInt(res.attr().flg_id), + flg: parseInt(res.attr().flg), + }; + + badge_data.push(badgeInfo); + }); + } + + if (!(_.isNil(badge.element("tsujigiri")))) { + let badgeInfo = { + category_id: "tsujigiri", + flg_id: 0, + flg: parseInt(badge.element("tsujigiri").attr().flg), + }; + + badge_data.push(badgeInfo); + } + + if (!(_.isNil(badge.element("iidx_exam")))) { + let badgeInfo = { + category_id: "iidx_exam", + flg_id: 0, + flg: parseInt(badge.element("iidx_exam").attr().flg), + }; + + badge_data.push(badgeInfo); + } + + if (!(_.isNil(badge.element("world_tourism")))) { + let badgeInfo = { + category_id: "world_tourism", + flg_id: 0, + flg: parseInt(badge.element("world_tourism").attr().flg), + }; + + badge_data.push(badgeInfo); + } + + if (!(_.isNil(badge.element("event1")))) { + badge.elements("event1").forEach((res) => { + let badgeInfo = { + category_id: "event1", + flg_id: 0, + flg: parseInt(res.attr().flg), + }; + + badge_data.push(badgeInfo); + }); + } + + if (!(_.isNil(badge.element("arena")))) { + badge.elements("arena").forEach((res) => { + let badgeInfo = { + category_id: "arena", + flg_id: parseInt(res.attr().flg_id), + flg: parseInt(res.attr().flg), + }; + + badge_data.push(badgeInfo); + }); + } + + if (!(_.isNil(badge.element("event2")))) { + badge.elements("event2").forEach((res) => { + let badgeInfo = { + category_id: "event2", + flg_id: 0, + flg: parseInt(res.attr().flg), + }; + + badge_data.push(badgeInfo); + }); + } } badge_data.forEach((res) => { @@ -3649,6 +4174,124 @@ export const pcsave: EPR = async (info, data, send) => { }); }); } + + if (hasMusicFilter) { + $(data).element("music_filter").elements("folder").forEach((res) => { + DB.Upsert( + refid, + { + collection: "lightning_musicmemo", + version: version, + play_style: parseInt(res.attr().play_style), + folder_id: parseInt(res.attr().folder_id), + filter_id: parseInt(res.attr().filter_id), + }, + { + $set: { + is_valid: res.bool("is_valid"), + value0: parseInt(res.attr().value0), + value1: parseInt(res.attr().value1), + }, + }); + }); + } + + if (hasSkinData) { + let skinData = $(data).elements("skin_equip"); + let note_burst, bomb_size, turntable, judge_font, + note_skin, note_size, lane_cover, pacemaker_cover, + lift_cover, note_beam, note_beam_size, full_combo_splash, frame; + + skinData.forEach((res) => { + switch (parseInt(res.attr().skin_id)) { + case 1: + note_burst = parseInt(res.attr().skin_no); + break; + case 2: + bomb_size = parseInt(res.attr().skin_no); + break; + case 3: + turntable = parseInt(res.attr().skin_no); + break; + case 4: + judge_font = parseInt(res.attr().skin_no); + break; + case 5: + note_skin = parseInt(res.attr().skin_no); + break; + case 6: + note_size = parseInt(res.attr().skin_no); + break; + + case 13: + lane_cover = parseInt(res.attr().skin_no); + break; + case 14: + pacemaker_cover = parseInt(res.attr().skin_no); + break; + case 15: + lift_cover = parseInt(res.attr().skin_no); + break; + case 16: + note_beam = parseInt(res.attr().skin_no); + break; + case 17: + note_beam_size = parseInt(res.attr().skin_no); + break; + case 18: + full_combo_splash = parseInt(res.attr().skin_no); + break; + case 19: + frame = parseInt(res.attr().skin_no); + break; + } + }); + + custom.note_burst = note_burst; + custom.bomb_size = bomb_size; + custom.turntable = turntable; + custom.judge_font = judge_font; + custom.note_skin = note_skin; + custom.note_size = note_size; + + custom.lane_cover = lane_cover; + custom.pacemaker_cover = pacemaker_cover; + custom.lift_cover = lift_cover; + custom.note_beam = note_beam; + custom.note_beam_size = note_beam_size; + custom.full_combo_splash = full_combo_splash; + custom.frame = frame; + } + + if (isTDJ && hasTDJSkinData) { + let skinData = $(data).elements("tdjskin_equip"); + let premium_skin; + let premium_bg; + + skinData.forEach((res) => { + switch (parseInt(res.attr().skin_id)) { + case 0: + premium_skin = parseInt(res.attr().skin_no); + break; + case 1: + premium_bg = parseInt(res.attr().skin_no); + break; + } + }); + + await DB.Upsert( + refid, + { + collection: "lightning_custom", + version: version, + }, + { + $set: { + premium_skin, + premium_bg, + } + }); + } } await DB.Upsert( diff --git a/iidx@asphyxia/handlers/webui.ts b/iidx@asphyxia/handlers/webui.ts index 37217b8..71e3d71 100644 --- a/iidx@asphyxia/handlers/webui.ts +++ b/iidx@asphyxia/handlers/webui.ts @@ -2,6 +2,7 @@ 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 = []; @@ -238,18 +239,20 @@ export const updateCustomSettings = async (data) => { rival_played_folder: StoB(data.rival_played_folder), hide_iidxid: StoB(data.hide_iidxid), disable_beginner_option: StoB(data.disable_beginner_option), - + qpro_head: parseInt(data.qpro_head), qpro_hair: parseInt(data.qpro_hair), qpro_face: parseInt(data.qpro_face), qpro_hand: parseInt(data.qpro_hand), qpro_body: parseInt(data.qpro_body), + qpro_back: parseInt(data.qpro_back), } await DB.Upsert(data.refid, { collection: "custom", version: parseInt(data.version) - }, { + }, + { $set: customize }); @@ -263,14 +266,39 @@ export const updateCustomSettings = async (data) => { } }); } + + if (data.version > 27) { + await DB.Upsert(data.refid, { + collection: "lightning_custom", + version: parseInt(data.version) + }, + { + $set: { + premium_skin: parseInt(data.lm_skin), + premium_bg: parseInt(data.lm_bg), + } + }); + } }; -export const importScoreData = async (data) => { - if (_.isEmpty(data.data)) return; +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 = JSON.parse(data.data); - let version = content.version; - let count = content.count; + 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: @@ -352,7 +380,8 @@ export const importScoreData = async (data) => { break; default: - break; + console.error("[Score Importer] Unregistered score data version"); + return send.error(400, "Invalid data version"); } } @@ -361,6 +390,8 @@ export const exportScoreData = async (data, send: WebUISend) => { collection: "score" }); + if (score == null) return send.error(400, "No data"); + let result = { version: 2, count: score.length, diff --git a/iidx@asphyxia/index.ts b/iidx@asphyxia/index.ts index 022b752..3e67f21 100644 --- a/iidx@asphyxia/index.ts +++ b/iidx@asphyxia/index.ts @@ -99,8 +99,8 @@ export function register() { default: "http://localhost/" }); R.Config("Eisei", { - name: "Eisei Dan Courses", - desc: "Enable EISEI DAN Courses", + name: "Eisei Grade Courses", + desc: "Enable EISEI/KIWAMI Grade Courses", type: "boolean", default: true, }); @@ -458,11 +458,63 @@ export function register() { default: 3, }); - // TODO:: Reflect data when version dropdown menu has been changed // - R.WebUIEvent("updateIIDXRival", updateRivalSettings); - R.WebUIEvent("updateIIDXCustom", updateCustomSettings); - R.WebUIEvent("importScoreData", importScoreData); - R.WebUIEvent("exportScoreData", exportScoreData); + // 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, + }); + + // TODO:: Make a list of customize items // + R.WebUIEvent("iidxGetProfile", async (data, send: WebUISend) => { + const pcdata = await DB.FindOne(data.refid, { + collection: "pcdata", + version: parseInt(data.version), + }); + + return send.json({ + pcdata, + }); + }); + R.WebUIEvent("iidxGetSetting", async (data, send: WebUISend) => { + const custom = await DB.FindOne(data.refid, { + collection: "custom", + version: parseInt(data.version), + }); + + const lm_custom = await DB.FindOne(data.refid, { + collection: "lightning_custom", + version: parseInt(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); @@ -476,6 +528,7 @@ export function register() { R.Route(`IIDX28${method}`, handler); R.Route(`IIDX29${method}`, handler); R.Route(`IIDX30${method}`, handler); + R.Route(`IIDX31${method}`, handler); }; MultiRoute("pc.common", pccommon); diff --git a/iidx@asphyxia/models/custom.ts b/iidx@asphyxia/models/custom.ts index 7e6feb3..a0fd75c 100644 --- a/iidx@asphyxia/models/custom.ts +++ b/iidx@asphyxia/models/custom.ts @@ -25,6 +25,10 @@ export interface custom { skin_customize_flg: number[]; + note_size: number; // epolis // + lift_cover: number; + note_beam_size: number; + // appendsettings rank_folder: boolean; clear_folder: boolean; @@ -46,6 +50,7 @@ export interface custom { qpro_face: number; qpro_hand: number; qpro_body: number; + qpro_back: number; // epolis // // qpro_secret (heroic verse) // qpro_secret_head: string[]; @@ -53,6 +58,7 @@ export interface custom { qpro_secret_face: string[]; qpro_secret_hand: string[]; qpro_secret_body: string[]; + qpro_secret_back: string[]; // epolis // } export const default_custom = { @@ -77,6 +83,10 @@ export const default_custom = { skin_customize_flg: Array(3).fill(-1), + note_size: 0, + lift_cover: 0, + note_beam_size: 0, + rank_folder: true, clear_folder: true, diff_folder: true, @@ -96,10 +106,12 @@ export const default_custom = { qpro_face: 0, qpro_hand: 0, qpro_body: 0, + qpro_back: 0, qpro_secret_head: Array(7).fill("-1"), qpro_secret_hair: Array(7).fill("-1"), qpro_secret_face: Array(7).fill("-1"), qpro_secret_hand: Array(7).fill("-1"), qpro_secret_body: Array(7).fill("-1"), + qpro_secret_back: Array(7).fill("-1"), } diff --git a/iidx@asphyxia/models/lightning.ts b/iidx@asphyxia/models/lightning.ts index 83c7832..0c7a134 100644 --- a/iidx@asphyxia/models/lightning.ts +++ b/iidx@asphyxia/models/lightning.ts @@ -12,7 +12,10 @@ export interface lightning_settings { slider: number[]; light: number[]; concentration: number; -}; + + keyboard_kind: number; // epolis // + brightness: number; +} export interface lightning_playdata { collection: "lightning_playdata"; @@ -21,7 +24,15 @@ export interface lightning_playdata { 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"; @@ -84,6 +95,27 @@ export interface musicmemo_data_new { 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 musicfilter_data { + play_style: number; + folder_id: number; + filter_id: number; + is_valid: boolean; + value0: number; + value1: number; +} + export const lm_playdata = { sp_num: 0, dp_num: 0, @@ -113,4 +145,12 @@ export const lm_settings_new = { 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) // } diff --git a/iidx@asphyxia/models/pcdata.ts b/iidx@asphyxia/models/pcdata.ts index 6fd3a10..325c158 100644 --- a/iidx@asphyxia/models/pcdata.ts +++ b/iidx@asphyxia/models/pcdata.ts @@ -33,6 +33,7 @@ export interface pcdata { fcombo: number[]; ngrade: number; // attribute (BISTROVER) // rtype: number; // attribute (Heroic Verse) // + player_kind: number; // attribute (EPOLIS) // gpos: number; s_sorttype: number; @@ -89,13 +90,15 @@ export interface pcdata { d_timing_split: number; s_visualization: number; d_visualization: number; + s_classic_hispeed: number; // EPOLIS // + d_classic_hispeed: number; secret_flg1: string[]; // secret (Heroic Verse) // secret_flg2: string[]; secret_flg3: string[]; secret_flg4: string[]; - leggendaria_flg1: string[]; // leggendaria (bistrover) // + leggendaria_flg1: string[]; // leggendaria (BISTROVER) // dr_sprank: number[]; // djrank (Heroic Verse) // dr_sppoint: number[]; @@ -113,9 +116,9 @@ export interface pcdata { achi_weeklynum: number; achi_trophy: string[]; // for somewhat reason save throws lots of elements but sending it as-is throws error // - deller: number; // in-game currency (heroic verse) // - orb: number; - present_orb: number; + deller: number; // in-game currency (Lincle) // + orb: number; // v-disc (SPADA) // + present_orb: number; // v-disc but not sure what it does (Rootage) // sgid: number; // grade // dgid: number; @@ -128,9 +131,9 @@ export interface pcdata { jewel_bnum: number[]; party: number[]; - jpoint: number; // jpoint (lincle) // + jpoint: number; // jpoint (Lincle) // - st_sp_ach: number; // step (lincle) // + st_sp_ach: number; // step (Lincle) // st_sp_dif: number; st_dp_ach: number; st_dp_dif: number; @@ -195,6 +198,7 @@ export interface pcdata { event_last_select_type: number; // CastHour // event_story_prog: number; // BISTROVER // event_failed_num: number; + event_skip: boolean; type: number[]; // history (Lincle) // time: number[]; @@ -1301,11 +1305,6 @@ export const IIDX29_pcdata = { leggendaria_flg1: Array(3).fill("-1"), - dr_sprank: Array(15).fill(0), - dr_sppoint: Array(15).fill(0), - dr_dprank: Array(15).fill(0), - dr_dppoint: Array(15).fill(0), - nr_spradar: Array(6).fill(0), nr_dpradar: Array(6).fill(0), @@ -1457,3 +1456,118 @@ export const IIDX30_pcdata = { event_play_num: 0, event_last_select_id: -1, } + +export const IIDX31_pcdata = { + version: 31, + + spnum: 0, + dpnum: 0, + sach: 0, + dach: 0, + mode: 0, + pmode: 0, + ngrade: 0, + rtype: 0, + player_kind: 0, + sp_opt: 0, + dp_opt: 0, + dp_opt2: 0, + gpos: 0, + s_sorttype: 0, + d_sorttype: 0, + s_pace: 0, + d_pace: 0, + s_gno: 0, + d_gno: 0, + s_sub_gno: 0, + d_sub_gno: 0, + s_gtype: 0, + d_gtype: 0, + s_sdlen: 0, + d_sdlen: 0, + s_sdtype: 0, + d_sdtype: 0, + s_timing: 0, + d_timing: 0, + s_notes: 0, + d_notes: 0, + s_judge: 0, + d_judge: 0, + s_judgeAdj: 0, + d_judgeAdj: 0, + s_hispeed: 0, + d_hispeed: 0, + s_liflen: 0, + d_liflen: 0, + s_disp_judge: 0, + d_disp_judge: 0, + s_opstyle: 0, + d_opstyle: 0, + s_graph_score: 0, + d_graph_score: 0, + s_auto_scrach: 0, + d_auto_scrach: 0, + s_gauge_disp: 0, + d_gauge_disp: 0, + s_lane_brignt: 0, + d_lane_brignt: 0, + s_camera_layout: 0, + d_camera_layout: 0, + s_ghost_score: 0, + d_ghost_score: 0, + s_tsujigiri_disp: 0, + d_tsujigiri_disp: 0, + s_auto_adjust: 0, + d_auto_adjust: 0, + s_timing_split: 0, + d_timing_split: 0, + s_visualization: 0, + d_visualization: 0, + s_classic_hispeed: 0, + d_classic_hispeed: 0, + + secret_flg1: Array(3).fill("-1"), + secret_flg2: Array(3).fill("-1"), + secret_flg3: Array(3).fill("-1"), + secret_flg4: Array(3).fill("-1"), + + leggendaria_flg1: Array(3).fill("-1"), + + tourism_secret_flg1: Array(3).fill("-1"), + tourism_secret_flg2: Array(3).fill("-1"), + + nr_spradar: Array(6).fill(0), + nr_dpradar: Array(6).fill(0), + + st_enemy_damage: 0, + st_progress: 0, + st_total_point: 0, + st_enemy_defeat_flg: 0, + st_is_track_ticket: false, + st_sp_level: 0, + st_dp_level: 0, + st_sp_fluctuation: 0, + st_dp_fluctuation: 0, + st_mission_clear_num: 0, + st_sp_mplay: 0, + st_dp_mplay: 0, + st_tips_read_list: 0, + + sgid: -1, + dgid: -1, + + achi_lastweekly: 0, + achi_pack: 0, + achi_packcomp: 0, + achi_rivalcrush: 0, + achi_visitflg: 0, + achi_weeklynum: 0, + + deller: 0, + orb: 0, + present_orb: 0, + + event_play_num: 0, + event_last_select_id: -1, + event_skip: false, +} diff --git a/iidx@asphyxia/models/score.ts b/iidx@asphyxia/models/score.ts index 3b08c9d..6f51f58 100644 --- a/iidx@asphyxia/models/score.ts +++ b/iidx@asphyxia/models/score.ts @@ -36,4 +36,4 @@ export interface old_score { option_1: number; option_2: number; -} \ No newline at end of file +} diff --git a/iidx@asphyxia/pug/KDZ/pcget.pug b/iidx@asphyxia/pug/KDZ/pcget.pug index 0bef298..820e22d 100644 --- a/iidx@asphyxia/pug/KDZ/pcget.pug +++ b/iidx@asphyxia/pug/KDZ/pcget.pug @@ -4,7 +4,7 @@ pc(status="0") - 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 #{custom.disable_musicpreview} 0 0 + 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) diff --git a/iidx@asphyxia/pug/LDJ/21pcget.pug b/iidx@asphyxia/pug/LDJ/21pcget.pug index 55c74aa..2037923 100644 --- a/iidx@asphyxia/pug/LDJ/21pcget.pug +++ b/iidx@asphyxia/pug/LDJ/21pcget.pug @@ -21,7 +21,7 @@ IIDX21pc(status="0") 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 #{custom.disable_musicpreview} 0 0 + 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) diff --git a/iidx@asphyxia/pug/LDJ/22pcget.pug b/iidx@asphyxia/pug/LDJ/22pcget.pug index 761237a..75531ff 100644 --- a/iidx@asphyxia/pug/LDJ/22pcget.pug +++ b/iidx@asphyxia/pug/LDJ/22pcget.pug @@ -21,7 +21,7 @@ IIDX22pc(status="0") 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 #{custom.disable_musicpreview} 0 0 + 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) diff --git a/iidx@asphyxia/pug/LDJ/23pcget.pug b/iidx@asphyxia/pug/LDJ/23pcget.pug index 2be7c0e..ae1a311 100644 --- a/iidx@asphyxia/pug/LDJ/23pcget.pug +++ b/iidx@asphyxia/pug/LDJ/23pcget.pug @@ -22,7 +22,7 @@ IIDX23pc(status="0") 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 #{custom.disable_musicpreview} 0 0 + 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) diff --git a/iidx@asphyxia/pug/LDJ/24pcget.pug b/iidx@asphyxia/pug/LDJ/24pcget.pug index 20a6438..42e7828 100644 --- a/iidx@asphyxia/pug/LDJ/24pcget.pug +++ b/iidx@asphyxia/pug/LDJ/24pcget.pug @@ -23,7 +23,7 @@ IIDX24pc(status="0") 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="17") #{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 #{custom.disable_musicpreview} 0 0 0 0 0 + skin(__type="s16" __count="17") #{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 0 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) diff --git a/iidx@asphyxia/pug/LDJ/25pcget.pug b/iidx@asphyxia/pug/LDJ/25pcget.pug index 9003963..769253c 100644 --- a/iidx@asphyxia/pug/LDJ/25pcget.pug +++ b/iidx@asphyxia/pug/LDJ/25pcget.pug @@ -23,7 +23,7 @@ IIDX25pc(status="0") 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 #{custom.disable_musicpreview} 0 0 + 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) diff --git a/iidx@asphyxia/pug/LDJ/26pcget.pug b/iidx@asphyxia/pug/LDJ/26pcget.pug index d2cd3ff..3764f7b 100644 --- a/iidx@asphyxia/pug/LDJ/26pcget.pug +++ b/iidx@asphyxia/pug/LDJ/26pcget.pug @@ -24,7 +24,7 @@ IIDX26pc(status="0") 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 #{custom.disable_musicpreview} 0 0 + 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) diff --git a/iidx@asphyxia/pug/LDJ/27pcget.pug b/iidx@asphyxia/pug/LDJ/27pcget.pug index 7474f4e..fe85483 100644 --- a/iidx@asphyxia/pug/LDJ/27pcget.pug +++ b/iidx@asphyxia/pug/LDJ/27pcget.pug @@ -28,7 +28,7 @@ IIDX27pc(status="0") detail(grade_type=ed.grade_type grade_id=ed.grade_id stage_num=ed.stage_num clear_type=ed.clear_type) past(__type="s32" __count="5") #{ed.past[0]} #{ed.past[1]} #{ed.past[2]} #{ed.past[3]} #{ed.past[4]} max_past(__type="s32" __count="5") #{ed.max_past[0]} #{ed.max_past[1]} #{ed.max_past[2]} #{ed.max_past[3]} #{ed.max_past[4]} - skin(__type="s16" __count="20") #{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} #{custom.note_beam} #{custom.judge_font} 0 #{custom.disable_musicpreview} #{custom.pacemaker_cover} #{custom.vefx_lock} #{custom.effect} #{custom.bomb_size} #{custom.disable_hcn_color} #{custom.first_note_preview} + skin(__type="s16" __count="20") #{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} #{custom.note_beam} #{custom.judge_font} 0 #{Number(custom.disable_musicpreview)} #{custom.pacemaker_cover} #{Number(custom.vefx_lock)} #{custom.effect} #{custom.bomb_size} #{Number(custom.disable_hcn_color)} #{custom.first_note_preview} 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) diff --git a/iidx@asphyxia/pug/LDJ/28pcget.pug b/iidx@asphyxia/pug/LDJ/28pcget.pug index ffb1bd4..cbc055d 100644 --- a/iidx@asphyxia/pug/LDJ/28pcget.pug +++ b/iidx@asphyxia/pug/LDJ/28pcget.pug @@ -1,7 +1,7 @@ IIDX28pc(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 ngrade=pcdata.ngrade 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_sub_gno=pcdata.s_sub_gno d_sub_gno=pcdata.d_sub_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_graph_score=pcdata.s_graph_score d_graph_score=pcdata.d_graph_score s_auto_scrach=pcdata.s_auto_scrach d_auto_scrach=pcdata.d_auto_scrach s_gauge_disp=pcdata.s_gauge_disp d_gauge_disp=pcdata.d_gauge_disp s_lane_brignt=pcdata.s_lane_brignt d_lane_brignt=pcdata.d_lane_brignt s_camera_layout=pcdata.s_camera_layout d_camera_layout=pcdata.d_camera_layout s_ghost_score=pcdata.s_ghost_score d_ghost_score=pcdata.d_ghost_score s_tsujigiri_disp=pcdata.s_tsujigiri_disp d_tsujigiri_disp=pcdata.d_tsujigiri_disp) lightning_play_data(dpnum=lm_playdata.dp_num spnum=lm_playdata.sp_num) - lightning_setting(headphone_vol=lm_settings.headphone_vol resistance_dp_left=lm_settings.resistance_dp_left resistance_dp_right=lm_settings.resistance_dp_right resistance_sp_left=lm_settings.resistance_sp_left resistance_sp_right=lm_settings.resistance_sp_right skin_0="0" flg_skin_0="-1") + lightning_setting(headphone_vol=lm_settings.headphone_vol resistance_dp_left=lm_settings.resistance_dp_left resistance_dp_right=lm_settings.resistance_dp_right resistance_sp_left=lm_settings.resistance_sp_left resistance_sp_right=lm_settings.resistance_sp_right skin_0=lm_custom.premium_skin flg_skin_0="-1") slider(__type="s32" __count="7") #{lm_settings.slider[0]} #{lm_settings.slider[1]} #{lm_settings.slider[2]} #{lm_settings.slider[3]} #{lm_settings.slider[4]} #{lm_settings.slider[5]} #{lm_settings.slider[6]} light(__type="bool" __count="6") #{lm_settings.light[0]} #{lm_settings.light[1]} #{lm_settings.light[2]} #{lm_settings.light[3]} #{lm_settings.light[4]} #{lm_settings.light[5]} concentration(__type="bool") #{lm_settings.concentration} @@ -35,7 +35,7 @@ IIDX28pc(status="0") selected_course(__type="s32" __count="5") #{ed.selected_course[0]} #{ed.selected_course[1]} #{ed.selected_course[2]} #{ed.selected_course[3]} #{ed.selected_course[4]} max_past(__type="s32" __count="5") #{ed.max_past[0]} #{ed.max_past[1]} #{ed.max_past[2]} #{ed.max_past[3]} #{ed.max_past[4]} max_selected_course(__type="s32" __count="5") #{ed.max_selected_course[0]} #{ed.max_selected_course[1]} #{ed.max_selected_course[2]} #{ed.max_selected_course[3]} #{ed.max_selected_course[4]} - skin(__type="s16" __count="20") #{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} #{custom.note_beam} #{custom.judge_font} 0 #{custom.disable_musicpreview} #{custom.pacemaker_cover} #{custom.vefx_lock} #{custom.effect} #{custom.bomb_size} #{custom.disable_hcn_color} #{custom.first_note_preview} + skin(__type="s16" __count="20") #{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} #{custom.note_beam} #{custom.judge_font} 0 #{Number(custom.disable_musicpreview)} #{custom.pacemaker_cover} #{Number(custom.vefx_lock)} #{custom.effect} #{custom.bomb_size} #{Number(custom.disable_hcn_color)} #{custom.first_note_preview} 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) diff --git a/iidx@asphyxia/pug/LDJ/29pcget.pug b/iidx@asphyxia/pug/LDJ/29pcget.pug index 0bf2a58..539b6aa 100644 --- a/iidx@asphyxia/pug/LDJ/29pcget.pug +++ b/iidx@asphyxia/pug/LDJ/29pcget.pug @@ -1,7 +1,7 @@ IIDX29pc(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 ngrade=pcdata.ngrade 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_sub_gno=pcdata.s_sub_gno d_sub_gno=pcdata.d_sub_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_graph_score=pcdata.s_graph_score d_graph_score=pcdata.d_graph_score s_auto_scrach=pcdata.s_auto_scrach d_auto_scrach=pcdata.d_auto_scrach s_gauge_disp=pcdata.s_gauge_disp d_gauge_disp=pcdata.d_gauge_disp s_lane_brignt=pcdata.s_lane_brignt d_lane_brignt=pcdata.d_lane_brignt s_camera_layout=pcdata.s_camera_layout d_camera_layout=pcdata.d_camera_layout s_ghost_score=pcdata.s_ghost_score d_ghost_score=pcdata.d_ghost_score s_tsujigiri_disp=pcdata.s_tsujigiri_disp d_tsujigiri_disp=pcdata.d_tsujigiri_disp s_auto_adjust=pcdata.s_auto_adjust d_auto_adjust=pcdata.d_auto_adjust) lightning_play_data(dpnum=lm_playdata.dp_num spnum=lm_playdata.sp_num) - lightning_setting(headphone_vol=lm_settings.headphone_vol resistance_dp_left=lm_settings.resistance_dp_left resistance_dp_right=lm_settings.resistance_dp_right resistance_sp_left=lm_settings.resistance_sp_left resistance_sp_right=lm_settings.resistance_sp_right skin_0="0" flg_skin_0="-1") + lightning_setting(headphone_vol=lm_settings.headphone_vol resistance_dp_left=lm_settings.resistance_dp_left resistance_dp_right=lm_settings.resistance_dp_right resistance_sp_left=lm_settings.resistance_sp_left resistance_sp_right=lm_settings.resistance_sp_right skin_0=lm_custom.premium_skin flg_skin_0="-1") slider(__type="s32" __count="7") #{lm_settings.slider[0]} #{lm_settings.slider[1]} #{lm_settings.slider[2]} #{lm_settings.slider[3]} #{lm_settings.slider[4]} #{lm_settings.slider[5]} #{lm_settings.slider[6]} light(__type="bool" __count="10") #{lm_settings.light[0]} #{lm_settings.light[1]} #{lm_settings.light[2]} #{lm_settings.light[3]} #{lm_settings.light[4]} #{lm_settings.light[5]} #{lm_settings.light[6]} #{lm_settings.light[7]} #{lm_settings.light[8]} #{lm_settings.light[9]} concentration(__type="bool") #{lm_settings.concentration} @@ -35,7 +35,7 @@ IIDX29pc(status="0") selected_course(__type="s32" __count="3") #{ed.selected_course[0]} #{ed.selected_course[1]} #{ed.selected_course[2]} max_past(__type="s32" __count="3") #{ed.max_past[0]} #{ed.max_past[1]} #{ed.max_past[2]} max_selected_course(__type="s32" __count="3") #{ed.max_selected_course[0]} #{ed.max_selected_course[1]} #{ed.max_selected_course[2]} - skin(__type="s16" __count="20") #{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} #{custom.note_beam} #{custom.judge_font} 0 #{custom.disable_musicpreview} #{custom.pacemaker_cover} #{custom.vefx_lock} #{custom.effect} #{custom.bomb_size} #{custom.disable_hcn_color} #{custom.first_note_preview} + skin(__type="s16" __count="20") #{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} #{custom.note_beam} #{custom.judge_font} 0 #{Number(custom.disable_musicpreview)} #{custom.pacemaker_cover} #{Number(custom.vefx_lock)} #{custom.effect} #{custom.bomb_size} #{Number(custom.disable_hcn_color)} #{custom.first_note_preview} 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) diff --git a/iidx@asphyxia/pug/LDJ/30pcget.pug b/iidx@asphyxia/pug/LDJ/30pcget.pug index 534ced8..6e00673 100644 --- a/iidx@asphyxia/pug/LDJ/30pcget.pug +++ b/iidx@asphyxia/pug/LDJ/30pcget.pug @@ -1,14 +1,13 @@ IIDX30pc(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 ngrade=pcdata.ngrade 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_sub_gno=pcdata.s_sub_gno d_sub_gno=pcdata.d_sub_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_graph_score=pcdata.s_graph_score d_graph_score=pcdata.d_graph_score s_auto_scrach=pcdata.s_auto_scrach d_auto_scrach=pcdata.d_auto_scrach s_gauge_disp=pcdata.s_gauge_disp d_gauge_disp=pcdata.d_gauge_disp s_lane_brignt=pcdata.s_lane_brignt d_lane_brignt=pcdata.d_lane_brignt s_camera_layout=pcdata.s_camera_layout d_camera_layout=pcdata.d_camera_layout s_ghost_score=pcdata.s_ghost_score d_ghost_score=pcdata.d_ghost_score s_tsujigiri_disp=pcdata.s_tsujigiri_disp d_tsujigiri_disp=pcdata.d_tsujigiri_disp s_auto_adjust=pcdata.s_auto_adjust d_auto_adjust=pcdata.d_auto_adjust s_timing_split=pcdata.s_timing_split d_timing_split=pcdata.d_timing_split s_visualization=pcdata.s_visualization d_visualization=pcdata.d_visualization) lightning_play_data(dpnum=lm_playdata.dp_num spnum=lm_playdata.sp_num) - lightning_setting(headphone_vol=lm_settings.headphone_vol resistance_dp_left=lm_settings.resistance_dp_left resistance_dp_right=lm_settings.resistance_dp_right resistance_sp_left=lm_settings.resistance_sp_left resistance_sp_right=lm_settings.resistance_sp_right skin_0="0" flg_skin_0="-1") + lightning_setting(headphone_vol=lm_settings.headphone_vol resistance_dp_left=lm_settings.resistance_dp_left resistance_dp_right=lm_settings.resistance_dp_right resistance_sp_left=lm_settings.resistance_sp_left resistance_sp_right=lm_settings.resistance_sp_right skin_0=lm_custom.premium_skin flg_skin_0="-1") slider(__type="s32" __count="7") #{lm_settings.slider[0]} #{lm_settings.slider[1]} #{lm_settings.slider[2]} #{lm_settings.slider[3]} #{lm_settings.slider[4]} #{lm_settings.slider[5]} #{lm_settings.slider[6]} light(__type="bool" __count="10") #{lm_settings.light[0]} #{lm_settings.light[1]} #{lm_settings.light[2]} #{lm_settings.light[3]} #{lm_settings.light[4]} #{lm_settings.light[5]} #{lm_settings.light[6]} #{lm_settings.light[7]} #{lm_settings.light[8]} #{lm_settings.light[9]} concentration(__type="bool") #{lm_settings.concentration} spdp_rival(flg="-1") bind_eaappli ea_premium_course - enable_qr_reward secret flg1(__type="s64" __count="3") -1 -1 -1 flg2(__type="s64" __count="3") -1 -1 -1 @@ -36,7 +35,7 @@ IIDX30pc(status="0") selected_course(__type="s32" __count="3") #{ed.selected_course[0]} #{ed.selected_course[1]} #{ed.selected_course[2]} max_past(__type="s32" __count="3") #{ed.max_past[0]} #{ed.max_past[1]} #{ed.max_past[2]} max_selected_course(__type="s32" __count="3") #{ed.max_selected_course[0]} #{ed.max_selected_course[1]} #{ed.max_selected_course[2]} - skin(__type="s16" __count="20") #{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} #{custom.note_beam} #{custom.judge_font} 0 #{custom.disable_musicpreview} #{custom.pacemaker_cover} #{custom.vefx_lock} #{custom.effect} #{custom.bomb_size} #{custom.disable_hcn_color} #{custom.first_note_preview} + skin(__type="s16" __count="20") #{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} #{custom.note_beam} #{custom.judge_font} 0 #{Number(custom.disable_musicpreview)} #{custom.pacemaker_cover} #{Number(custom.vefx_lock)} #{custom.effect} #{custom.bomb_size} #{Number(custom.disable_hcn_color)} #{custom.first_note_preview} 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) diff --git a/iidx@asphyxia/pug/LDJ/31pcget.pug b/iidx@asphyxia/pug/LDJ/31pcget.pug new file mode 100644 index 0000000..350dec5 --- /dev/null +++ b/iidx@asphyxia/pug/LDJ/31pcget.pug @@ -0,0 +1,108 @@ +IIDX31pc(status="0" qproback=custom.qpro_back) + 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 ngrade=pcdata.ngrade rtype=pcdata.rtype player_kind=pcdata.player_kind 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_sub_gno=pcdata.s_sub_gno d_sub_gno=pcdata.d_sub_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_graph_score=pcdata.s_graph_score d_graph_score=pcdata.d_graph_score s_auto_scrach=pcdata.s_auto_scrach d_auto_scrach=pcdata.d_auto_scrach s_gauge_disp=pcdata.s_gauge_disp d_gauge_disp=pcdata.d_gauge_disp s_lane_brignt=pcdata.s_lane_brignt d_lane_brignt=pcdata.d_lane_brignt s_camera_layout=pcdata.s_camera_layout d_camera_layout=pcdata.d_camera_layout s_ghost_score=pcdata.s_ghost_score d_ghost_score=pcdata.d_ghost_score s_tsujigiri_disp=pcdata.s_tsujigiri_disp d_tsujigiri_disp=pcdata.d_tsujigiri_disp s_auto_adjust=pcdata.s_auto_adjust d_auto_adjust=pcdata.d_auto_adjust s_timing_split=pcdata.s_timing_split d_timing_split=pcdata.d_timing_split s_visualization=pcdata.s_visualization d_visualization=pcdata.d_visualization s_classic_hispeed=pcdata.s_classic_hispeed d_classic_hispeed=pcdata.d_classic_hispeed) + lightning_play_data(dpnum=lm_playdata.dp_num spnum=lm_playdata.sp_num) + lightning_setting(headphone_vol=lm_settings.headphone_vol resistance_dp_left=lm_settings.resistance_dp_left resistance_dp_right=lm_settings.resistance_dp_right resistance_sp_left=lm_settings.resistance_sp_left resistance_sp_right=lm_settings.resistance_sp_right keyboard_kind=lm_settings.keyboard_kind brightness=lm_settings.brightness) + slider(__type="s32" __count="7") #{lm_settings.slider[0]} #{lm_settings.slider[1]} #{lm_settings.slider[2]} #{lm_settings.slider[3]} #{lm_settings.slider[4]} #{lm_settings.slider[5]} #{lm_settings.slider[6]} + light(__type="bool" __count="10") #{lm_settings.light[0]} #{lm_settings.light[1]} #{lm_settings.light[2]} #{lm_settings.light[3]} #{lm_settings.light[4]} #{lm_settings.light[5]} #{lm_settings.light[6]} #{lm_settings.light[7]} #{lm_settings.light[8]} #{lm_settings.light[9]} + concentration(__type="bool") #{lm_settings.concentration} + spdp_rival(flg="-1") + bind_eaappli + ea_premium_course + 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 + flg4(__type="s64" __count="3") -1 -1 -1 + leggendaria + flg1(__type="s64" __count="3") -1 -1 -1 + music_memo + - for (let m of mArray) + folder(play_style=m.play_style folder_id=m.folder_idx name=m.folder_name) + music_id(__type="s32" __count="10") #{m.music_ids[0]} #{m.music_ids[1]} #{m.music_ids[2]} #{m.music_ids[3]} #{m.music_ids[4]} #{m.music_ids[5]} #{m.music_ids[6]} #{m.music_ids[7]} #{m.music_ids[8]} #{m.music_ids[9]} + music_filter + - for (let f of fArray) + folder(play_style=f.play_style folder_id=f.folder_id filter_id=f.filter_id value0=f.value0 value1=f.value1) + is_valid(__type="bool") #{f.is_valid} + qpro_secret + head(__type="s64" __count="7") #{custom.qpro_secret_head[0]} #{custom.qpro_secret_head[1]} #{custom.qpro_secret_head[2]} #{custom.qpro_secret_head[3]} #{custom.qpro_secret_head[4]} #{custom.qpro_secret_head[5]} #{custom.qpro_secret_head[6]} + hair(__type="s64" __count="7") #{custom.qpro_secret_hair[0]} #{custom.qpro_secret_hair[1]} #{custom.qpro_secret_hair[2]} #{custom.qpro_secret_hair[3]} #{custom.qpro_secret_hair[4]} #{custom.qpro_secret_hair[5]} #{custom.qpro_secret_hair[6]} + face(__type="s64" __count="7") #{custom.qpro_secret_face[0]} #{custom.qpro_secret_face[1]} #{custom.qpro_secret_face[2]} #{custom.qpro_secret_face[3]} #{custom.qpro_secret_face[4]} #{custom.qpro_secret_face[5]} #{custom.qpro_secret_face[6]} + body(__type="s64" __count="7") #{custom.qpro_secret_body[0]} #{custom.qpro_secret_body[1]} #{custom.qpro_secret_body[2]} #{custom.qpro_secret_body[3]} #{custom.qpro_secret_body[4]} #{custom.qpro_secret_body[5]} #{custom.qpro_secret_body[6]} + hand(__type="s64" __count="7") #{custom.qpro_secret_hand[0]} #{custom.qpro_secret_hand[1]} #{custom.qpro_secret_hand[2]} #{custom.qpro_secret_hand[3]} #{custom.qpro_secret_hand[4]} #{custom.qpro_secret_hand[5]} #{custom.qpro_secret_hand[6]} + back(__type="s64" __count="7") #{custom.qpro_secret_back[0]} #{custom.qpro_secret_back[1]} #{custom.qpro_secret_back[2]} #{custom.qpro_secret_back[3]} #{custom.qpro_secret_back[4]} #{custom.qpro_secret_back[5]} #{custom.qpro_secret_back[6]} + 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]} + kiwami_data + - for (let ed of eArray) + detail(grade_type=ed.grade_type grade_id=ed.grade_id option=ed.option stage_num=ed.stage_num clear_type=ed.clear_type) + past(__type="s32" __count="3") #{ed.past[0]} #{ed.past[1]} #{ed.past[2]} + selected_course(__type="s32" __count="3") #{ed.selected_course[0]} #{ed.selected_course[1]} #{ed.selected_course[2]} + max_past(__type="s32" __count="3") #{ed.max_past[0]} #{ed.max_past[1]} #{ed.max_past[2]} + max_selected_course(__type="s32" __count="3") #{ed.max_selected_course[0]} #{ed.max_selected_course[1]} #{ed.max_selected_course[2]} + skin(__type="s32" __count="20") #{appendsettings} #{custom.note_burst} #{custom.bomb_size} #{custom.turntable} #{custom.judge_font} #{custom.note_skin} #{custom.note_size} #{Number(custom.disable_musicpreview)} #{Number(custom.vefx_lock)} #{custom.effect} #{custom.menu_music} #{Number(custom.disable_hcn_color)} #{custom.first_note_preview} #{custom.lane_cover} #{custom.pacemaker_cover} #{custom.lift_cover} #{custom.note_beam} #{custom.note_beam_size} #{custom.full_combo_splash} #{custom.frame} + tdjskin(__type="s16" __count="4") #{lm_custom.premium_skin} #{lm_custom.premium_bg} 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]) + is_robo(__type="bool") 0 + qprodata(body=rd.qprodata[3] face=rd.qprodata[2] hair=rd.qprodata[0] hand=rd.qprodata[4] head=rd.qprodata[1] back=rd.qprodata[5]) + shop(name=shop_data.opname) + notes_radar(style="0") + radar_score(__type="s32" __count="6") #{pcdata.nr_spradar[0]} #{pcdata.nr_spradar[1]} #{pcdata.nr_spradar[2]} #{pcdata.nr_spradar[3]} #{pcdata.nr_spradar[4]} #{pcdata.nr_spradar[5]} + notes_radar(style="1") + radar_score(__type="s32" __count="6") #{pcdata.nr_dpradar[0]} #{pcdata.nr_dpradar[1]} #{pcdata.nr_dpradar[2]} #{pcdata.nr_dpradar[3]} #{pcdata.nr_dpradar[4]} #{pcdata.nr_dpradar[5]} + visitor(anum="10" snum="10" pnum="10" vs_flg="1") + step(enemy_damage=pcdata.st_enemy_damage progress=pcdata.st_progress total_point=pcdata.st_total_point enemy_defeat_flg=pcdata.st_enemy_defeat_flg sp_level=pcdata.st_sp_level dp_level=pcdata.st_dp_level sp_fluctuation=pcdata.st_sp_fluctuation dp_fluctuation=pcdata.st_dp_fluctuation mission_clear_num=pcdata.st_mission_clear_num sp_mplay=pcdata.st_sp_mplay dp_mplay=pcdata.st_dp_mplay tips_read_list=pcdata.st_tips_read_list) + is_track_ticket(__type="bool") #{pcdata.st_is_track_ticket} + packinfo(music_0="-1" music_1="-1" music_2="-1" pack_id="1") + achievements(last_weekly=pcdata.achi_lastweekly pack=pcdata.achi_pack pack_comp=pcdata.achi_packcomp rival_crush=pcdata.achi_rivalcrush visit_flg=pcdata.achi_visitflg weekly_num=pcdata.achi_weeklynum) + deller(deller=pcdata.deller rate="1") + orb_data(rest_orb=pcdata.orb present_orb=pcdata.present_orb) + old_linkage_secret_flg(bemani_mixup="-1" ccj_linkage="-1" triple_tribe="-1") + arena_data(play_num="2" play_num_dp="1" play_num_sp="1" prev_best_class_sp="20" prev_best_class_dp="20") + achieve_data(play_style="0" arena_class="20" rating_value="20" now_top_class_continuing="0" best_top_class_continuing="0" win_count="0" now_winning_streak_count="0" best_winning_streak_count="0" perfect_win_count="0" counterattack_num="0" mission_clear_num="0") + achieve_data(play_style="1" arena_class="20" rating_value="20" now_top_class_continuing="0" best_top_class_continuing="0" win_count="0" now_winning_streak_count="0" best_winning_streak_count="0" perfect_win_count="0" counterattack_num="0" mission_clear_num="0") + cube_data(cube="0" season_id="0") + chat_data(chat_type_0="CHAT CUSTOM 1" chat_type_1="CHAT CUSTOM 2" chat_type_2="CHAT CUSTOM 3" chat_type_3="CHAT CUSTOM 4") + is_chat_0(__type="bool") 1 + is_chat_1(__type="bool") 1 + is_chat_2(__type="bool") 1 + is_chat_3(__type="bool") 1 + skin_customize_flg(skin_frame_flg="-1" skin_turntable_flg="-1" skin_bomb_flg="-1" skin_bgm_flg="-1" skin_lane_flg0="-1" skin_lane_flg1="-1" skin_lane_flg2="-1" skin_lane_flg3="-1" skin_lane_flg4="-1" skin_lane_flg5="-1" skin_notes_flg="-1" skin_fullcombo_flg="-1" skin_keybeam_flg="-1" skin_judgestring_flg="-1") + tdjskin_customize_flg(skin_submonitor_flg="-1" skin_subbg_flg="-1") + event_1(event_play_num=pcdata.event_play_num last_select_map_id=pcdata.event_last_select_id) + if pcdata.event_skip == true + is_skip + - for (let evt of evtArray) + map_data(map_id=evt.map_id play_num=evt.play_num play_num_uc=evt.play_num_uc last_select_pos=evt.last_select_pos map_prog=evt.map_prog gauge=evt.gauge tile_num=evt.tile_num metron_total_get=evt.metron_total_get metron_total_use=evt.metron_total_use bank_date=evt.bank_date grade_bonus=evt.grade_bonus end_bonus=evt.end_bonus carryover_use=evt.carryover_use) + - for (let evt2 of evtArray2) + building_data(map_id=evt2.map_id pos=evt2.pos building=evt2.building use_tile=evt2.use_tile) + - for (let evt3 of evtArray3) + shop_data(map_id=evt3.map_id reward_id=evt3.reward_id prog=evt3.prog) + if epo_res != null + event_2(event_play_num=epo_res.event_play_num after_play_num=epo_res.after_play_num last_select_system_id=epo_res.last_select_system_id gate_key=epo_res.gate_key after_gauge=epo_res.after_gauge last_select_erosion_level=epo_res.last_select_erosion_level pack="-1" erosion_play_num="10" erosion5_clear12_num="10") + - for (let data of epo_res_sub) + system_data(system_id=data.system_id play_num=data.play_num unlock_prog=data.unlock_prog system_prog=data.system_prog gauge=data.gauge) + ultimate_mobile_link(music_list="-1") + link_flag + valkyrie_linkage(music_list_1="-1" music_list_2="-1" music_list_3="-1") + ccj_linkage(music_list="-1") + triple_tribe_2(music_list="-1") + language_setting(language=profile.language) + movie_agreement(agreement_version="1") + movie_setting + hide_name(__type="bool") 0 + world_tourism + - for (let wd of wArray) + tour_data(tour_id=wd.tour_id progress=wd.progress) + world_tourism_secret_flg + flg1(__type="s64" __count="3") -1 -1 -1 + flg2(__type="s64" __count="3") -1 -1 -1 + world_tourism_setting + booster(__type="bool") 1 + bpl_s4_music_unlock + badge + - for (let b of bArray) + badge_data(category_id=b.id badge_flg_id=b.flg_id badge_flg=b.flg) diff --git a/iidx@asphyxia/pug/LDJ/pcget.pug b/iidx@asphyxia/pug/LDJ/pcget.pug index f3a3269..3a1d916 100644 --- a/iidx@asphyxia/pug/LDJ/pcget.pug +++ b/iidx@asphyxia/pug/LDJ/pcget.pug @@ -13,7 +13,7 @@ pc(status="0") 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 #{custom.disable_musicpreview} 0 0 + 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) diff --git a/iidx@asphyxia/util.ts b/iidx@asphyxia/util.ts index c9604e4..eed9388 100644 --- a/iidx@asphyxia/util.ts +++ b/iidx@asphyxia/util.ts @@ -106,7 +106,7 @@ export function HextoBase64(hex: string) { let i = 0; for (let i = 0; i < hex.length; i += 2) { - const hexByte = hex.substr(i, 2); + const hexByte = hex.slice(i, i + 2); const byteValue = parseInt(hexByte, 16); buffer.push(byteValue); } @@ -144,7 +144,7 @@ export function NumArrayToString(bits: number[], numArray: number[]): string { let result = ""; let numIdx = 0; - if (numArray != null && !_.isNaN(numArray[0])) { + if (!_.isNil(numArray) && !_.isNaN(numArray[0])) { let numArrayIdx = 0; if (numArray.length > 0) { let combined = 0; @@ -181,7 +181,7 @@ export function NumArrayToString(bits: number[], numArray: number[]): string { export function GetVersion(info: EamuseInfo) { let version = -1; - switch (info.model.substring(0, 3)) { + switch (info.model.slice(0, 3)) { case "GLD": return 14; case "HDD": return 15; case "I00": return 16; @@ -189,7 +189,7 @@ export function GetVersion(info: EamuseInfo) { case "JDZ": return 18; case "KDZ": return 19; case "LDJ": - version = parseInt(info.module.substring(4, 6)); + version = parseInt(info.module.slice(4, 6)); if (_.isNaN(version)) version = 20; break; } @@ -305,17 +305,30 @@ export async function ReftoQPRO(refid: string, version: number) { }); let qpro_data = []; - try { - qpro_data = [ - custom.qpro_hair, - custom.qpro_head, - custom.qpro_face, - custom.qpro_body, - custom.qpro_hand, - ]; + switch (version) { + case 31: + qpro_data = [ + custom.qpro_hair, + custom.qpro_head, + custom.qpro_face, + custom.qpro_body, + custom.qpro_hand, + custom.qpro_back, + ]; + break; + default: + qpro_data = [ + custom.qpro_hair, + custom.qpro_head, + custom.qpro_face, + custom.qpro_body, + custom.qpro_hand, + ]; + break; + } } catch { - qpro_data = [0, 0, 0, 0, 0]; + qpro_data = [0, 0, 0, 0, 0, 0]; } return qpro_data; diff --git a/iidx@asphyxia/webui/asset/js/detail.js b/iidx@asphyxia/webui/asset/js/detail.js new file mode 100644 index 0000000..72dccb5 --- /dev/null +++ b/iidx@asphyxia/webui/asset/js/detail.js @@ -0,0 +1,31 @@ +$("#version").on("change", function () { + $.ajax({ + type: "post", + url: "/emit/iidxGetProfile", + data: { + refid: refid, + version: this.value, + }, + dataType: "text", + success: function (result) { + let data = JSON.parse(result); + + if (data["pcdata"] == null) { + alert("Theres no profile data available on this version!"); + return; + } + + let sp_grade = data["pcdata"].sgid; + let dp_grade = data["pcdata"].dgid; + + if (sp_grade == -1) sp_grade = "----"; + if (dp_grade == -1) dp_grade = "----"; + + $("#sp_grade").text(sp_grade); + $("#dp_grade").text(dp_grade); + }, + error: function () { + alert("Unable to process data"); + } + }); +}); diff --git a/iidx@asphyxia/webui/asset/js/setting.js b/iidx@asphyxia/webui/asset/js/setting.js new file mode 100644 index 0000000..7657171 --- /dev/null +++ b/iidx@asphyxia/webui/asset/js/setting.js @@ -0,0 +1,80 @@ +$("#version").on("change", function () { + $.ajax({ + type: "post", + url: "/emit/iidxGetSetting", + data: { + refid: refid, + version: this.value, + }, + dataType: "text", + success: function (result) { + let data = JSON.parse(result); + + if (data["custom"] == null) { + alert("Theres no customize data available on this version!"); + return; + } + + $("#frame").val(data["custom"].frame); + $("#turntable").val(data["custom"].turntable); + $("#note_burst").val(data["custom"].note_burst); + $("#menu_music").val(data["custom"].menu_music); + $("#lane_cover").val(data["custom"].lane_cover); + $("#category_vox").val(data["custom"].category_vox); + $("#note_skin").val(data["custom"].note_skin); + $("#full_combo_splash").val(data["custom"].full_combo_splash); + $("#note_beam").val(data["custom"].note_beam); + $("#judge_font").val(data["custom"].judge_font); + $("#disable_musicpreview").prop("checked", data["custom"].disable_musicpreview); + $("#pacemaker_cover").val(data["custom"].pacemaker_cover); + $("#vefx_lock").prop("checked", data["custom"].vefx_lock); + $("#effect").val(data["custom"].effect); + $("#bomb_size").val(data["custom"].bomb_size); + $("#disable_hcn_color").prop("checked", data["custom"].disable_hcn_color); + $("#first_note_preview").val(data["custom"].first_note_preview); + + if (data["custom"].note_size == undefined) $("#note_size").val(0); + else $("#note_size").val(data["custom"].note_size); + if (data["custom"].lift_cover == undefined) $("#lift_cover").val(0); + else $("#lift_cover").val(data["custom"].lift_cover); + if (data["custom"].note_beam_size == undefined) $("#note_beam_size").val(0); + else $("#note_beam_size").val(data["custom"].note_beam_size); + + $("#rank_folder").prop("checked", data["custom"].rank_folder); + $("#clear_folder").prop("checked", data["custom"].clear_folder); + $("#diff_folder").prop("checked", data["custom"].diff_folder); + $("#alpha_folder").prop("checked", data["custom"].alpha_folder); + $("#rival_folder").prop("checked", data["custom"].rival_folder); + $("#rival_battle_folder").prop("checked", data["custom"].rival_battle_folder); + $("#rival_info").prop("checked", data["custom"].rival_info); + $("#hide_playcount").prop("checked", data["custom"].hide_playcount); + $("#disable_graph_cutin").prop("checked", data["custom"].disable_graph_cutin); + $("#class_hispeed").prop("checked", data["custom"].class_hispeed); + $("#rival_played_folder").prop("checked", data["custom"].rival_played_folder); + $("#hide_iidxid").prop("checked", data["custom"].hide_iidxid); + + if (data["custom"].disable_beginner_option == undefined) $("#disable_beginner_option").prop("checked", false); + else $("#disable_beginner_option").prop("checked", data["custom"].disable_beginner_option); + + $("#qpro_head").val(data["custom"].qpro_head); + $("#qpro_hair").val(data["custom"].qpro_hair); + $("#qpro_hand").val(data["custom"].qpro_hand); + $("#qpro_face").val(data["custom"].qpro_face); + $("#qpro_body").val(data["custom"].qpro_body); + + if (data["custom"].qpro_back == undefined) $("#qpro_back").val(0); + else $("#qpro_back").val(data["custom"].qpro_back); + + if (data["lm_custom"] == null) { + $("#lm_skin").val(0); + $("#lm_bg").val(0); + } else { + $("#lm_skin").val(data["lm_custom"].premium_skin); + $("#lm_bg").val(data["lm_custom"].premium_bg); + } + }, + error: function () { + alert("Unable to process data"); + } + }); +}); diff --git a/iidx@asphyxia/webui/profile_-----detail.pug b/iidx@asphyxia/webui/profile_-----detail.pug index 601157a..80d66df 100644 --- a/iidx@asphyxia/webui/profile_-----detail.pug +++ b/iidx@asphyxia/webui/profile_-----detail.pug @@ -20,7 +20,8 @@ 27, 28, 29, - 30 + 30, + 31 ]; div @@ -36,30 +37,31 @@ div .ver-select .control .select - select(name="version") + select(id="version") each i in version option(selected=(i==pcdata.version)) #{i} .field label.label Name .body - body #{profile.name} + p(id="name") #{profile.name} .field label.label IIDX ID .body - body #{profile.idstr} + p(id="iidxid") #{profile.idstr} .field label.label SP Grade .body - const a = pcdata.sgid if a==-1 - body ---- + p(id="sp_grade") ---- else - body #{pcdata.sgid} + p(id="sp_grade") #{pcdata.sgid} .field label.label DP Grade .body - const b = pcdata.dgid if b==-1 - body ---- + p(id="dp_grade") ---- else - body #{pcdata.dgid} + p(id="dp_grade") #{pcdata.dgid} +script(src="static/asset/js/detail.js") diff --git a/iidx@asphyxia/webui/profile_----setting.pug b/iidx@asphyxia/webui/profile_----setting.pug index e373c70..cd5e56b 100644 --- a/iidx@asphyxia/webui/profile_----setting.pug +++ b/iidx@asphyxia/webui/profile_----setting.pug @@ -2,6 +2,7 @@ profile: DB.FindOne(refid, { collection: "profile" }) pcdata: DB.FindOne(refid, { collection: "pcdata" }) custom: DB.FindOne(refid, { collection: "custom" }) + lm_custom: DB.FindOne(refid, { collection: "lightning_custom" }) - const version = [ @@ -21,7 +22,8 @@ 27, 28, 29, - 30 + 30, + 31 ]; div @@ -32,7 +34,7 @@ div i.mdi.mdi-account-edit | Settings .card-content - form(method="post" action="/emit/updateIIDXCustom") + form(method="post" action="/emit/iidxUpdateCustom") .field input(type="text" name="refid", value=refid readonly hidden) label.label IIDX ID @@ -42,161 +44,197 @@ div label.label Version .control .select - select(name="version") + select(name="version", id="version") each i in version option(selected=(i==pcdata.version)) #{i} .field label.label Name .control - input.input(type="text" name="name", value=profile.name) + input.input(type="text" name="name", id="name", value=profile.name) //- SKIN .field label.label Frame .control - input.input(type="number" name="frame", value=custom.frame) + input.input(type="number" name="frame", id="frame", value=custom.frame) .field label.label Turntable .control - input.input(type="number" name="turntable", value=custom.turntable) + input.input(type="number" name="turntable", id="turntable", value=custom.turntable) .field label.label Note Burst .control - input.input(type="number" name="note_burst", value=custom.note_burst) + input.input(type="number" name="note_burst", id="note_burst", value=custom.note_burst) .field label.label Menu Music .control - input.input(type="number" name="menu_music", value=custom.menu_music) + input.input(type="number" name="menu_music", id="menu_music", value=custom.menu_music) .field label.label Lane Cover .control - input.input(type="number" name="lane_cover", value=custom.lane_cover) + input.input(type="number" name="lane_cover", id="lane_cover", value=custom.lane_cover) .field label.label Category Voice .control - input.input(type="number" name="category_vox", value=custom.category_vox) + input.input(type="number" name="category_vox", id="category_vox", value=custom.category_vox) .field label.label Note Skin .control - input.input(type="number" name="note_skin", value=custom.note_skin) + input.input(type="number" name="note_skin", id="note_skin", value=custom.note_skin) .field label.label Full Combo Splash .control - input.input(type="number" name="full_combo_splash", value=custom.full_combo_splash) + input.input(type="number" name="full_combo_splash", id="full_combo_splash", value=custom.full_combo_splash) .field label.label Note Beam .control - input.input(type="number" name="note_beam", value=custom.note_beam) + input.input(type="number" name="note_beam", id="note_beam", value=custom.note_beam) .field label.label Judgement Font .control - input.input(type="number" name="judge_font", value=custom.judge_font) + input.input(type="number" name="judge_font", id="judge_font", value=custom.judge_font) .field label.label Disable Music Preview .control - input(type="checkbox" name="disable_musicpreview", checked=Boolean(custom.disable_musicpreview)) + input(type="checkbox" name="disable_musicpreview", id="disable_musicpreview", checked=Boolean(custom.disable_musicpreview)) .field label.label Pacemaker Cover .control - input.input(type="number" name="pacemaker_cover", value=custom.pacemaker_cover) + input.input(type="number" name="pacemaker_cover", id="pacemaker_cover", value=custom.pacemaker_cover) .field label.label VEFX Lock .control - input(type="checkbox" name="vefx_lock", checked=Boolean(custom.vefx_lock)) + input(type="checkbox" name="vefx_lock", id="vefx_lock", checked=Boolean(custom.vefx_lock)) .field label.label VEFX Lock (Effector) .control - input.input(type="number" name="effect", value=custom.effect) + input.input(type="number" name="effect", id="effect", value=custom.effect) .field label.label Note Burst Size .control - input.input(type="number" name="bomb_size", value=custom.bomb_size) + input.input(type="number" name="bomb_size", id="bomb_size", value=custom.bomb_size) .field label.label Disable HCN Color .control - input(type="checkbox" name="disable_hcn_color", checked=Boolean(custom.disable_hcn_color)) + input(type="checkbox" name="disable_hcn_color", id="disable_hcn_color", checked=Boolean(custom.disable_hcn_color)) .field label.label First Note Preview .control - input.input(type="number" name="first_note_preview", value=custom.first_note_preview) + input.input(type="number" name="first_note_preview", id="first_note_preview", value=custom.first_note_preview) + .field + label.label Note Size + .control + if custom.note_size === undefined + input.input(type="number" name="note_size", id="note_size", value="0") + else + input.input(type="number" name="note_size", id="note_size", value=custom.note_size) + .field + label.label Lift Cover + .control + if custom.lift_cover === undefined + input.input(type="number" name="lift_cover", id="lift_cover", value="0") + else + input.input(type="number" name="lift_cover", id="lift_cover", value=custom.lift_cover) + .field + label.label Note Beam Size + .control + if custom.note_beam_size === undefined + input.input(type="number" name="note_beam_size", id="note_beam_size", value="0") + else + input.input(type="number" name="note_beam_size", id="note_beam_size", value=custom.note_beam_size) //- APPEND SETTINGS .field label.label Rank Folder .control - input(type="checkbox" name="rank_folder", checked=Boolean(custom.rank_folder)) + input(type="checkbox" name="rank_folder", id="rank_folder", checked=Boolean(custom.rank_folder)) .field label.label Clear State Folder .control - input(type="checkbox" name="clear_folder", checked=Boolean(custom.clear_folder)) + input(type="checkbox" name="clear_folder", id="clear_folder", checked=Boolean(custom.clear_folder)) .field label.label Difficulty Folder .control - input(type="checkbox" name="diff_folder", checked=Boolean(custom.diff_folder)) + input(type="checkbox" name="diff_folder", id="diff_folder", checked=Boolean(custom.diff_folder)) .field label.label Alphabet Folder .control - input(type="checkbox" name="alpha_folder", checked=Boolean(custom.alpha_folder)) + input(type="checkbox" name="alpha_folder", id="alpha_folder", checked=Boolean(custom.alpha_folder)) .field label.label Rival Folder .control - input(type="checkbox" name="rival_folder", checked=Boolean(custom.rival_folder)) + input(type="checkbox" name="rival_folder", id="rival_folder", checked=Boolean(custom.rival_folder)) .field label.label Rival WIN/LOSE Folder .control - input(type="checkbox" name="rival_battle_folder", checked=Boolean(custom.rival_battle_folder)) + input(type="checkbox" name="rival_battle_folder", id="rival_battle_folder", checked=Boolean(custom.rival_battle_folder)) .field label.label Rival Info / Venue Top Display .control - input(type="checkbox" name="rival_info", checked=Boolean(custom.rival_info)) + input(type="checkbox" name="rival_info", id="rival_info", checked=Boolean(custom.rival_info)) .field label.label Hide Playcount .control - input(type="checkbox" name="hide_playcount", checked=Boolean(custom.hide_playcount)) + input(type="checkbox" name="hide_playcount", id="hide_playcount", checked=Boolean(custom.hide_playcount)) .field label.label Disable Pacemaker Cut-In .control - input(type="checkbox" name="disable_graph_cutin", checked=Boolean(custom.disable_graph_cutin)) + input(type="checkbox" name="disable_graph_cutin", id="disable_graph_cutin", checked=Boolean(custom.disable_graph_cutin)) .field label.label Classic Hi-SPEED .control - input(type="checkbox" name="class_hispeed", checked=Boolean(custom.class_hispeed)) + input(type="checkbox" name="class_hispeed", id="class_hispeed", checked=Boolean(custom.class_hispeed)) .field label.label Rival Played Folder .control - input(type="checkbox" name="rival_played_folder", checked=Boolean(custom.rival_played_folder)) + input(type="checkbox" name="rival_played_folder", id="rival_played_folder", checked=Boolean(custom.rival_played_folder)) .field label.label Hide IIDX ID .control - input(type="checkbox" name="hide_iidxid", checked=Boolean(custom.hide_iidxid)) + input(type="checkbox" name="hide_iidxid", id="hide_iidxid", checked=Boolean(custom.hide_iidxid)) .field label.label Disable Beginner Option .control if custom.disable_beginner_option === undefined - input(type="checkbox" name="disable_beginner_option", checked=Boolean(false)) + input(type="checkbox" name="disable_beginner_option", id="disable_beginner_option", checked=Boolean(false)) else - input(type="checkbox" name="disable_beginner_option", checked=Boolean(custom.disable_beginner_option)) + input(type="checkbox" name="disable_beginner_option", id="disable_beginner_option", checked=Boolean(custom.disable_beginner_option)) //- QPRO .field label.label QPRO Head .control - input.input(type="number" name="qpro_head", value=custom.qpro_head) + input.input(type="number" name="qpro_head", id="qpro_head", value=custom.qpro_head) .field label.label QPRO Hair .control - input.input(type="number" name="qpro_hair", value=custom.qpro_hair) + input.input(type="number" name="qpro_hair", id="qpro_hair", value=custom.qpro_hair) .field label.label QPRO Hand .control - input.input(type="number" name="qpro_hand", value=custom.qpro_hand) + input.input(type="number" name="qpro_hand", id="qpro_hand", value=custom.qpro_hand) .field label.label QPRO Face .control - input.input(type="number" name="qpro_face", value=custom.qpro_face) + input.input(type="number" name="qpro_face", id="qpro_face", value=custom.qpro_face) .field label.label QPRO Body .control - input.input(type="number" name="qpro_body", value=custom.qpro_body) + input.input(type="number" name="qpro_body", id="qpro_body", value=custom.qpro_body) + .field + label.label QPRO Back + .control + if custom.qpro_back === undefined + input.input(type="number" name="qpro_back", id="qpro_back", value="0") + else + input.input(type="number" name="qpro_back", id="qpro_back", value=custom.qpro_back) + //- LIGHTNING CUSTOM + if lm_custom != null + .field + label.label Premium Area Skin + input.input(type="number" name="lm_skin", id="lm_skin", value=lm_custom.premium_skin) + label.label Premium Area Background + input.input(type="number" name="lm_bg", id="lm_bg", value=lm_custom.premium_bg) .field button.button.is-primary(type="submit") span.icon i.mdi.mdi-check span Submit +script(src="static/asset/js/setting.js") diff --git a/iidx@asphyxia/webui/profile_---rival.pug b/iidx@asphyxia/webui/profile_---rival.pug index c236238..dd796cb 100644 --- a/iidx@asphyxia/webui/profile_---rival.pug +++ b/iidx@asphyxia/webui/profile_---rival.pug @@ -23,7 +23,7 @@ div i.mdi.mdi-account-edit | Rivals .card-content - form(method="post" action="/emit/updateIIDXRival") + form(method="post" action="/emit/iidxUpdateRival") .field input(type="text" name="refid", value=refid readonly hidden) label.label SP Rivals diff --git a/iidx@asphyxia/webui/profile_-data.pug b/iidx@asphyxia/webui/profile_-data.pug index 8b870ac..d7a7ff4 100644 --- a/iidx@asphyxia/webui/profile_-data.pug +++ b/iidx@asphyxia/webui/profile_-data.pug @@ -8,7 +8,7 @@ div .card-content .field label.label [!] This will overwrite exsiting scores - form(method="post" action="/emit/importScoreData") + form(method="post" action="/emit/iidxImportScoreData") .field input(type="text" name="refid", value=refid readonly hidden) input.input(type="text" name="data" placeholder="Paste score JSON data") @@ -18,7 +18,7 @@ div i.mdi.mdi-check span Score Import .field - form(method="post" action="/emit/exportScoreData") + form(method="post" action="/emit/iidxExportScoreData") .field input(type="text" name="refid", value=refid readonly hidden) button.button.is-primary(type="submit")